|
PAPI
5.0.1.0
|
00001 #ifndef _PAPI_LIBPFM_EVENTS_H 00002 #define _PAPI_LIBPFM_EVENTS_H 00003 00004 /* 00005 * File: papi_libpfm_events.h 00006 */ 00007 00008 /* Prototypes for libpfm name library access */ 00009 00010 int _papi_libpfm_error( int pfm_error ); 00011 int _papi_libpfm_setup_presets( char *name, int type, int cidx ); 00012 int _papi_libpfm_ntv_enum_events( unsigned int *EventCode, int modifier ); 00013 int _papi_libpfm_ntv_name_to_code( char *ntv_name, 00014 unsigned int *EventCode ); 00015 int _papi_libpfm_ntv_code_to_name( unsigned int EventCode, char *name, 00016 int len ); 00017 int _papi_libpfm_ntv_code_to_descr( unsigned int EventCode, char *name, 00018 int len ); 00019 int _papi_libpfm_ntv_code_to_bits( unsigned int EventCode, 00020 hwd_register_t * bits ); 00021 int _papi_libpfm_ntv_code_to_bits_perfctr( unsigned int EventCode, 00022 hwd_register_t * bits ); 00023 int _papi_libpfm_shutdown(void); 00024 int _papi_libpfm_init(papi_vector_t *my_vector, int cidx); 00025 00026 00027 int _pfm_decode_native_event( unsigned int EventCode, unsigned int *event, 00028 unsigned int *umask ); 00029 unsigned int _pfm_convert_umask( unsigned int event, unsigned int umask ); 00030 int prepare_umask( unsigned int foo, unsigned int *values ); 00031 int _papi_libpfm_ntv_code_to_info(unsigned int EventCode, 00032 PAPI_event_info_t *info); 00033 00034 00035 00036 /* Gross perfctr/perf_events compatability hack */ 00037 /* need to think up a better way to handle this */ 00038 00039 #ifndef __PERFMON_PERF_EVENT_H__ 00040 struct perf_event_attr { 00041 int config; 00042 int type; 00043 }; 00044 00045 #define PERF_TYPE_RAW 4; 00046 00047 #endif /* !__PERFMON_PERF_EVENT_H__ */ 00048 00049 00050 extern int _papi_libpfm_setup_counters( struct perf_event_attr *attr, 00051 hwd_register_t *ni_bits ); 00052 00053 #endif // _PAPI_LIBPFM_EVENTS_H