Store multiple samples files belonging to the same profiling session. More...
#include <profile_container.h>


Classes | |
| struct | symbol_choice |
| used for select_symbols() More... | |
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 |
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.
| 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.
| 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 | ( | ) |
| 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
| 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.)
Referenced by populate_for_image().
| sample_container::samples_iterator profile_container::begin | ( | symbol_entry const * | symbol | ) | const |
return iterator to the first samples for this symbol
| sample_container::samples_iterator profile_container::begin | ( | ) | const |
return iterator to the first samples
Referenced by format_output::xml_formatter::output_symbol_details().
| symbol_container::symbols_t::iterator profile_container::begin_symbol | ( | ) | const |
return an iterator to the first symbol
Referenced by diff_container::get_symbols().
| sample_container::samples_iterator profile_container::end | ( | symbol_entry const * | symbol | ) | const |
return iterator to the last samples for this symbol
| sample_container::samples_iterator profile_container::end | ( | ) | const |
return iterator to the last samples
Referenced by format_output::xml_formatter::output_symbol_details(), select_filename(), and select_symbols().
| symbol_container::symbols_t::iterator profile_container::end_symbol | ( | ) | const |
return an iterator to the last symbol
Referenced by diff_container::get_symbols().
| 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
Referenced by format_output::opreport_formatter::opreport_formatter(), select_filename(), and format_output::xml_formatter::xml_formatter().
| vector< debug_name_id > const profile_container::select_filename | ( | double | threshold | ) | const |
Like select_symbols for filename without allowing sort by vma.
References end(), op_ratio(), ratio(), and samples_count().
| symbol_collection const profile_container::select_symbols | ( | debug_name_id | filename | ) | const |
select_symbols - create a set of symbols belonging to a given source
| 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
| choice | parameters to use/fill in when selecting |
References end(), profile_container::symbol_choice::hints, profile_container::symbol_choice::image_name, image_names, profile_container::symbol_choice::match_image, filename_storage< I >::name(), op_ratio(), profile_container::symbol_choice::threshold, and options::threshold.
1.6.1