#include <operf_process_info.h>
Definition at line 52 of file operf_process_info.h.
enum operf_process_info::op_fullname_t [private] |
Definition at line 99 of file operf_process_info.h.
operf_process_info::operf_process_info | ( | pid_t | tgid, | |
const char * | appname, | |||
bool | app_arg_is_fullname, | |||
bool | is_valid | |||
) |
Definition at line 25 of file operf_process_info.cpp.
References app_basename, appname_is_fullname, forked, MAYBE_FULLNAME, NOT_FULLNAME, num_app_chars_matched, op_basename(), parent_of_fork, and YES_FULLNAME.
operf_process_info::~operf_process_info | ( | void | ) |
Definition at line 45 of file operf_process_info.cpp.
References deferred_mmappings, mmappings, and valid.
void operf_process_info::add_deferred_mapping | ( | struct operf_mmap * | mapping | ) | [inline] |
Definition at line 70 of file operf_process_info.h.
References deferred_mmappings, and operf_mmap::start_addr.
Referenced by __handle_mmap_event(), and process_hypervisor_mapping().
void operf_process_info::add_forked_pid_association | ( | operf_process_info * | forked_pid | ) | [inline] |
Definition at line 64 of file operf_process_info.h.
References forked_processes.
Referenced by __handle_fork_event().
void operf_process_info::connect_forked_process_to_parent | ( | operf_process_info * | parent | ) |
Definition at line 244 of file operf_process_info.cpp.
References _appname, appname_is_fullname, copy_mappings_to_forked_process(), forked, get_app_name(), is_appname_valid(), is_valid(), MAYBE_FULLNAME, NOT_FULLNAME, num_app_chars_matched, op_basename(), parent_of_fork, valid, and YES_FULLNAME.
Referenced by __handle_fork_event(), and process_deferred_forked_processes().
void operf_process_info::copy_mappings_to_forked_process | ( | operf_process_info * | forked_pid | ) |
Definition at line 230 of file operf_process_info.cpp.
References mmappings, and process_new_mapping().
Referenced by connect_forked_process_to_parent().
void operf_process_info::copy_new_parent_mapping | ( | struct operf_mmap * | mapping | ) | [inline] |
Definition at line 62 of file operf_process_info.h.
References mmappings, and operf_mmap::start_addr.
Referenced by process_new_mapping().
void operf_process_info::disassociate_from_parent | ( | char * | appname | ) |
Definition at line 299 of file operf_process_info.cpp.
References _appname, appname_is_fullname, mmappings, NOT_FULLNAME, num_app_chars_matched, parent_of_fork, pid, process_new_mapping(), remove_forked_process(), and valid.
struct operf_mmap * operf_process_info::find_mapping_for_sample | ( | u64 | sample_addr | ) | [read] |
Definition at line 144 of file operf_process_info.cpp.
References mmappings.
Referenced by __get_operf_trans().
std::string operf_process_info::get_app_name | ( | void | ) | [inline] |
Definition at line 69 of file operf_process_info.h.
References _appname.
Referenced by __get_operf_trans(), __handle_fork_event(), and connect_forked_process_to_parent().
int operf_process_info::get_num_matching_chars | ( | std::string | mapped_filename, | |
std::string & | basename | |||
) | [private] |
bool operf_process_info::is_appname_valid | ( | void | ) | [inline] |
Definition at line 83 of file operf_process_info.h.
References appname_is_fullname, MAYBE_FULLNAME, num_app_chars_matched, valid, and YES_FULLNAME.
Referenced by __handle_fork_event(), and connect_forked_process_to_parent().
bool operf_process_info::is_forked | ( | void | ) | [inline] |
Definition at line 57 of file operf_process_info.h.
References forked.
bool operf_process_info::is_valid | ( | void | ) | [inline] |
Definition at line 56 of file operf_process_info.h.
References valid.
Referenced by __handle_fork_event(), and connect_forked_process_to_parent().
void operf_process_info::process_deferred_forked_processes | ( | void | ) | [private] |
Definition at line 268 of file operf_process_info.cpp.
References connect_forked_process_to_parent(), cverb, forked_processes, pid, and vmisc.
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:
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.
Definition at line 173 of file operf_process_info.cpp.
References add_deferred_mapping(), cverb, deferred_mmappings, operf_mmap::end_addr, operf_mmap::filename, operf_mmap::is_anon_mapping, operf_mmap::is_hypervisor, mmappings, operf_mmap::pgoff, process_new_mapping(), operf_mmap::start_addr, valid, and vmisc.
Referenced by __map_hypervisor_sample().
void operf_process_info::process_new_mapping | ( | struct operf_mmap * | mapping | ) |
Definition at line 61 of file operf_process_info.cpp.
References _appname, app_basename, appname_is_fullname, copy_new_parent_mapping(), cverb, operf_mmap::filename, forked_processes, get_num_matching_chars(), operf_mmap::is_anon_mapping, MAYBE_FULLNAME, mmappings, num_app_chars_matched, pid, operf_mmap::start_addr, vmisc, and YES_FULLNAME.
Referenced by copy_mappings_to_forked_process(), disassociate_from_parent(), and process_hypervisor_mapping().
void operf_process_info::remove_forked_process | ( | pid_t | forked_pid | ) |
Definition at line 279 of file operf_process_info.cpp.
References forked_processes.
Referenced by disassociate_from_parent().
std::string operf_process_info::_appname [private] |
Definition at line 105 of file operf_process_info.h.
Referenced by connect_forked_process_to_parent(), disassociate_from_parent(), get_app_name(), and process_new_mapping().
std::string operf_process_info::app_basename [private] |
Definition at line 109 of file operf_process_info.h.
Referenced by operf_process_info(), and process_new_mapping().
Definition at line 108 of file operf_process_info.h.
Referenced by connect_forked_process_to_parent(), disassociate_from_parent(), is_appname_valid(), operf_process_info(), and process_new_mapping().
std::map<u64, struct operf_mmap *> operf_process_info::deferred_mmappings [private] |
Definition at line 112 of file operf_process_info.h.
Referenced by add_deferred_mapping(), process_hypervisor_mapping(), and ~operf_process_info().
bool operf_process_info::forked [private] |
Definition at line 107 of file operf_process_info.h.
Referenced by connect_forked_process_to_parent(), is_forked(), and operf_process_info().
std::vector<operf_process_info *> operf_process_info::forked_processes [private] |
Definition at line 120 of file operf_process_info.h.
Referenced by add_forked_pid_association(), process_deferred_forked_processes(), process_new_mapping(), and remove_forked_process().
std::map<u64, struct operf_mmap *> operf_process_info::mmappings [private] |
Definition at line 111 of file operf_process_info.h.
Referenced by copy_mappings_to_forked_process(), copy_new_parent_mapping(), disassociate_from_parent(), find_mapping_for_sample(), process_hypervisor_mapping(), process_new_mapping(), and ~operf_process_info().
int operf_process_info::num_app_chars_matched [private] |
Definition at line 110 of file operf_process_info.h.
Referenced by connect_forked_process_to_parent(), disassociate_from_parent(), is_appname_valid(), operf_process_info(), and process_new_mapping().
Definition at line 121 of file operf_process_info.h.
Referenced by connect_forked_process_to_parent(), disassociate_from_parent(), and operf_process_info().
pid_t operf_process_info::pid [private] |
Definition at line 104 of file operf_process_info.h.
Referenced by __handle_comm_event(), __handle_fork_event(), disassociate_from_parent(), process_deferred_forked_processes(), and process_new_mapping().
bool operf_process_info::valid [private] |
Definition at line 106 of file operf_process_info.h.
Referenced by connect_forked_process_to_parent(), disassociate_from_parent(), is_appname_valid(), is_valid(), process_hypervisor_mapping(), and ~operf_process_info().