PAPI 7.1.0.0
Loading...
Searching...
No Matches
perf_event_lib.h
Go to the documentation of this file.
1/* Various definitions */
2
3/* This is arbitrary. Typically you can add up to ~1000 before */
4/* you run out of fds */
5#define PERF_EVENT_MAX_MPX_COUNTERS 384
6
7/* We really don't need fancy definitions for these */
8
9typedef struct
10{
11 int group_leader_fd; /* fd of group leader */
12 int event_fd; /* fd of event */
13 int event_opened; /* event successfully opened */
14 int profiling; /* event is profiling */
15 int sampling; /* event is a sampling event */
16 uint32_t nr_mmap_pages; /* number pages in the mmap buffer */
17 void *mmap_buf; /* used for control/profiling */
18 uint64_t tail; /* current read location in mmap buffer */
19 uint64_t mask; /* mask used for wrapping the pages */
20 int cpu; /* cpu associated with this event */
21 struct perf_event_attr attr; /* perf_event config structure */
23
24
25typedef struct {
26 int num_events; /* number of events in control state */
27 unsigned int domain; /* control-state wide domain */
28 unsigned int granularity; /* granularity */
29 unsigned int multiplexed; /* multiplexing enable */
30 unsigned int overflow; /* overflow enable */
31 unsigned int inherit; /* inherit enable */
32 unsigned int overflow_signal; /* overflow signal */
33 unsigned int attached; /* attached to a process */
34 int cidx; /* current component */
35 int cpu; /* which cpu to measure */
36 pid_t tid; /* thread we are monitoring */
38 long long counts[PERF_EVENT_MAX_MPX_COUNTERS];
39 unsigned int reset_flag;
40 long long reset_counts[PERF_EVENT_MAX_MPX_COUNTERS];
42
43
44typedef struct {
45 int initialized; /* are we initialized? */
46 int state; /* are we opened and/or running? */
47 int cidx; /* our component id */
48 struct native_event_table_t *event_table; /* our event table */
50
51
char events[MAX_EVENTS][BUFSIZ]
#define PERF_EVENT_MAX_MPX_COUNTERS
Definition: perf_event_lib.h:5
struct native_event_table_t * event_table
unsigned int attached
unsigned int overflow_signal
unsigned int reset_flag
unsigned int overflow
unsigned int granularity
unsigned int multiplexed
unsigned int domain
unsigned int inherit
uint32_t nr_mmap_pages