arrange_profiles.cpp File Reference

Classify and process a list of candidate sample files into merged sets and classes. More...

#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"
Include dependency graph for arrange_profiles.cpp:


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)
 Invert the profile set.

Detailed Description

Classify and process a list of candidate sample files into merged sets and classes.

Copyright 2003 OProfile authors
Read the file COPYING
John Levon

Function Documentation

profile_classes const arrange_profiles ( list< string > const &  files,
merge_option const &  merge_by,
extra_images const &  extra 
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).

References profile_classes::extra_found_images, inverted_profile::groups, and profile_classes::v.

bool operator< ( profile_class const &  lhs,
profile_class const &  rhs 
ostream& operator<< ( ostream &  out,
profile_classes const &  pclasses 
ostream& operator<< ( ostream &  out,
profile_class const &  pclass 
ostream& operator<< ( ostream &  out,
profile_template const &  ptemplate 
ostream& operator<< ( ostream &  out,
profile_set const &  pset 
ostream& operator<< ( ostream &  out,
profile_dep_set const &  pdep_set 
ostream& operator<< ( ostream &  out,
profile_sample_files const &  sample_files 

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1