File: papi_libpfm_events.h

package info (click to toggle)
papi 5.7.0+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,856 kB
  • sloc: ansic: 93,265; fortran: 3,338; xml: 2,460; makefile: 815; sh: 290
file content (55 lines) | stat: -rw-r--r-- 1,759 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef _PAPI_LIBPFM_EVENTS_H
#define _PAPI_LIBPFM_EVENTS_H
#include "papi.h" /* For PAPI_event_info_t */
#include "papi_vector.h" /* For papi_vector_t */

/* 
* File:    papi_libpfm_events.h
*/

/* Prototypes for libpfm name library access */

int _papi_libpfm_error( int pfm_error );
int _papi_libpfm_setup_presets( char *name, int type, int cidx );
int _papi_libpfm_ntv_enum_events( unsigned int *EventCode, int modifier );
int _papi_libpfm_ntv_name_to_code( const char *ntv_name,
				       unsigned int *EventCode );
int _papi_libpfm_ntv_code_to_name( unsigned int EventCode, char *name,
				       int len );
int _papi_libpfm_ntv_code_to_descr( unsigned int EventCode, char *name,
					int len );
int _papi_libpfm_ntv_code_to_bits( unsigned int EventCode,
				       hwd_register_t * bits );
int _papi_libpfm_ntv_code_to_bits_perfctr( unsigned int EventCode,
				       hwd_register_t * bits );
int _papi_libpfm_shutdown(void);
int _papi_libpfm_init(papi_vector_t *my_vector, int cidx);


int _pfm_decode_native_event( unsigned int EventCode, unsigned int *event,
			      unsigned int *umask );
unsigned int _pfm_convert_umask( unsigned int event, unsigned int umask );
int prepare_umask( unsigned int foo, unsigned int *values );
int _papi_libpfm_ntv_code_to_info(unsigned int EventCode, 
                                  PAPI_event_info_t *info);



/* Gross perfctr/perf_events compatability hack */
/* need to think up a better way to handle this */

#ifndef __PERFMON_PERF_EVENT_H__
struct perf_event_attr {
  int config;
  int type;
};

#define PERF_TYPE_RAW 4;

#endif /* !__PERFMON_PERF_EVENT_H__ */


extern int _papi_libpfm_setup_counters( struct perf_event_attr *attr, 
				      hwd_register_t *ni_bits );

#endif // _PAPI_LIBPFM_EVENTS_H