PAPI
7.1.0.0
Loading...
Searching...
No Matches
linux-micpower.h
Go to the documentation of this file.
1
/****************************/
2
/* THIS IS OPEN SOURCE CODE */
3
/****************************/
4
22
#ifndef _PAPI_MICPOWER_H_
23
#define _PAPI_MICPOWER_H_
24
25
#include <unistd.h>
26
#include <dirent.h>
27
28
29
30
/************************* DEFINES SECTION ***********************************
31
*******************************************************************************/
32
/* this number assumes that there will never be more events than indicated */
33
#define MICPOWER_MAX_COUNTERS 16
34
36
typedef
struct
{
37
unsigned
int
selector
;
38
}
MICPOWER_register_t
;
39
40
/*
41
* The following structures mimic the ones used by other components. It is more
42
* convenient to use them like that as programming with PAPI makes specific
43
* assumptions for them.
44
*/
45
46
47
49
typedef
struct
MICPOWER_native_event_entry
50
{
51
char
name
[
PAPI_MAX_STR_LEN
];
52
char
units
[
PAPI_MIN_STR_LEN
];
53
char
description[
PAPI_MAX_STR_LEN
];
54
MICPOWER_register_t
resources
;
55
}
MICPOWER_native_event_entry_t
;
56
57
typedef
struct
MICPOWER_reg_alloc
58
{
59
MICPOWER_register_t
ra_bits
;
60
}
MICPOWER_reg_alloc_t
;
61
62
63
typedef
struct
MICPOWER_control_state
64
{
65
long
long
counts[
MICPOWER_MAX_COUNTERS
];
// used for caching
66
long
long
lastupdate
;
67
}
MICPOWER_control_state_t
;
68
69
70
typedef
struct
MICPOWER_context
71
{
72
MICPOWER_control_state_t
state
;
73
}
MICPOWER_context_t
;
74
75
76
77
/************************* GLOBALS SECTION ***********************************
78
*******************************************************************************/
79
80
81
#endif
/* _PAPI_MICPOWER_H_ */
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
MICPOWER_MAX_COUNTERS
#define MICPOWER_MAX_COUNTERS
Definition:
linux-micpower.h:33
units
char units[MAX_EVENTS][BUFSIZ]
Definition:
powercap_plot.c:15
name
const char * name
Definition:
rocs.c:225
MICPOWER_context_t
Definition:
linux-micpower.h:71
MICPOWER_context_t::state
MICPOWER_control_state_t state
Definition:
linux-micpower.h:72
MICPOWER_control_state_t
Definition:
linux-micpower.h:64
MICPOWER_control_state_t::lastupdate
long long lastupdate
Definition:
linux-micpower.h:66
MICPOWER_native_event_entry_t
Definition:
linux-micpower.h:50
MICPOWER_native_event_entry_t::resources
MICPOWER_register_t resources
Definition:
linux-micpower.h:54
MICPOWER_reg_alloc_t
Definition:
linux-micpower.h:58
MICPOWER_reg_alloc_t::ra_bits
MICPOWER_register_t ra_bits
Definition:
linux-micpower.h:59
MICPOWER_register_t
Definition:
linux-micpower.h:36
MICPOWER_register_t::selector
unsigned int selector
Definition:
linux-micpower.h:37
src
components
micpower
linux-micpower.h
Generated on Wed Dec 20 2023 18:12:51 for PAPI by
1.9.6