|
PAPI
5.3.0.0
|
00001 /****************************/ 00002 /* THIS IS OPEN SOURCE CODE */ 00003 /****************************/ 00004 00022 #ifndef _PAPI_MICPOWER_H_ 00023 #define _PAPI_MICPOWER_H_ 00024 00025 #include <unistd.h> 00026 #include <dirent.h> 00027 00028 00029 00030 /************************* DEFINES SECTION *********************************** 00031 *******************************************************************************/ 00032 /* this number assumes that there will never be more events than indicated */ 00033 #define MICPOWER_MAX_COUNTERS 16 00034 00036 typedef struct { 00037 unsigned int selector; 00038 } MICPOWER_register_t; 00039 00040 /* 00041 * The following structures mimic the ones used by other components. It is more 00042 * convenient to use them like that as programming with PAPI makes specific 00043 * assumptions for them. 00044 */ 00045 00046 00047 00049 typedef struct MICPOWER_native_event_entry 00050 { 00051 char name[PAPI_MAX_STR_LEN]; 00052 char units[PAPI_MIN_STR_LEN]; 00053 char description[PAPI_MAX_STR_LEN]; 00054 MICPOWER_register_t resources; 00055 } MICPOWER_native_event_entry_t; 00056 00057 typedef struct MICPOWER_reg_alloc 00058 { 00059 MICPOWER_register_t ra_bits; 00060 } MICPOWER_reg_alloc_t; 00061 00062 00063 typedef struct MICPOWER_control_state 00064 { 00065 long long counts[MICPOWER_MAX_COUNTERS]; // used for caching 00066 long long lastupdate; 00067 } MICPOWER_control_state_t; 00068 00069 00070 typedef struct MICPOWER_context 00071 { 00072 MICPOWER_control_state_t state; 00073 } MICPOWER_context_t; 00074 00075 00076 00077 /************************* GLOBALS SECTION *********************************** 00078 *******************************************************************************/ 00079 00080 00081 #endif /* _PAPI_MICPOWER_H_ */