#include <operf_counter.h>
Public Member Functions | |
operf_counter (operf_event_t &evt, bool enable_on_exec, bool callgraph, bool separate_by_cpu) | |
~operf_counter () | |
int | perf_event_open (pid_t ppid, int cpu, unsigned counter, operf_record *pr) |
struct perf_event_attr * | the_attr (void) const |
int | get_fd (void) const |
int | get_id (void) const |
const std::string | get_event_name (void) const |
Private Attributes | |
struct perf_event_attr | attr |
int | fd |
int | id |
std::string | event_name |
Definition at line 56 of file operf_counter.h.
operf_counter::operf_counter | ( | operf_event_t & | evt, | |
bool | enable_on_exec, | |||
bool | callgraph, | |||
bool | separate_by_cpu | |||
) |
Definition at line 157 of file operf_counter.cpp.
References attr, operf_event::count, event_name, operf_event::evt_code, fd, operf_event::name, operf_event::no_hv, operf_event::no_kernel, and OP_BASIC_SAMPLE_FORMAT.
operf_counter::~operf_counter | ( | ) |
Definition at line 181 of file operf_counter.cpp.
const std::string operf_counter::get_event_name | ( | void | ) | const [inline] |
Definition at line 65 of file operf_counter.h.
References event_name.
int operf_counter::get_fd | ( | void | ) | const [inline] |
Definition at line 63 of file operf_counter.h.
References fd.
int operf_counter::get_id | ( | void | ) | const [inline] |
Definition at line 64 of file operf_counter.h.
References id.
int operf_counter::perf_event_open | ( | pid_t | ppid, | |
int | cpu, | |||
unsigned | counter, | |||
operf_record * | pr | |||
) |
Definition at line 185 of file operf_counter.cpp.
References attr, cverb, fd, id, op_perf_event_open(), OP_PERF_HANDLED_ERROR, operf_record::register_perf_event_id(), and vrecord.
struct perf_event_attr* operf_counter::the_attr | ( | void | ) | const [inline, read] |
Definition at line 62 of file operf_counter.h.
References attr.
struct perf_event_attr operf_counter::attr [read, private] |
Definition at line 68 of file operf_counter.h.
Referenced by operf_counter(), perf_event_open(), and the_attr().
std::string operf_counter::event_name [private] |
Definition at line 71 of file operf_counter.h.
Referenced by get_event_name(), and operf_counter().
int operf_counter::fd [private] |
Definition at line 69 of file operf_counter.h.
Referenced by get_fd(), operf_counter(), and perf_event_open().
int operf_counter::id [private] |
Definition at line 70 of file operf_counter.h.
Referenced by get_id(), and perf_event_open().