16#ifndef _PAPI_INTERNAL_H
17#define _PAPI_INTERNAL_H
26#define DEADBEEF 0xdedbeef
40#define PAPI_ERROR_CODE_str "Error Code"
41#define PAPI_SHUTDOWN_str "PAPI_shutdown: PAPI is not initialized"
42#define PAPI_SHUTDOWN_SYNC_str "PAPI_shutdown: other threads still have running EventSets"
51#define PAPI_INT_MPX_SIGNAL SIGPROF
52#define PAPI_INT_SIGNAL SIGPROF
53#define PAPI_INT_ITIMER ITIMER_PROF
55#define PAPI_INT_ITIMER_MS 1
57#define PAPI_NSIG _NSIG
64#define PAPI_INT_MPX_DEF_US 10000
68#define NOT_DERIVED 0x0
69#define DERIVED_ADD 0x1
71#define DERIVED_ADD_PS 0x4
72#define DERIVED_CMPD 0x8
73#define DERIVED_SUB 0x10
74#define DERIVED_POSTFIX 0x20
75#define DERIVED_INFIX 0x40
79#define LOWLEVEL_TLS PAPI_NUM_TLS+0
80#define NUM_INNER_TLS 1
81#define PAPI_MAX_TLS (NUM_INNER_TLS+PAPI_NUM_TLS)
85#define INTERNAL_LOCK PAPI_NUM_LOCK+0
86#define MULTIPLEX_LOCK PAPI_NUM_LOCK+1
87#define THREADS_LOCK PAPI_NUM_LOCK+2
88#define HIGHLEVEL_LOCK PAPI_NUM_LOCK+3
89#define MEMORY_LOCK PAPI_NUM_LOCK+4
90#define COMPONENT_LOCK PAPI_NUM_LOCK+5
91#define GLOBAL_LOCK PAPI_NUM_LOCK+6
92#define CPUS_LOCK PAPI_NUM_LOCK+7
93#define NAMELIB_LOCK PAPI_NUM_LOCK+8
98#define DONT_NEED_CONTEXT 0
100#define PAPI_EVENTS_IN_DERIVED_EVENT 8
106#define hwd_context_t void
107#define hwd_control_state_t void
108#define hwd_reg_alloc_t void
109#define hwd_register_t void
110#define hwd_siginfo_t void
111#define hwd_ucontext_t void
123#define inline_static inline static
126typedef struct _EventSetDomainInfo {
130typedef struct _EventSetGranularityInfo {
134typedef struct _EventSetOverflowInfo {
144typedef struct _EventSetAttachInfo {
148typedef struct _EventSetCpuInfo {
152typedef struct _EventSetInheritInfo
158typedef struct _EventSetProfileInfo {
176typedef struct _EventInfo {
188typedef struct _NativeInfo {
209typedef struct _papi_info {
215typedef struct _masterevent {
232typedef struct _threadlist {
258typedef struct _EventSetInfo {
311typedef struct _dynamic_array {
321typedef struct _papi_int_attach {
326typedef struct _papi_int_cpu {
331typedef struct _papi_int_multiplex {
337typedef struct _papi_int_defdomain {
341typedef struct _papi_int_domain {
347typedef struct _papi_int_granularity {
353typedef struct _papi_int_overflow {
358typedef struct _papi_int_profile {
365#undef multiplex_itimer_sig
366#undef multiplex_itimer_num
367#undef multiplex_itimer_us
369typedef struct _papi_int_inherit
376typedef struct _papi_int_addr_range {
407typedef struct _papi_mdi {
423typedef struct _papi_os_option {
461 unsigned int EventCode );
static papi_handle_t handle
char event_name[2][PAPI_MAX_STR_LEN]
static long long values[NUM_EVENTS]
void(* PAPI_overflow_handler_t)(int EventSet, void *address, long long overflow_vector, void *context)
int(* PAPI_debug_handler_t)(int code)
unsigned long int pthread_t
int _papi_hwi_enum_dev_type(int enum_modifier, void **handle)
int _papi_hwi_get_user_event_info(int EventCode, PAPI_event_info_t *info)
PAPI_os_info_t * _papi_hwi_get_os_info(void)
papi_mdi_t _papi_hwi_system_info
int _papi_hwi_native_to_eventcode(int cidx, int event_code, int ntv_idx, const char *event_name)
#define PAPI_EVENTS_IN_DERIVED_EVENT
int _papi_hwi_add_event(EventSetInfo_t *ESI, int EventCode)
int _papi_hwi_using_signal[PAPI_NSIG]
void _papi_hwi_shutdown_global_internal(void)
int _papi_hwi_get_native_event_info(unsigned int EventCode, PAPI_event_info_t *info)
void _papi_hwi_free_EventSet(EventSetInfo_t *ESI)
void _papi_hwi_dummy_handler(int EventSet, void *address, long long overflow_vector, void *context)
int _papi_num_compiled_components
unsigned int _papi_hwi_get_papi_event_code(void)
void PAPIERROR(char *format,...)
THREAD_LOCAL_STORAGE_KEYWORD int _papi_hl_events_running
char * _papi_hwi_get_papi_event_string(void)
int _papi_hwi_is_sw_multiplex(EventSetInfo_t *ESI)
int _papi_hwi_native_code_to_name(unsigned int EventCode, char *hwi_name, int len)
void _papi_hwi_init_errors(void)
int _papi_hwi_derived_type(char *tmp, int *code)
int _papi_hwi_eventcode_to_native(int event_code)
@ PAPI_SYSDETECT_QUERY__DEV_TYPE_ENUM
@ PAPI_SYSDETECT_QUERY__DEV_ATTR
@ PAPI_SYSDETECT_QUERY__DEV_TYPE_ATTR
int _papi_hwi_error_level
int _papi_hwi_init_os(void)
void _papi_hwi_free_papi_event_string()
EventSetInfo_t * _papi_hwi_lookup_EventSet(int eventset)
int _papi_hwi_lookup_EventCodeIndex(const EventSetInfo_t *ESI, unsigned int EventCode)
int _papi_hwi_init_global(int PE_OR_PEU)
hwd_context_t * _papi_hwi_get_context(EventSetInfo_t *ESI, int *is_dirty)
int _papi_hwi_init_global_internal(void)
PAPI_debug_handler_t _papi_hwi_debug_handler
PAPI_itimer_option_t _papi_int_itimer_t
int _papi_hwi_remove_EventSet(EventSetInfo_t *ESI)
PAPI_os_info_t _papi_os_info
int _papi_hwi_native_name_to_code(const char *in, int *out)
int _papi_hwi_create_eventset(int *EventSet, ThreadInfo_t *handle)
int _papi_hwi_component_index(int event_code)
int _papi_hwi_get_preset_event_info(int EventCode, PAPI_event_info_t *info)
int _papi_hwi_convert_eventset_to_multiplex(_papi_int_multiplex_t *mpx)
int _papi_hwi_get_dev_type_attr(void *handle, PAPI_dev_type_attr_e attr, void *val)
void _papi_hwi_set_papi_event_string(const char *event_string)
THREAD_LOCAL_STORAGE_KEYWORD int _papi_rate_events_running
void PAPIWARN(char *format,...)
int _papi_hwi_read(hwd_context_t *context, EventSetInfo_t *ESI, long long *values)
int _papi_hwi_assign_eventset(EventSetInfo_t *ESI, int cidx)
int _papi_hwi_get_dev_attr(void *handle, int id, PAPI_dev_attr_e attr, void *val)
int _papi_hwi_remove_event(EventSetInfo_t *ESI, int EventCode)
int _papi_hwi_invalid_cmp(int cidx)
void _papi_hwi_set_papi_event_code(unsigned int event_code, int update_flag)
int _papi_hwi_cleanup_eventset(EventSetInfo_t *ESI)
int _papi_hwi_get_ntv_idx(unsigned int papi_evt_code)
int _papi_hwi_query_native_event(unsigned int EventCode)
void _papi_hwi_map_events_to_native(EventSetInfo_t *ESI)
EventSetInfo_t ** dataSlotArray
EventSetInheritInfo_t inherit
EventSetMultiplexInfo_t multiplex
EventSetProfileInfo_t profile
struct _ThreadInfo * master
EventSetAttachInfo_t attach
hwd_register_t * NativeBits
struct _CpuInfo * CpuInfo
EventSetGranularityInfo_t granularity
EventInfo_t * EventInfoArray
hwd_control_state_t * ctl_state
NativeInfo_t * NativeInfoArray
EventSetOverflowInfo_t overflow
EventSetDomainInfo_t domain
PAPI_overflow_handler_t handler
struct _threadlist * mythr
struct _masterevent * next
get the executable's info
struct _threadlist * next
hwd_ucontext_t * ucontext
PAPI_dev_type_attr_e attr
EventSetOverflowInfo_t overflow
EventSetProfileInfo_t profile
DynamicArray_t global_eventset_map
PAPI_preload_info_t preload_info
PAPI_shlib_info_t shlib_info
#define THREAD_LOCAL_STORAGE_KEYWORD
_papi_int_domain_t domain
_papi_int_multiplex_t multiplex
_papi_int_granularity_t granularity
_papi_int_attach_t attach
_papi_int_inherit_t inherit
_papi_int_overflow_t overflow
_papi_int_profile_t profile
_papi_int_itimer_t itimer
_papi_int_addr_range_t address_range