PAPI
7.1.0.0
Loading...
Searching...
No Matches
linux-L2unit.h
Go to the documentation of this file.
1
/****************************/
2
/* THIS IS OPEN SOURCE CODE */
3
/****************************/
4
20
#ifndef _PAPI_L2UNIT_H
21
#define _PAPI_L2UNIT_H
22
23
#include "
papi.h
"
24
#include "
papi_internal.h
"
25
#include "
papi_vector.h
"
26
#include "
papi_memory.h
"
27
#include "
extras.h
"
28
#include "../../../linux-bgq-common.h"
29
30
31
/************************* DEFINES SECTION ***********************************
32
*******************************************************************************/
33
34
/* this number assumes that there will never be more events than indicated */
35
#define L2UNIT_MAX_COUNTERS UPC_L2_NUM_COUNTERS
36
#define L2UNIT_MAX_EVENTS PEVT_L2UNIT_LAST_EVENT
37
#define OFFSET ( PEVT_PUNIT_LAST_EVENT + 1 )
38
39
/* Stores private information for each event */
40
typedef
struct
L2UNIT_register
41
{
42
unsigned
int
selector
;
43
/* Signifies which counter slot is being used */
44
/* Indexed from 1 as 0 has a special meaning */
45
}
L2UNIT_register_t
;
46
47
48
/* Used when doing register allocation */
49
typedef
struct
L2UNIT_reg_alloc
50
{
51
L2UNIT_register_t
ra_bits
;
52
}
L2UNIT_reg_alloc_t
;
53
54
typedef
struct
L2UNIT_overflow
55
{
56
int
threshold
;
57
int
EventIndex
;
58
}
L2UNIT_overflow_t
;
59
60
/* Holds control flags */
61
typedef
struct
L2UNIT_control_state
62
{
63
int
EventGroup
;
64
int
EventGroup_local[512];
65
int
count
;
66
long
long
counters[
L2UNIT_MAX_COUNTERS
];
67
int
overflow
;
// overflow enable
68
int
overflow_count
;
69
L2UNIT_overflow_t
overflow_list[512];
70
int
bgpm_eventset_applied
;
// BGPM eventGroup applied yes or no flag
71
}
L2UNIT_control_state_t
;
72
73
74
/* Holds per-thread information */
75
typedef
struct
L2UNIT_context
76
{
77
L2UNIT_control_state_t
state
;
78
}
L2UNIT_context_t
;
79
80
81
#endif
/* _PAPI_L2UNIT_H */
extras.h
L2UNIT_MAX_COUNTERS
#define L2UNIT_MAX_COUNTERS
Definition:
linux-L2unit.h:35
papi.h
Return codes and api definitions.
papi_internal.h
papi_memory.h
papi_vector.h
L2UNIT_context_t
Definition:
linux-L2unit.h:76
L2UNIT_context_t::state
L2UNIT_control_state_t state
Definition:
linux-L2unit.h:77
L2UNIT_control_state_t
Definition:
linux-L2unit.h:62
L2UNIT_control_state_t::count
int count
Definition:
linux-L2unit.h:65
L2UNIT_control_state_t::bgpm_eventset_applied
int bgpm_eventset_applied
Definition:
linux-L2unit.h:70
L2UNIT_control_state_t::overflow
int overflow
Definition:
linux-L2unit.h:67
L2UNIT_control_state_t::EventGroup
int EventGroup
Definition:
linux-L2unit.h:63
L2UNIT_control_state_t::overflow_count
int overflow_count
Definition:
linux-L2unit.h:68
L2UNIT_overflow_t
Definition:
linux-L2unit.h:55
L2UNIT_overflow_t::EventIndex
int EventIndex
Definition:
linux-L2unit.h:57
L2UNIT_overflow_t::threshold
int threshold
Definition:
linux-L2unit.h:56
L2UNIT_reg_alloc_t
Definition:
linux-L2unit.h:50
L2UNIT_reg_alloc_t::ra_bits
L2UNIT_register_t ra_bits
Definition:
linux-L2unit.h:51
L2UNIT_register_t
Definition:
linux-L2unit.h:41
L2UNIT_register_t::selector
unsigned int selector
Definition:
linux-L2unit.h:42
src
components
bgpm
L2unit
linux-L2unit.h
Generated on Wed Dec 20 2023 18:12:50 for PAPI by
1.9.6