profile_container Class Reference

Store multiple samples files belonging to the same profiling session. More...

#include <profile_container.h>

Inheritance diagram for profile_container:

Inheritance graph
[legend]
Collaboration diagram for profile_container:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 profile_container (bool debug_info, bool need_details, extra_images const &extra)
 Build an object to store information on samples.
 ~profile_container ()
void add (profile_t const &profile, op_bfd const &abfd, std::string const &app_name, size_t pclass)
 add() - record symbols/samples in the underlying container
symbol_entry const * find_symbol (std::string const &image_name, bfd_vma vma) const
 Find a symbol from its image_name, vma, return zero if no symbol for this image at this vma.
symbol_collection const find_symbol (debug_name_id filename, size_t linenr) const
 Find the symbols from its filename, linenr, return an empty symbol_collection if no symbol at this location.
sample_entry const * find_sample (symbol_entry const *symbol, bfd_vma vma) const
 Find a sample by its symbol, vma, return zero if there is no sample at this vma.
symbol_entry const * find (symbol_entry const &symbol) const
 Find a symbol. Return NULL if not found.
symbol_collection const select_symbols (symbol_choice &choice) const
 select_symbols - create a set of symbols sorted by sample count
symbol_collection const select_symbols (debug_name_id filename) const
 select_symbols - create a set of symbols belonging to a given source
std::vector< debug_name_id
> const 
select_filename (double threshold) const
 Like select_symbols for filename without allowing sort by vma.
count_array_t samples_count () const
 return the total number of samples
count_array_t samples_count (debug_name_id filename_id) const
 Get the samples count which belongs to filename.
count_array_t samples_count (debug_name_id filename, size_t linenr) const
 Get the samples count which belongs to filename, linenr.
symbol_container::symbols_t::iterator begin_symbol () const
 return an iterator to the first symbol
symbol_container::symbols_t::iterator end_symbol () const
 return an iterator to the last symbol
sample_container::samples_iterator begin () const
 return iterator to the first samples
sample_container::samples_iterator end () const
 return iterator to the last samples
sample_container::samples_iterator begin (symbol_entry const *) const
 return iterator to the first samples for this symbol
sample_container::samples_iterator end (symbol_entry const *) const
 return iterator to the last samples for this symbol

Public Attributes

extra_images extra_found_images

Classes

struct  symbol_choice
 used for select_symbols() More...

Detailed Description

Store multiple samples files belonging to the same profiling session.

This is the main container capable of holding the profiles for arbitrary binary images and arbitrary profile classes.


Constructor & Destructor Documentation

profile_container::profile_container bool  debug_info,
bool  need_details,
extra_images const &  extra
 

Build an object to store information on samples.

All parameters acts as hint for what you will request after recording samples and so allow optimizations during recording the information.

Parameters:
debug_info If true line numbers and source files are recorded.
need_details If true if we need to record all samples or to to record them at symbol level.
extra extra images location

profile_container::~profile_container  ) 
 


Member Function Documentation

void profile_container::add profile_t const &  profile,
op_bfd const &  abfd,
std::string const &  app_name,
size_t  pclass
 

add() - record symbols/samples in the underlying container

Parameters:
profile the samples files container
abfd the associated bfd object
app_name the owning application name of sample
pclass the profile class to add results for
add() is an helper for delayed ctor. Take care you can't safely make any call to add after any other member function call. Obviously you can add only samples files which are coherent (same sampling rate, same events etc.)

sample_container::samples_iterator profile_container::begin symbol_entry const *   )  const
 

return iterator to the first samples for this symbol

sample_container::samples_iterator profile_container::begin  )  const
 

return iterator to the first samples

symbol_container::symbols_t::iterator profile_container::begin_symbol  )  const
 

return an iterator to the first symbol

sample_container::samples_iterator profile_container::end symbol_entry const *   )  const
 

return iterator to the last samples for this symbol

sample_container::samples_iterator profile_container::end  )  const
 

return iterator to the last samples

symbol_container::symbols_t::iterator profile_container::end_symbol  )  const
 

return an iterator to the last symbol

symbol_entry const * profile_container::find symbol_entry const &  symbol  )  const
 

Find a symbol. Return NULL if not found.

sample_entry const * profile_container::find_sample symbol_entry const *  symbol,
bfd_vma  vma
const
 

Find a sample by its symbol, vma, return zero if there is no sample at this vma.

symbol_collection const profile_container::find_symbol debug_name_id  filename,
size_t  linenr
const
 

Find the symbols from its filename, linenr, return an empty symbol_collection if no symbol at this location.

symbol_entry const* profile_container::find_symbol std::string const &  image_name,
bfd_vma  vma
const
 

Find a symbol from its image_name, vma, return zero if no symbol for this image at this vma.

count_array_t profile_container::samples_count debug_name_id  filename,
size_t  linenr
const
 

Get the samples count which belongs to filename, linenr.

Return 0 if no samples found.

count_array_t profile_container::samples_count debug_name_id  filename_id  )  const
 

Get the samples count which belongs to filename.

Return 0 if no samples found.

count_array_t profile_container::samples_count  )  const
 

return the total number of samples

vector< debug_name_id > const profile_container::select_filename double  threshold  )  const
 

Like select_symbols for filename without allowing sort by vma.

symbol_collection const profile_container::select_symbols debug_name_id  filename  )  const
 

select_symbols - create a set of symbols belonging to a given source

Parameters:
filename source file where are defined the returned symbols

symbol_collection const profile_container::select_symbols symbol_choice choice  )  const
 

select_symbols - create a set of symbols sorted by sample count

Parameters:
choice parameters to use/fill in when selecting


Member Data Documentation

extra_images profile_container::extra_found_images
 


The documentation for this class was generated from the following files:
Generated on Thu Jul 17 19:54:34 2008 for oprofile by  doxygen 1.4.6