base class for formatter, handle common options to formatter More...
#include <format_output.h>


Classes | |
| struct | counts_t |
| struct | field_datum |
| data passed for output More... | |
| struct | field_description |
| decribe one field of the colummned output. More... | |
Public Member Functions | |
| formatter (extra_images const &extra) | |
| virtual | ~formatter () |
| void | add_format (format_flags flag) |
| add a given column | |
| void | show_header (bool) |
| set the need_header boolean to false | |
| void | vma_format_64bit (bool) |
| format for 64 bit wide VMAs | |
| void | show_long_filenames (bool) |
| show long (full path) filenames | |
| void | show_global_percent (bool) |
| use global count rather symbol count for details percent | |
| void | set_nr_classes (size_t nr_classes) |
| Set the number of collected profile classes. | |
| void | output_header (std::ostream &out) |
| output table header, implemented by calling the virtual function output_header_field() | |
Protected Types | |
| typedef std::string(formatter::* | fct_format )(field_datum const &) |
| format callback type | |
| typedef std::map< format_flags, field_description > | format_map_t |
Protected Member Functions | |
| void | do_output (std::ostream &out, symbol_entry const &symbol, sample_entry const &sample, counts_t &c, diff_array_t const &=diff_array_t(), bool hide_immutable_field=false) |
| actually do output | |
| size_t | output_header_field (std::ostream &out, format_flags fl, size_t padding) |
| returns the nr of char needed to pad this field | |
| size_t | output_field (std::ostream &out, field_datum const &datum, format_flags fl, size_t padding, bool hide_immutable) |
| returns the nr of char needed to pad this field | |
format functions. | |
| std::string | format_vma (field_datum const &) |
| std::string | format_symb_name (field_datum const &) |
| std::string | format_image_name (field_datum const &) |
| std::string | format_app_name (field_datum const &) |
| std::string | format_linenr_info (field_datum const &) |
| std::string | format_nr_samples (field_datum const &) |
| std::string | format_nr_cumulated_samples (field_datum const &) |
| std::string | format_percent (field_datum const &) |
| std::string | format_cumulated_percent (field_datum const &) |
| std::string | format_percent_details (field_datum const &) |
| std::string | format_cumulated_percent_details (field_datum const &) |
| std::string | format_diff (field_datum const &) |
Protected Attributes | |
| format_map_t | format_map |
| stores functors for doing actual formatting | |
| size_t | nr_classes |
| number of profile classes | |
| counts_t | counts |
| total counts | |
| format_flags | flags |
| formatting flags set | |
| bool | vma_64 |
| true if we need to format as 64 bits quantities | |
| bool | long_filenames |
| false if we use basename(filename) in output rather filename | |
| bool | need_header |
| true if we need to show header before the first output | |
| bool | global_percent |
| bool if details percentage are relative to total count rather to symbol count | |
| extra_images const & | extra_found_images |
| To retrieve the real image location, usefull when acting on an archive and for 2.6 kernel modules. | |
base class for formatter, handle common options to formatter
typedef std::string(formatter::* format_output::formatter::fct_format)(field_datum const &) [protected] |
format callback type
typedef std::map<format_flags, field_description> format_output::formatter::format_map_t [protected] |
| format_output::formatter::formatter | ( | extra_images const & | extra | ) |
References ff_app_name, ff_diff, ff_image_name, ff_linenr_info, ff_nr_samples, ff_nr_samples_cumulated, ff_percent, ff_percent_cumulated, ff_percent_cumulated_details, ff_percent_details, ff_symb_name, ff_vma, format_app_name(), format_cumulated_percent(), format_cumulated_percent_details(), format_diff(), format_image_name(), format_linenr_info(), format_map, format_nr_cumulated_samples(), format_nr_samples(), format_percent(), format_percent_details(), format_symb_name(), and format_vma().
| format_output::formatter::~formatter | ( | ) | [virtual] |
| void format_output::formatter::add_format | ( | format_flags | flag | ) |
add a given column
References flags.
| void format_output::formatter::do_output | ( | std::ostream & | out, | |
| symbol_entry const & | symbol, | |||
| sample_entry const & | sample, | |||
| counts_t & | c, | |||
| diff_array_t const & | = diff_array_t(), |
|||
| bool | hide_immutable_field = false | |||
| ) | [protected] |
actually do output
| string format_output::formatter::format_app_name | ( | field_datum const & | f | ) | [protected] |
| string format_output::formatter::format_cumulated_percent | ( | field_datum const & | f | ) | [protected] |
References sample_entry::counts, format_output::formatter::field_datum::counts, format_output::formatter::counts_t::cumulated_percent, format_output::formatter::field_datum::diff, format_output::formatter::field_datum::pclass, format_output::formatter::field_datum::sample, and format_output::formatter::counts_t::total.
Referenced by formatter().
| string format_output::formatter::format_cumulated_percent_details | ( | field_datum const & | f | ) | [protected] |
References sample_entry::counts, format_output::formatter::field_datum::counts, format_output::formatter::counts_t::cumulated_percent_details, format_output::formatter::field_datum::pclass, format_output::formatter::field_datum::sample, and format_output::formatter::counts_t::total.
Referenced by formatter().
| string format_output::formatter::format_diff | ( | field_datum const & | f | ) | [protected] |
References format_output::formatter::field_datum::diff, and format_percent().
Referenced by formatter().
| string format_output::formatter::format_image_name | ( | field_datum const & | f | ) | [protected] |
| string format_output::formatter::format_linenr_info | ( | field_datum const & | f | ) | [protected] |
References sample_entry::file_loc, long_filenames, and format_output::formatter::field_datum::sample.
Referenced by formatter().
| string format_output::formatter::format_nr_cumulated_samples | ( | field_datum const & | f | ) | [protected] |
References sample_entry::counts, format_output::formatter::field_datum::counts, format_output::formatter::counts_t::cumulated_samples, format_output::formatter::field_datum::diff, format_output::formatter::field_datum::pclass, and format_output::formatter::field_datum::sample.
Referenced by formatter().
| string format_output::formatter::format_nr_samples | ( | field_datum const & | f | ) | [protected] |
References sample_entry::counts, format_output::formatter::field_datum::pclass, and format_output::formatter::field_datum::sample.
Referenced by formatter().
| string format_output::formatter::format_percent | ( | field_datum const & | f | ) | [protected] |
References format_output::formatter::field_datum::counts, sample_entry::counts, format_output::formatter::field_datum::diff, format_output::formatter::field_datum::pclass, format_output::formatter::field_datum::sample, and format_output::formatter::counts_t::total.
Referenced by format_diff(), and formatter().
| string format_output::formatter::format_percent_details | ( | field_datum const & | f | ) | [protected] |
| string format_output::formatter::format_symb_name | ( | field_datum const & | f | ) | [protected] |
References symbol_name_storage::demangle(), symbol_entry::name, format_output::formatter::field_datum::symbol, and symbol_names.
Referenced by formatter().
| string format_output::formatter::format_vma | ( | field_datum const & | f | ) | [protected] |
References format_output::formatter::field_datum::sample, and sample_entry::vma.
Referenced by formatter().
| size_t format_output::formatter::output_field | ( | std::ostream & | out, | |
| field_datum const & | datum, | |||
| format_flags | fl, | |||
| size_t | padding, | |||
| bool | hide_immutable | |||
| ) | [protected] |
returns the nr of char needed to pad this field
| void format_output::formatter::output_header | ( | std::ostream & | out | ) |
output table header, implemented by calling the virtual function output_header_field()
| size_t format_output::formatter::output_header_field | ( | std::ostream & | out, | |
| format_flags | fl, | |||
| size_t | padding | |||
| ) | [protected] |
returns the nr of char needed to pad this field
| void format_output::formatter::set_nr_classes | ( | size_t | nr_classes | ) |
Set the number of collected profile classes.
Each class will output sample count and percentage in extra columns.
This class assumes that the profile information has been populated with the right number of classes.
References nr_classes.
| void format_output::formatter::show_global_percent | ( | bool | on_off | ) |
use global count rather symbol count for details percent
References global_percent.
| void format_output::formatter::show_header | ( | bool | on_off | ) |
set the need_header boolean to false
References need_header.
| void format_output::formatter::show_long_filenames | ( | bool | on_off | ) |
show long (full path) filenames
References long_filenames.
| void format_output::formatter::vma_format_64bit | ( | bool | on_off | ) |
format for 64 bit wide VMAs
counts_t format_output::formatter::counts [protected] |
extra_images const& format_output::formatter::extra_found_images [protected] |
To retrieve the real image location, usefull when acting on an archive and for 2.6 kernel modules.
Referenced by format_app_name(), format_image_name(), and format_output::xml_formatter::output_symbol_details().
format_flags format_output::formatter::flags [protected] |
formatting flags set
Referenced by add_format().
format_map_t format_output::formatter::format_map [protected] |
stores functors for doing actual formatting
Referenced by formatter().
bool format_output::formatter::global_percent [protected] |
bool if details percentage are relative to total count rather to symbol count
Referenced by show_global_percent().
bool format_output::formatter::long_filenames [protected] |
false if we use basename(filename) in output rather filename
Referenced by format_app_name(), format_image_name(), format_linenr_info(), and show_long_filenames().
bool format_output::formatter::need_header [protected] |
true if we need to show header before the first output
Referenced by show_header().
size_t format_output::formatter::nr_classes [protected] |
number of profile classes
Referenced by set_nr_classes().
bool format_output::formatter::vma_64 [protected] |
true if we need to format as 64 bits quantities
1.6.1