21.02
|
Class provides access to CPU hardware counters. More...
#include <PMU.h>
Public Member Functions | |
PMU () | |
Default constructor. More... | |
PMU (uint64_t config) | |
Create PMU with specified counter. More... | |
~PMU () | |
Default destructor. More... | |
template<typename T > | |
T | get_value () const |
Get the counter value. More... | |
void | open (uint64_t config) |
Open the specified counter based on the default configuration. More... | |
void | open (const perf_event_attr &perf_config) |
Open the specified configuration. More... | |
void | close () |
Close the currently open counter. More... | |
void | reset () |
Reset counter. More... | |
|
explicit |
Create PMU with specified counter.
This constructor automatically calls open with the default configuration.
[in] | config | Counter identifier. |
Definition at line 52 of file PMU.cpp.
References PMU::open().
~PMU | ( | ) |
Default destructor.
Definition at line 58 of file PMU.cpp.
References PMU::close().
void close | ( | ) |
Close the currently open counter.
Definition at line 83 of file PMU.cpp.
Referenced by PMU::~PMU().
T get_value | ( | ) | const |
Get the counter value.
Definition at line 91 of file PMU.h.
Referenced by PMUCounter::stop().
void open | ( | uint64_t | config | ) |
Open the specified counter based on the default configuration.
[in] | config | The default configuration. |
Definition at line 63 of file PMU.cpp.
Referenced by PMU::PMU().
void open | ( | const perf_event_attr & | perf_config | ) |
Open the specified configuration.
[in] | perf_config | The specified configuration. |
Definition at line 69 of file PMU.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, and ARM_COMPUTE_ERROR_VAR.
void reset | ( | ) |
Reset counter.
Definition at line 92 of file PMU.cpp.
References ARM_COMPUTE_ERROR_VAR.
Referenced by PMUCounter::start().