profile_t Class Reference

Class containing a single sample file contents. More...

#include <profile.h>

Inheritance diagram for profile_t:
Inheritance graph
[legend]
Collaboration diagram for profile_t:
Collaboration graph
[legend]

List of all members.

Classes

class  const_iterator

Public Types

typedef std::pair
< const_iterator,
const_iterator
iterator_pair

Public Member Functions

 profile_t ()
 profile_t - construct an empty profile_t object
bool empty () const
 return true if no sample file has been loaded
opd_header const & get_header () const
 return the header of the last opened samples file
void add_sample_file (std::string const &filename)
 cumulate sample file to our container of samples
void set_offset (op_bfd const &abfd)
 Set an appropriate start offset, see comments below.
u64 get_offset (void) const
iterator_pair samples_range (odb_key_t start, odb_key_t end) const
iterator_pair samples_range () const
 return a pair of iterator for all samples

Static Public Member Functions

static count_type sample_count (std::string const &filename)
 count samples count w/o recording them
static enum profile_type is_spu_sample_file (std::string const &filename)
 Indicate if given sample file is from a Cell Broadband Engine SPU profile.

Detailed Description

Class containing a single sample file contents.

i.e. set of count values for VMA offsets for a particular binary.


Member Typedef Documentation


Constructor & Destructor Documentation

profile_t::profile_t (  ) 

profile_t - construct an empty profile_t object


Member Function Documentation

void profile_t::add_sample_file ( std::string const &  filename  ) 

cumulate sample file to our container of samples

Parameters:
filename sample file name

store samples for one sample file, sample file header is sanitized.

all error are fatal

bool profile_t::empty (  )  const [inline]

return true if no sample file has been loaded

References scoped_ptr< T >::get().

opd_header const& profile_t::get_header (  )  const [inline]

return the header of the last opened samples file

Referenced by populate_for_image(), and set_offset().

u64 profile_t::get_offset ( void   )  const [inline]
static enum profile_type profile_t::is_spu_sample_file ( std::string const &  filename  )  [static]

Indicate if given sample file is from a Cell Broadband Engine SPU profile.

Parameters:
filename sample filename

Convenience interface put here so all access to samples files go through profile_t static or non static member.

Referenced by is_spu_profile().

static count_type profile_t::sample_count ( std::string const &  filename  )  [static]

count samples count w/o recording them

Parameters:
filename sample filename

convenience interface for raw access to sample count w/o recording them. It's placed here so all access to samples files go through profile_t static or non static member.

profile_t::iterator_pair profile_t::samples_range (  )  const

return a pair of iterator for all samples

profile_t::iterator_pair profile_t::samples_range ( odb_key_t  start,
odb_key_t  end 
) const
Parameters:
start start offset
end end offset

return an iterator pair to [start, end) range

void profile_t::set_offset ( op_bfd const &  abfd  ) 

Set an appropriate start offset, see comments below.

References opd_header::anon_start, cverb, get_header(), op_bfd::get_start_offset(), opd_header::is_kernel, op_bfd::valid(), and vdebug.


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

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1