|
PAPI
5.0.1.0
|
00001 /****************************/ 00002 /* THIS IS OPEN SOURCE CODE */ 00003 /****************************/ 00004 00024 #ifndef _PAPI_APPIO_H 00025 #define _PAPI_APPIO_H 00026 00027 #include <unistd.h> 00028 00029 /************************* DEFINES SECTION ***********************************/ 00030 00031 /* Set this equal to the number of elements in _appio_counter_info array */ 00032 #define APPIO_MAX_COUNTERS 29 00033 00035 typedef struct APPIO_register 00036 { 00037 /* This is used by the framework. It likes it to be !=0 to do something */ 00038 unsigned int selector; 00039 } APPIO_register_t; 00040 00041 00042 /* 00043 * The following structures mimic the ones used by other components. It is more 00044 * convenient to use them like that as programming with PAPI makes specific 00045 * assumptions for them. 00046 */ 00047 00048 00049 /* This structure is used to build the table of events */ 00050 00051 typedef struct APPIO_native_event_entry 00052 { 00053 APPIO_register_t resources; 00054 const char* name; 00055 const char* description; 00056 } APPIO_native_event_entry_t; 00057 00058 00059 typedef struct APPIO_reg_alloc 00060 { 00061 APPIO_register_t ra_bits; 00062 } APPIO_reg_alloc_t; 00063 00064 00065 typedef struct APPIO_control_state 00066 { 00067 int num_events; 00068 int counter_bits[APPIO_MAX_COUNTERS]; 00069 long long values[APPIO_MAX_COUNTERS]; // used for caching 00070 } APPIO_control_state_t; 00071 00072 00073 typedef struct APPIO_context 00074 { 00075 APPIO_control_state_t state; 00076 } APPIO_context_t; 00077 00078 00079 /************************* GLOBALS SECTION *********************************** 00080 *******************************************************************************/ 00081 00082 #endif /* _PAPI_APPIO_H */ 00083 00084 /* vim:set ts=4 sw=4 sts=4 et: */