arrange_profiles.cpp File Reference

#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:

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)

Detailed Description

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

Remarks:
Copyright 2003 OProfile authors
Read the file COPYING
Author:
John Levon

Definition in file arrange_profiles.cpp.


Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)
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 
)

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 
)

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1