filename_spec Class Reference

#include <filename_spec.h>

Collaboration diagram for filename_spec:
Collaboration graph
[legend]

Public Member Functions

 filename_spec (std::string const &filename, extra_images const &extra)
 filename_spec ()
void set_sample_filename (std::string const &filename, extra_images const &extra)
bool match (filename_spec const &rhs, std::string const &binary) const
bool is_dependent () const

Private Attributes

std::string image
std::string lib_image
std::string cg_image
std::string event
int count
unsigned int unitmask
generic_spec< pid_t > tgid
generic_spec< pid_t > tid
generic_spec< int > cpu

Friends

class profile_spec

Detailed Description

A class to split and store components of a sample filename. These derived values are then used to match against a profile_spec as given by the user.

Definition at line 27 of file filename_spec.h.


Constructor & Destructor Documentation

filename_spec::filename_spec ( std::string const &  filename,
extra_images const &  extra 
)
Parameters:
filename the samples filename
extra extra binary image location

build a filename_spec from a samples filename

filename_spec::filename_spec (  ) 

Definition at line 29 of file filename_spec.cpp.


Member Function Documentation

bool filename_spec::is_dependent (  )  const

Definition at line 76 of file filename_spec.cpp.

References cg_image, image, and lib_image.

bool filename_spec::match ( filename_spec const &  rhs,
std::string const &  binary 
) const
Parameters:
rhs right hand side of the match operator
binary if binary is non-empty, and matches the binary or lib name, use it rather than the one in rhs.

return true if *this match rhs, matching if:

  • image_name are identical
  • lib_name are identical
  • event_spec match

This operation is not commutative. First part of PP:3.24

void filename_spec::set_sample_filename ( std::string const &  filename,
extra_images const &  extra 
)
Parameters:
filename a sample filename
extra extra binary image location

setup filename spec according to the samples filename. PP:3.19 to 3.25


Friends And Related Function Documentation

friend class profile_spec [friend]

Definition at line 29 of file filename_spec.h.


Field Documentation

std::string filename_spec::cg_image [private]

Definition at line 74 of file filename_spec.h.

Referenced by is_dependent().

int filename_spec::count [private]

Definition at line 76 of file filename_spec.h.

Referenced by profile_spec::match().

Definition at line 80 of file filename_spec.h.

Referenced by profile_spec::match().

std::string filename_spec::event [private]

Definition at line 75 of file filename_spec.h.

Referenced by profile_spec::match().

std::string filename_spec::image [private]

Definition at line 72 of file filename_spec.h.

Referenced by is_dependent(), and profile_spec::match().

std::string filename_spec::lib_image [private]

Definition at line 73 of file filename_spec.h.

Referenced by is_dependent(), and profile_spec::match().

Definition at line 78 of file filename_spec.h.

Referenced by profile_spec::match().

generic_spec<pid_t> filename_spec::tid [private]

Definition at line 79 of file filename_spec.h.

Referenced by profile_spec::match().

unsigned int filename_spec::unitmask [private]

Definition at line 77 of file filename_spec.h.

Referenced by profile_spec::match().


The documentation for this class was generated from the following files:

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1