arrange_profiles.h File Reference

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

#include <string>
#include <list>
#include <vector>
#include <iosfwd>
#include "image_errors.h"
#include "locate_images.h"
Include dependency graph for arrange_profiles.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  merge_option
 store merging options options used to classify profiles More...
struct  profile_template
 This describes which parameters are set for each equivalence class. More...
struct  profile_sample_files
 A samples filename + its associated callgraph sample filename. More...
struct  profile_dep_set
 A number of profiles files that are all dependent on the same main (application) profile, for the same dependent image. More...
struct  profile_set
 A number of profile files all for the same binary with the same profile specification (after merging). More...
struct  profile_class
 A class collection of profiles. More...
struct  profile_classes
struct  image_set
 A set of sample files where the image binary to open are all the same. More...
struct  inverted_profile
 All sample files where the binary image to open is the same. More...

Typedefs

typedef std::list< image_setimage_group_set

Enumerations

enum  axis_types {
  AXIS_EVENT, AXIS_TGID, AXIS_TID, AXIS_CPU,
  AXIS_MAX
}
 

The "axis" says what we've used to split the sample files into the classes.

More...

Functions

std::ostream & operator<< (std::ostream &, profile_sample_files const &)
std::ostream & operator<< (std::ostream &, profile_dep_set const &)
std::ostream & operator<< (std::ostream &, profile_set const &)
std::ostream & operator<< (std::ostream &, profile_template const &)
std::ostream & operator<< (std::ostream &, profile_class const &)
std::ostream & operator<< (std::ostream &, profile_classes const &)
profile_classes const arrange_profiles (std::list< std::string > const &files, merge_option const &merge_by, extra_images const &extra)
 Take a list of sample filenames, and process them into a set of classes containing profile_sets.
std::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.

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

Typedef Documentation

typedef std::list<image_set> image_group_set

Enumeration Type Documentation

enum axis_types

The "axis" says what we've used to split the sample files into the classes.

Only one is allowed.

Enumerator:
AXIS_EVENT 
AXIS_TGID 
AXIS_TID 
AXIS_CPU 
AXIS_MAX 

Function Documentation

profile_classes const arrange_profiles ( std::list< std::string > const &  files,
merge_option const &  merge_by,
extra_images const &  extra 
)

Take a list of sample filenames, and process them into a set of classes containing profile_sets.

Merging is done at this stage as well as attaching dependent profiles to the main image.

The classes correspond to the columns you'll get in opreport: this can be a number of events, or different CPUs, etc.

std::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.

std::ostream& operator<< ( std::ostream &  ,
profile_classes const &   
)
std::ostream& operator<< ( std::ostream &  ,
profile_class const &   
)
std::ostream& operator<< ( std::ostream &  ,
profile_template const &   
)
std::ostream& operator<< ( std::ostream &  ,
profile_set const &   
)
std::ostream& operator<< ( std::ostream &  ,
profile_dep_set const &   
)
std::ostream& operator<< ( std::ostream &  ,
profile_sample_files const &   
)

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1