arc_recorder Class Reference

#include <callgraph_container.h>

Data Structures

struct  cg_data

Public Member Functions

 ~arc_recorder ()
void add (symbol_entry const &caller, symbol_entry const *callee, count_array_t const &arc_count)
symbol_collection const & get_symbols () const
 return all the cg symbols
void process (count_array_t total, double threshold, string_filter const &filter)

Private Types

typedef std::map< symbol_entry,
cg_data, less_symbol
map_t

Private Member Functions

void process_children (cg_symbol &sym, double threshold)

Private Attributes

map_t sym_map
 all the symbols (used during processing)
cg_collection_objs cg_syms_objs
 symbol objects pointed to by pointers in vector cg_syms
symbol_collection cg_syms
 final output data

Detailed Description

During building a callgraph_container we store all caller/callee relationship in this container.

An "arc" is simply a description of a call from one function to another.

Definition at line 38 of file callgraph_container.h.


Member Typedef Documentation

typedef std::map<symbol_entry, cg_data, less_symbol> arc_recorder::map_t [private]

Definition at line 88 of file callgraph_container.h.


Constructor & Destructor Documentation

arc_recorder::~arc_recorder (  )  [inline]

Definition at line 40 of file callgraph_container.h.


Member Function Documentation

void arc_recorder::add ( symbol_entry const &  caller,
symbol_entry const *  callee,
count_array_t const &  arc_count 
)

Add a symbol arc.

Parameters:
caller The calling symbol
callee The called symbol
arc_count profile data for the arcs

If the callee is NULL, only the caller is added to the main list. This is used to initially populate the recorder with the symbols.

Definition at line 287 of file callgraph_container.cpp.

References arc_recorder::cg_data::callees, arc_recorder::cg_data::callers, and sym_map.

Referenced by callgraph_container::add_symbols().

Here is the caller graph for this function:

symbol_collection const & arc_recorder::get_symbols (  )  const

return all the cg symbols

Definition at line 389 of file callgraph_container.cpp.

References cg_syms.

Referenced by callgraph_container::get_symbols(), and callgraph_container::output_hint().

Here is the caller graph for this function:

void arc_recorder::process ( count_array_t  total,
double  threshold,
string_filter const &  filter 
)
void arc_recorder::process_children ( cg_symbol sym,
double  threshold 
) [private]

Sort and threshold callers and callees.

Definition at line 304 of file callgraph_container.cpp.

References cg_symbol::callees, cg_symbol::callers, unique_storage< I, V >::create(), symbol_name_storage::demangle(), symbol_entry::name, op_ratio(), symbol_names, cg_symbol::total_callee_count, and cg_symbol::total_caller_count.

Referenced by process().

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

final output data

Definition at line 97 of file callgraph_container.h.

Referenced by get_symbols(), and process().

symbol objects pointed to by pointers in vector cg_syms

Definition at line 94 of file callgraph_container.h.

Referenced by process().

all the symbols (used during processing)

Definition at line 91 of file callgraph_container.h.

Referenced by add(), and process().


The documentation for this class was generated from the following files:

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1