operf_process_info Class Reference

#include <operf_process_info.h>

Collaboration diagram for operf_process_info:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 operf_process_info (pid_t tgid, const char *appname, bool app_arg_is_fullname, bool is_valid)
 ~operf_process_info (void)
bool is_valid (void)
bool is_appname_valid (void)
void set_valid (void)
void set_appname_valid (void)
bool is_forked (void)
void process_mapping (struct operf_mmap *mapping, bool do_self)
void process_hypervisor_mapping (u64 ip)
 Hypervisor samples cannot be attributed to any real binary, so we synthesize an operf_mmap object with the name of "[hypervisor_bucket]".
void connect_forked_process_to_parent (void)
void set_fork_info (operf_process_info *parent)
void add_forked_pid_association (operf_process_info *forked_pid)
void copy_mappings_to_forked_process (operf_process_info *forked_pid)
void try_disassociate_from_parent (char *appname)
void remove_forked_process (pid_t forked_pid)
std::string get_app_name (void)
struct operf_mmapfind_mapping_for_sample (u64 sample_addr)
void set_appname (const char *appname, bool app_arg_is_fullname)
void check_mapping_for_appname (struct operf_mmap *mapping)

Constructor & Destructor Documentation

operf_process_info::operf_process_info ( pid_t  tgid,
const char *  appname,
bool  app_arg_is_fullname,
bool  is_valid 
)

References set_appname().

operf_process_info::~operf_process_info ( void   ) 

Member Function Documentation

void operf_process_info::add_forked_pid_association ( operf_process_info forked_pid  )  [inline]

Referenced by set_fork_info().

void operf_process_info::check_mapping_for_appname ( struct operf_mmap mapping  ) 
void operf_process_info::connect_forked_process_to_parent ( void   ) 
void operf_process_info::copy_mappings_to_forked_process ( operf_process_info forked_pid  ) 

References process_mapping().

Referenced by set_fork_info().

struct operf_mmap * operf_process_info::find_mapping_for_sample ( u64  sample_addr  )  [read]
std::string operf_process_info::get_app_name ( void   )  [inline]
bool operf_process_info::is_appname_valid ( void   )  [inline]
bool operf_process_info::is_forked ( void   )  [inline]

Referenced by process_mapping().

bool operf_process_info::is_valid ( void   )  [inline]
void operf_process_info::process_hypervisor_mapping ( u64  ip  ) 

Hypervisor samples cannot be attributed to any real binary, so we synthesize an operf_mmap object with the name of "[hypervisor_bucket]".

We mark this mmaping as "is_anon" so that hypervisor samples are handled in the same way as anon samples (and vdso, heap, and stack) -- i.e., a sample file is created with the following pieces of information in its name:

  • [hypervisor_bucket]
  • PID
  • address range

The address range part is problematic for hypervisor samples, since we don't know the range of sample addresses until we process all the samples. This is why we need to adjust the hypervisor_mmaping when we detect an ip that's outside of the current address range. This is also why we defer processing hypervisor samples the first time through the processing of sample data. See operf_utils::__handle_sample_event for details relating to how we defer processing of such samples.

References cverb, operf_mmap::end_addr, operf_mmap::filename, operf_mmap::is_anon_mapping, operf_mmap::is_hypervisor, operf_mmap::pgoff, process_mapping(), operf_mmap::start_addr, and vmisc.

void operf_process_info::process_mapping ( struct operf_mmap mapping,
bool  do_self 
)
void operf_process_info::remove_forked_process ( pid_t  forked_pid  ) 
void operf_process_info::set_appname ( const char *  appname,
bool  app_arg_is_fullname 
)
void operf_process_info::set_appname_valid ( void   )  [inline]
void operf_process_info::set_fork_info ( operf_process_info parent  ) 
void operf_process_info::set_valid ( void   )  [inline]
void operf_process_info::try_disassociate_from_parent ( char *  appname  ) 

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

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1