16 #ifndef _PAPI_INTERNAL_H 17 #define _PAPI_INTERNAL_H 26 #define DEADBEEF 0xdedbeef 41 #define PAPI_ERROR_CODE_str "Error Code" 42 #define PAPI_SHUTDOWN_str "PAPI_shutdown: PAPI is not initialized" 43 #define PAPI_SHUTDOWN_SYNC_str "PAPI_shutdown: other threads still have running EventSets" 52 #define PAPI_INT_MPX_SIGNAL SIGPROF 53 #define PAPI_INT_SIGNAL SIGPROF 54 #define PAPI_INT_ITIMER ITIMER_PROF 56 #define PAPI_INT_ITIMER_MS 1 58 #define PAPI_NSIG _NSIG 65 #define PAPI_INT_MPX_DEF_US 10000 69 #define NOT_DERIVED 0x0 70 #define DERIVED_ADD 0x1 71 #define DERIVED_PS 0x2 72 #define DERIVED_ADD_PS 0x4 73 #define DERIVED_CMPD 0x8 74 #define DERIVED_SUB 0x10 75 #define DERIVED_POSTFIX 0x20 76 #define DERIVED_INFIX 0x40 80 #define LOWLEVEL_TLS PAPI_NUM_TLS+0 81 #define NUM_INNER_TLS 1 82 #define PAPI_MAX_TLS (NUM_INNER_TLS+PAPI_NUM_TLS) 86 #define INTERNAL_LOCK PAPI_NUM_LOCK+0 87 #define MULTIPLEX_LOCK PAPI_NUM_LOCK+1 88 #define THREADS_LOCK PAPI_NUM_LOCK+2 89 #define HIGHLEVEL_LOCK PAPI_NUM_LOCK+3 90 #define MEMORY_LOCK PAPI_NUM_LOCK+4 91 #define COMPONENT_LOCK PAPI_NUM_LOCK+5 92 #define GLOBAL_LOCK PAPI_NUM_LOCK+6 93 #define CPUS_LOCK PAPI_NUM_LOCK+7 94 #define NAMELIB_LOCK PAPI_NUM_LOCK+8 98 #define NEED_CONTEXT 1 99 #define DONT_NEED_CONTEXT 0 101 #define PAPI_EVENTS_IN_DERIVED_EVENT 8 107 #define hwd_context_t void 108 #define hwd_control_state_t void 109 #define hwd_reg_alloc_t void 110 #define hwd_register_t void 111 #define hwd_siginfo_t void 112 #define hwd_ucontext_t void 123 #ifndef inline_static 124 #define inline_static inline static 127 typedef struct _EventSetDomainInfo {
131 typedef struct _EventSetGranularityInfo {
135 typedef struct _EventSetOverflowInfo {
145 typedef struct _EventSetAttachInfo {
149 typedef struct _EventSetCpuInfo {
153 typedef struct _EventSetInheritInfo
159 typedef struct _EventSetProfileInfo {
177 typedef struct _EventInfo {
189 typedef struct _NativeInfo {
210 typedef struct _papi_info {
216 typedef struct _masterevent {
233 typedef struct _threadlist {
259 typedef struct _EventSetInfo {
312 typedef struct _dynamic_array {
322 typedef struct _papi_int_attach {
327 typedef struct _papi_int_cpu {
332 typedef struct _papi_int_multiplex {
338 typedef struct _papi_int_defdomain {
342 typedef struct _papi_int_domain {
348 typedef struct _papi_int_granularity {
354 typedef struct _papi_int_overflow {
359 typedef struct _papi_int_profile {
366 #undef multiplex_itimer_sig 367 #undef multiplex_itimer_num 368 #undef multiplex_itimer_us 370 typedef struct _papi_int_inherit
377 typedef struct _papi_int_addr_range {
408 typedef struct _papi_mdi {
424 typedef struct _papi_os_option {
433 unsigned long reserved[8];
459 unsigned int EventCode );
char event_name[2][PAPI_MAX_STR_LEN]
int _papi_hwi_native_to_eventcode(int cidx, int event_code, int ntv_idx, const char *event_name)
char * _papi_hwi_get_papi_event_string(void)
_papi_int_inherit_t inherit
int _papi_hwi_component_index(int event_code)
int _papi_hwi_remove_event(EventSetInfo_t *ESI, int EventCode)
int _papi_hwi_eventcode_to_native(int event_code)
unsigned long int pthread_t
void _papi_hwi_set_papi_event_code(unsigned int event_code, int update_flag)
PAPI_os_info_t * _papi_hwi_get_os_info(void)
_papi_int_addr_range_t address_range
PAPI_itimer_option_t _papi_int_itimer_t
void _papi_hwi_shutdown_global_internal(void)
int _papi_hwi_assign_eventset(EventSetInfo_t *ESI, int cidx)
int _papi_hwi_error_level
_papi_int_profile_t profile
papi_mdi_t _papi_hwi_system_info
EventSetAttachInfo_t attach
hwd_register_t * NativeBits
EventSetDomainInfo_t domain
get the executable's info
PAPI_preload_info_t preload_info
int _papi_hwi_invalid_cmp(int cidx)
int _papi_hwi_read(hwd_context_t *context, EventSetInfo_t *ESI, long long *values)
hwd_context_t * _papi_hwi_get_context(EventSetInfo_t *ESI, int *is_dirty)
PAPI_shlib_info_t shlib_info
EventSetOverflowInfo_t overflow
void PAPIERROR(char *format,...)
PAPI_os_info_t _papi_os_info
int _papi_hwi_cleanup_eventset(EventSetInfo_t *ESI)
_papi_int_itimer_t itimer
_papi_int_attach_t attach
void _papi_hwi_map_events_to_native(EventSetInfo_t *ESI)
int _papi_hwi_create_eventset(int *EventSet, ThreadInfo_t *handle)
void _papi_hwi_set_papi_event_string(const char *event_string)
int _papi_hwi_using_signal[PAPI_NSIG]
EventSetProfileInfo_t profile
EventSetOverflowInfo_t overflow
void _papi_hwi_dummy_handler(int EventSet, void *address, long long overflow_vector, void *context)
EventSetInheritInfo_t inherit
void _papi_hwi_free_EventSet(EventSetInfo_t *ESI)
int _papi_hwi_get_ntv_idx(unsigned int papi_evt_code)
struct _CpuInfo * CpuInfo
DynamicArray_t global_eventset_map
struct _ThreadInfo * master
void _papi_hwi_free_papi_event_string()
int _papi_hwi_derived_type(char *tmp, int *code)
hwd_ucontext_t * ucontext
void _papi_hwi_init_errors(void)
EventSetInfo_t * _papi_hwi_lookup_EventSet(int eventset)
int _papi_hwi_query_native_event(unsigned int EventCode)
int _papi_hwi_init_global(void)
int _papi_hwi_native_name_to_code(const char *in, int *out)
_papi_int_granularity_t granularity
unsigned int _papi_hwi_get_papi_event_code(void)
_papi_int_overflow_t overflow
int _papi_hwi_is_sw_multiplex(EventSetInfo_t *ESI)
int _papi_hwi_convert_eventset_to_multiplex(_papi_int_multiplex_t *mpx)
struct _masterevent * next
_papi_int_multiplex_t multiplex
NativeInfo_t * NativeInfoArray
EventInfo_t * EventInfoArray
EventSetMultiplexInfo_t multiplex
EventSetGranularityInfo_t granularity
EventSetInfo_t ** dataSlotArray
int(* PAPI_debug_handler_t)(int code)
int _papi_hwi_get_user_event_info(int EventCode, PAPI_event_info_t *info)
void PAPIWARN(char *format,...)
PAPI_debug_handler_t _papi_hwi_debug_handler
struct _threadlist * next
int _papi_hwi_lookup_EventCodeIndex(const EventSetInfo_t *ESI, unsigned int EventCode)
int _papi_hwi_add_event(EventSetInfo_t *ESI, int EventCode)
int _papi_hwi_get_native_event_info(unsigned int EventCode, PAPI_event_info_t *info)
int _papi_hwi_init_global_internal(void)
int _papi_hwi_remove_EventSet(EventSetInfo_t *ESI)
int _papi_num_compiled_components
#define PAPI_EVENTS_IN_DERIVED_EVENT
_papi_int_domain_t domain
EventSetProfileInfo_t profile
hwd_control_state_t * ctl_state
static long long values[NUM_EVENTS]
struct _threadlist * mythr
int _papi_hwi_init_os(void)
PAPI_overflow_handler_t handler
void(* PAPI_overflow_handler_t)(int EventSet, void *address, long long overflow_vector, void *context)
int _papi_hwi_native_code_to_name(unsigned int EventCode, char *hwi_name, int len)
int _papi_hwi_get_preset_event_info(int EventCode, PAPI_event_info_t *info)