#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <map>
#include <set>
#include "string_manip.h"
#include "op_header.h"
#include "op_exception.h"
#include "arrange_profiles.h"
#include "format_output.h"
#include "xml_utils.h"
#include "parse_filename.h"
#include "locate_images.h"
Go to the source code of this file.
Functions | |
bool | operator< (profile_class const &lhs, profile_class const &rhs) |
profile_classes const | arrange_profiles (list< string > const &files, merge_option const &merge_by, extra_images const &extra) |
ostream & | operator<< (ostream &out, profile_sample_files const &sample_files) |
ostream & | operator<< (ostream &out, profile_dep_set const &pdep_set) |
ostream & | operator<< (ostream &out, profile_set const &pset) |
ostream & | operator<< (ostream &out, profile_template const &ptemplate) |
ostream & | operator<< (ostream &out, profile_class const &pclass) |
ostream & | operator<< (ostream &out, profile_classes const &pclasses) |
list< inverted_profile > const | invert_profiles (profile_classes const &classes) |
Classify and process a list of candidate sample files into merged sets and classes.
Definition in file arrange_profiles.cpp.
profile_classes const arrange_profiles | ( | list< string > const & | files, | |
merge_option const & | merge_by, | |||
extra_images const & | extra | |||
) |
Definition at line 649 of file arrange_profiles.cpp.
References profile_classes::extra_found_images, parsed_filename::image, merge_option::lib, parsed_filename::lib_image, parse_filename(), profile_classes::v, and want_xml.
Referenced by handle_options().
list<inverted_profile> const invert_profiles | ( | profile_classes const & | classes | ) |
Invert the profile set. For opreport -l, opannotate etc., processing the profile_classes directly is slow, because we end up opening BFDs multiple times (for each class, dependent images etc.). This function returns an inverted set of sample files, where the primary sort is on the binary image to open.
Thus each element in the returned list is for exactly one binary file that we're going to bfd_openr(). Attached to that is the actual sample files we need to process for that binary file. In order to get the output right, these have to be marked with the profile class they're from (hence the groups vector), and the app image that owned the sample file, if applicable (hence image_set).
Definition at line 827 of file arrange_profiles.cpp.
References profile_classes::extra_found_images, inverted_profile::groups, and profile_classes::v.
bool operator< | ( | profile_class const & | lhs, | |
profile_class const & | rhs | |||
) |
Definition at line 56 of file arrange_profiles.cpp.
References profile_template::count, profile_template::cpu, profile_template::event, profile_class::ptemplate, profile_template::tgid, profile_template::tid, profile_template::unitmask, and want_xml.
ostream& operator<< | ( | ostream & | out, | |
profile_classes const & | pclasses | |||
) |
Definition at line 765 of file arrange_profiles.cpp.
References profile_classes::cpuinfo, profile_classes::event, and profile_classes::v.
ostream& operator<< | ( | ostream & | out, | |
profile_class const & | pclass | |||
) |
Definition at line 750 of file arrange_profiles.cpp.
References profile_class::longname, profile_class::name, profile_class::profiles, and profile_class::ptemplate.
ostream& operator<< | ( | ostream & | out, | |
profile_template const & | ptemplate | |||
) |
Definition at line 739 of file arrange_profiles.cpp.
References profile_template::count, profile_template::cpu, profile_template::event, profile_template::tgid, profile_template::tid, and profile_template::unitmask.
ostream& operator<< | ( | ostream & | out, | |
profile_set const & | pset | |||
) |
Definition at line 719 of file arrange_profiles.cpp.
References profile_set::deps, profile_set::files, and profile_set::image.
ostream& operator<< | ( | ostream & | out, | |
profile_dep_set const & | pdep_set | |||
) |
Definition at line 705 of file arrange_profiles.cpp.
References profile_dep_set::files, and profile_dep_set::lib_image.
ostream& operator<< | ( | ostream & | out, | |
profile_sample_files const & | sample_files | |||
) |
Definition at line 696 of file arrange_profiles.cpp.
References profile_sample_files::cg_files, and profile_sample_files::sample_filename.