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