arrange_profiles.h File Reference

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

Data Structures

struct  merge_option
struct  profile_template
struct  profile_sample_files
struct  profile_dep_set
struct  profile_set
struct  profile_class
struct  profile_classes
struct  image_set
struct  inverted_profile

Typedefs

typedef std::list< image_setimage_group_set

Enumerations

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

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


Typedef Documentation

typedef std::list<image_set> image_group_set

Definition at line 195 of file arrange_profiles.h.


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 

Definition at line 124 of file arrange_profiles.h.


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

Definition at line 827 of file arrange_profiles.cpp.

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 8 Nov 2012 for Oprofile by  doxygen 1.6.1