operf_counter Class Reference

#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

Detailed Description

Definition at line 56 of file operf_counter.h.


Constructor & Destructor Documentation

operf_counter::operf_counter ( operf_event_t evt,
bool  enable_on_exec,
bool  callgraph,
bool  separate_by_cpu 
)
operf_counter::~operf_counter (  ) 

Definition at line 181 of file operf_counter.cpp.


Member Function Documentation

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.

Here is the call graph for this function:

struct perf_event_attr* operf_counter::the_attr ( void   )  const [inline, read]

Definition at line 62 of file operf_counter.h.

References attr.


Field Documentation

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().


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

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1