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