operf_sfile.h File Reference

#include "operf_utils.h"
#include "odb.h"
#include "op_hw_config.h"
#include "op_types.h"
#include "op_list.h"
#include "operf_process_info.h"
#include <sys/types.h>
Include dependency graph for operf_sfile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  operf_sfile
struct  operf_cg_entry
struct  operf_transient

Defines

#define CG_HASH_SIZE   16
#define INVALID_IMAGE   "INVALID IMAGE"
#define VMA_SHIFT   13

Functions

void operf_sfile_clear_kernel (void)
void operf_sfile_sync_files (void)
void operf_sfile_close_files (void)
int operf_sfile_lru_clear (void)
void operf_sfile_get (struct operf_sfile *sf)
void operf_sfile_put (struct operf_sfile *sf)
struct operf_sfileoperf_sfile_find (struct operf_transient const *trans)
void operf_sfile_log_sample (struct operf_transient const *trans)
void operf_sfile_log_sample_count (struct operf_transient const *trans, unsigned long int count)
void operf_sfile_log_arc (struct operf_transient const *trans)
void operf_sfile_init (void)

Define Documentation

#define CG_HASH_SIZE   16

Definition at line 28 of file operf_sfile.h.

#define INVALID_IMAGE   "INVALID IMAGE"

Definition at line 29 of file operf_sfile.h.

#define VMA_SHIFT   13

Definition at line 31 of file operf_sfile.h.


Function Documentation

void operf_sfile_clear_kernel ( void   ) 

clear any sfiles that are for the kernel

Definition at line 492 of file operf_sfile.cpp.

References for_each_sfile(), and is_sfile_kernel().

Here is the call graph for this function:

void operf_sfile_close_files ( void   ) 

close sample files

Definition at line 508 of file operf_sfile.cpp.

References _release_resources(), and for_each_sfile().

Referenced by OP_perf_utils::op_release_resources().

Here is the call graph for this function:

Here is the caller graph for this function:

struct operf_sfile* operf_sfile_find ( struct operf_transient const *  trans  )  [read]

Find the sfile for the current parameters. Note that is required that the PC value be set appropriately (needed for kernel images)

Definition at line 175 of file operf_sfile.cpp.

References operf_transient::app_filename, operf_transient::app_len, operf_transient::cpu, create_sfile(), cverb, do_match(), operf_sfile::hash, hashes, operf_transient::image_len, operf_transient::image_name, operf_transient::in_kernel, operf_transient::is_anon, list_add(), list_entry, list_for_each, lru, operf_find_kernel_image(), OPERF_LOST_KERNEL, operf_sfile_get(), operf_sfile_put(), operf_stats, operf_transient::pc, sfile_hash(), operf_transient::tgid, operf_transient::tid, and vsfile.

Referenced by __handle_callchain(), and __handle_sample_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void operf_sfile_get ( struct operf_sfile sf  ) 

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

Definition at line 548 of file operf_sfile.cpp.

References list_del(), and operf_sfile::lru.

Referenced by operf_open_sample_file(), and operf_sfile_find().

Here is the call graph for this function:

Here is the caller graph for this function:

void operf_sfile_init ( void   ) 

initialise hashes

Definition at line 562 of file operf_sfile.cpp.

References HASH_SIZE, hashes, and list_init().

Referenced by OP_perf_utils::op_write_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void operf_sfile_log_arc ( struct operf_transient const *  trans  ) 

Log a callgraph arc.

Definition at line 323 of file operf_sfile.cpp.

References operf_transient::current, cverb, get_file(), operf_sfile::is_anon, operf_sfile::kernel, operf_transient::last, operf_transient::last_pc, odb_update_node(), OPERF_LOST_SAMPLEFILE, operf_stats, operf_transient::pc, operf_kernel_image::start, operf_sfile::start_addr, varcs, and verbose_arc().

Referenced by __handle_callchain().

Here is the call graph for this function:

Here is the caller graph for this function:

void operf_sfile_log_sample ( struct operf_transient const *  trans  ) 

Log the sample in a previously located sfile.

Definition at line 366 of file operf_sfile.cpp.

References operf_sfile_log_sample_count().

Referenced by __handle_sample_event().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 372 of file operf_sfile.cpp.

References operf_transient::current, cverb, get_file(), operf_transient::in_kernel, operf_sfile::is_anon, operf_sfile::kernel, odb_update_node_with_offset(), OPERF_KERNEL, OPERF_LOST_SAMPLEFILE, OPERF_PROCESS, OPERF_SAMPLES, operf_stats, operf_transient::pc, operf_kernel_image::start, operf_sfile::start_addr, verbose_sample(), and vsfile.

Referenced by operf_sfile_log_sample().

Here is the call graph for this function:

Here is the caller graph for this function:

int operf_sfile_lru_clear ( void   ) 

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

Definition at line 527 of file operf_sfile.cpp.

References always_true(), for_one_sfile(), list_empty(), list_entry, list_for_each_safe, lru, and LRU_AMOUNT.

Referenced by operf_open_sample_file().

Here is the call graph for this function:

Here is the caller graph for this function:

void operf_sfile_put ( struct operf_sfile sf  ) 

add this sfile to lru list

Definition at line 555 of file operf_sfile.cpp.

References list_add_tail(), and operf_sfile::lru.

Referenced by operf_open_sample_file(), and operf_sfile_find().

Here is the call graph for this function:

Here is the caller graph for this function:

void operf_sfile_sync_files ( void   ) 

sync sample files

Definition at line 498 of file operf_sfile.cpp.

References for_each_sfile(), and sync_sfile().

Here is the call graph for this function:


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1