26 #include <asm/unistd.h> 29 #include <sys/ioctl.h> 40 _perf_config.type = PERF_TYPE_HARDWARE;
41 _perf_config.size =
sizeof(perf_event_attr);
44 _perf_config.disabled = 1;
47 _perf_config.inherit = 1;
49 _perf_config.inherit_stat = 1;
65 _perf_config.config = config;
72 _fd = syscall(__NR_perf_event_open, &perf_config, 0, -1, -1, 0);
76 const int result = ioctl(_fd, PERF_EVENT_IOC_ENABLE, 0);
94 const int result = ioctl(_fd, PERF_EVENT_IOC_RESET, 0);
#define ARM_COMPUTE_ERROR(...)
Print the given message then throw an std::runtime_error.
void close()
Close the currently open counter.
Class provides access to CPU hardware counters.
void open(uint64_t config)
Open the specified counter based on the default configuration.
This file contains all available output stages for GEMMLowp on OpenCL.
~PMU()
Default destructor.
void reset()
Reset counter.
PMU()
Default constructor.
#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)