PAPI
7.1.0.0
Loading...
Searching...
No Matches
linux-powercap-ppc.h
Go to the documentation of this file.
1
/****************************/
2
/* THIS IS OPEN SOURCE CODE */
3
/****************************/
4
19
#ifndef _POWERCAP_PPC_H
20
#define _POWERCAP_PPC_H
21
22
/* Headers required by PAPI */
23
#include "
papi.h
"
24
#include "
papi_internal.h
"
25
#include "
papi_vector.h
"
26
#include "
papi_memory.h
"
27
28
#define papi_powercap_ppc_lock() _papi_hwi_lock(COMPONENT_LOCK);
29
#define papi_powercap_ppc_unlock() _papi_hwi_unlock(COMPONENT_LOCK);
30
31
typedef
struct
_powercap_ppc_register {
32
unsigned
int
selector
;
33
}
_powercap_ppc_register_t
;
34
35
typedef
struct
_powercap_ppc_native_event_entry {
36
char
name
[
PAPI_MAX_STR_LEN
];
37
char
units
[
PAPI_MIN_STR_LEN
];
38
char
description[
PAPI_MAX_STR_LEN
];
39
int
socket_id
;
40
int
component_id
;
41
int
event_id
;
42
int
type
;
43
int
return_type
;
44
_powercap_ppc_register_t
resources
;
45
}
_powercap_ppc_native_event_entry_t
;
46
47
typedef
struct
_powercap_ppc_reg_alloc {
48
_powercap_ppc_register_t
ra_bits
;
49
}
_powercap_ppc_reg_alloc_t
;
50
51
// package events
52
// powercap-current powercap-max powercap-min
53
#define PKG_MIN_POWER 0
54
#define PKG_MAX_POWER 1
55
#define PKG_CUR_POWER 2
56
57
#define PKG_NUM_EVENTS 3
58
#define POWERCAP_MAX_COUNTERS (PKG_NUM_EVENTS)
59
60
typedef
struct
_powercap_ppc_control_state {
61
long
long
count
[
POWERCAP_MAX_COUNTERS
];
62
long
long
which_counter[
POWERCAP_MAX_COUNTERS
];
63
long
long
lastupdate
;
64
int
active_counters
;
65
}
_powercap_ppc_control_state_t
;
66
67
typedef
struct
_powercap_ppc_context {
68
long
long
start_value[
POWERCAP_MAX_COUNTERS
];
69
_powercap_ppc_control_state_t
state
;
70
}
_powercap_ppc_context_t
;
71
72
#endif
/* _POWERCAP_PPC_H */
count
static long count
Definition:
child_overflow.c:33
PAPI_MIN_STR_LEN
#define PAPI_MIN_STR_LEN
Definition:
f90papi.h:208
PAPI_MAX_STR_LEN
#define PAPI_MAX_STR_LEN
Definition:
f90papi.h:77
POWERCAP_MAX_COUNTERS
#define POWERCAP_MAX_COUNTERS
Definition:
linux-powercap.c:94
papi.h
Return codes and api definitions.
papi_internal.h
papi_memory.h
papi_vector.h
units
char units[MAX_EVENTS][BUFSIZ]
Definition:
powercap_plot.c:15
name
const char * name
Definition:
rocs.c:225
_powercap_ppc_context_t
Definition:
linux-powercap-ppc.h:67
_powercap_ppc_context_t::state
_powercap_ppc_control_state_t state
Definition:
linux-powercap-ppc.h:69
_powercap_ppc_control_state_t
Definition:
linux-powercap-ppc.h:60
_powercap_ppc_control_state_t::active_counters
int active_counters
Definition:
linux-powercap-ppc.h:64
_powercap_ppc_control_state_t::lastupdate
long long lastupdate
Definition:
linux-powercap-ppc.h:63
_powercap_ppc_native_event_entry_t
Definition:
linux-powercap-ppc.h:35
_powercap_ppc_native_event_entry_t::socket_id
int socket_id
Definition:
linux-powercap-ppc.h:39
_powercap_ppc_native_event_entry_t::return_type
int return_type
Definition:
linux-powercap-ppc.h:43
_powercap_ppc_native_event_entry_t::event_id
int event_id
Definition:
linux-powercap-ppc.h:41
_powercap_ppc_native_event_entry_t::type
int type
Definition:
linux-powercap-ppc.h:42
_powercap_ppc_native_event_entry_t::resources
_powercap_ppc_register_t resources
Definition:
linux-powercap-ppc.h:44
_powercap_ppc_native_event_entry_t::component_id
int component_id
Definition:
linux-powercap-ppc.h:40
_powercap_ppc_reg_alloc_t
Definition:
linux-powercap-ppc.h:47
_powercap_ppc_reg_alloc_t::ra_bits
_powercap_ppc_register_t ra_bits
Definition:
linux-powercap-ppc.h:48
_powercap_ppc_register_t
Definition:
linux-powercap-ppc.h:31
_powercap_ppc_register_t::selector
unsigned int selector
Definition:
linux-powercap-ppc.h:32
src
components
powercap_ppc
linux-powercap-ppc.h
Generated on Wed Dec 20 2023 18:12:51 for PAPI by
1.9.6