operf_sfile.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <iostream>
#include <sstream>
#include "operf_sfile.h"
#include "operf_kernel.h"
#include "operf_utils.h"
#include "cverb.h"
#include "op_string.h"
#include "operf_mangling.h"
#include "operf_stats.h"
#include "op_libiberty.h"
Include dependency graph for operf_sfile.cpp:

Defines

#define HASH_SIZE   2048
#define HASH_BITS   (HASH_SIZE - 1)
#define LRU_AMOUNT   256

Typedefs

typedef int(* operf_sfile_func )(struct operf_sfile *, void *)

Functions

int operf_sfile_equal (struct operf_sfile const *sf, struct operf_sfile const *sf2)
struct operf_sfileoperf_sfile_find (struct operf_transient const *trans)
 Find the sfile for the current parameters.
void operf_sfile_dup (struct operf_sfile *to, struct operf_sfile *from)
void operf_sfile_log_arc (struct operf_transient const *trans)
 Log a callgraph arc.
void operf_sfile_log_sample (struct operf_transient const *trans)
 Log the sample in a previously located sfile.
void operf_sfile_log_sample_count (struct operf_transient const *trans, unsigned long int count)
 Log the event/cycle count in a previously located sfile.
void operf_sfile_clear_kernel (void)
 clear any sfiles that are for the kernel
void operf_sfile_sync_files (void)
 sync sample files
void operf_sfile_close_files (void)
 close sample files
int operf_sfile_lru_clear (void)
 clear out a certain amount of LRU entries return non-zero if the lru is already empty
void operf_sfile_get (struct operf_sfile *sf)
 remove a sfile from the lru list, protecting it from operf_sfile_lru_clear()
void operf_sfile_put (struct operf_sfile *sf)
 add this sfile to lru list
void operf_sfile_init (void)
 initialise hashes

Define Documentation

#define HASH_BITS   (HASH_SIZE - 1)
#define HASH_SIZE   2048
#define LRU_AMOUNT   256

Typedef Documentation

typedef int(* operf_sfile_func)(struct operf_sfile *, void *)

Function Documentation

void operf_sfile_clear_kernel ( void   ) 

clear any sfiles that are for the kernel

void operf_sfile_close_files ( void   ) 

close sample files

Referenced by OP_perf_utils::op_release_resources().

void operf_sfile_dup ( struct operf_sfile to,
struct operf_sfile from 
)
int operf_sfile_equal ( struct operf_sfile const *  sf,
struct operf_sfile const *  sf2 
)
struct operf_sfile* operf_sfile_find ( struct operf_transient const *  trans  )  [read]
void operf_sfile_get ( struct operf_sfile sf  ) 

remove a sfile from the lru list, protecting it from operf_sfile_lru_clear()

References operf_sfile::lru.

Referenced by operf_open_sample_file(), and operf_sfile_find().

void operf_sfile_init ( void   ) 

initialise hashes

References HASH_SIZE.

Referenced by OP_perf_utils::op_write_event().

void operf_sfile_log_arc ( struct operf_transient const *  trans  ) 
void operf_sfile_log_sample ( struct operf_transient const *  trans  ) 

Log the sample in a previously located sfile.

References operf_sfile_log_sample_count().

void operf_sfile_log_sample_count ( struct operf_transient const *  trans,
unsigned long int  count 
)
int operf_sfile_lru_clear ( void   ) 

clear out a certain amount of LRU entries return non-zero if the lru is already empty

References list_entry, list_for_each_safe, operf_sfile::lru, and LRU_AMOUNT.

Referenced by operf_open_sample_file().

void operf_sfile_put ( struct operf_sfile sf  ) 

add this sfile to lru list

References operf_sfile::lru.

Referenced by operf_open_sample_file(), and operf_sfile_find().

void operf_sfile_sync_files ( void   ) 

sync sample files


Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1