|
PAPI
5.0.1.0
|
00001 /****************************/ 00002 /* THIS IS OPEN SOURCE CODE */ 00003 /****************************/ 00004 00025 #ifndef _PAPI_NET_H 00026 #define _PAPI_NET_H 00027 00028 #include <unistd.h> 00029 00030 /************************* DEFINES SECTION *********************************** 00031 *******************************************************************************/ 00032 /* this number assumes that there will never be more events than indicated 00033 * 20 INTERFACES * 16 COUNTERS = 320 */ 00034 #define NET_MAX_COUNTERS 320 00035 00037 typedef struct NET_register 00038 { 00039 /* This is used by the framework.It likes it to be !=0 to do somehting */ 00040 unsigned int selector; 00041 } NET_register_t; 00042 00043 00044 /* 00045 * The following structures mimic the ones used by other components. It is more 00046 * convenient to use them like that as programming with PAPI makes specific 00047 * assumptions for them. 00048 */ 00049 00050 00052 typedef struct NET_native_event_entry 00053 { 00054 NET_register_t resources; 00055 char name[PAPI_MAX_STR_LEN]; 00056 char description[PAPI_MAX_STR_LEN]; 00057 } NET_native_event_entry_t; 00058 00059 00060 typedef struct NET_reg_alloc 00061 { 00062 NET_register_t ra_bits; 00063 } NET_reg_alloc_t; 00064 00065 00066 typedef struct NET_control_state 00067 { 00068 long long values[NET_MAX_COUNTERS]; // used for caching 00069 long long lastupdate; 00070 } NET_control_state_t; 00071 00072 00073 typedef struct NET_context 00074 { 00075 NET_control_state_t state; 00076 } NET_context_t; 00077 00078 00079 /************************* GLOBALS SECTION *********************************** 00080 *******************************************************************************/ 00081 00082 #endif /* _PAPI_NET_H */ 00083 00084 /* vim:set ts=4 sw=4 sts=4 et: */