PAPI  5.6.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
9 typedef 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 
25 typedef 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  int cidx; /* current component */
34  int cpu; /* which cpu to measure */
35  pid_t tid; /* thread we are monitoring */
37  long long counts[PERF_EVENT_MAX_MPX_COUNTERS];
38 } pe_control_t;
39 
40 
41 typedef struct {
42  int initialized; /* are we initialized? */
43  int state; /* are we opened and/or running? */
44  int cidx; /* our component id */
45  struct native_event_table_t *event_table; /* our event table */
46 } pe_context_t;
47 
48 
#define PERF_EVENT_MAX_MPX_COUNTERS
Definition: perf_event_lib.h:5
unsigned int granularity
uint32_t nr_mmap_pages
unsigned int domain
char events[MAX_EVENTS][BUFSIZ]
unsigned int overflow
unsigned int multiplexed
struct native_event_table_t * event_table
unsigned int overflow_signal
unsigned int inherit
pthread_attr_t attr
Definition: iozone.c:18466