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_forked (void)
void process_new_mapping (struct operf_mmap *mapping)
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 process_deferred_mappings (std::string app_shortname)
void connect_forked_process_to_parent (operf_process_info *parent)
void copy_new_parent_mapping (struct operf_mmap *mapping)
void add_forked_pid_association (operf_process_info *forked_pid)
void copy_mappings_to_forked_process (operf_process_info *forked_pid)
void disassociate_from_parent (char *appname)
void remove_forked_process (pid_t forked_pid)
std::string get_app_name (void)
void add_deferred_mapping (struct operf_mmap *mapping)
struct operf_mmapfind_mapping_for_sample (u64 sample_addr)
bool is_appname_valid (void)

Constructor & Destructor Documentation

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

References op_basename().

operf_process_info::~operf_process_info ( void   ) 

Member Function Documentation

void operf_process_info::add_deferred_mapping ( struct operf_mmap mapping  )  [inline]
void operf_process_info::add_forked_pid_association ( operf_process_info forked_pid  )  [inline]
void operf_process_info::connect_forked_process_to_parent ( operf_process_info parent  ) 
void operf_process_info::copy_mappings_to_forked_process ( operf_process_info forked_pid  ) 
void operf_process_info::copy_new_parent_mapping ( struct operf_mmap mapping  )  [inline]

References operf_mmap::start_addr.

Referenced by process_new_mapping().

void operf_process_info::disassociate_from_parent ( char *  appname  ) 
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]
bool operf_process_info::is_valid ( void   )  [inline]
void operf_process_info::process_deferred_mappings ( std::string  app_shortname  ) 
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 add_deferred_mapping(), cverb, operf_mmap::end_addr, operf_mmap::filename, operf_mmap::is_anon_mapping, operf_mmap::is_hypervisor, operf_mmap::pgoff, process_new_mapping(), operf_mmap::start_addr, and vmisc.

void operf_process_info::process_new_mapping ( struct operf_mmap mapping  ) 
void operf_process_info::remove_forked_process ( pid_t  forked_pid  ) 

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

Generated on 27 Aug 2012 for oprofile by  doxygen 1.6.1