Addition of PAPI to RTS
[ghc.git] / rts / Papi.h
1
2
3 #include <papi.h>
4
5
6
7 #define PAPI_CHECK(CALL) \
8 if((papi_error=(CALL)) != PAPI_OK) { \
9 debugBelch("PAPI function failed in module %s at line %d with error code %d\n", \
10 __FILE__,__LINE__,papi_error); \
11 }
12
13 /* Check the error value of a PAPI call, reporting an error, if needed */
14 extern int papi_error;
15
16 /* While PAPI reporting is going on this flag is on */
17 extern int papi_is_reporting;
18
19 /* Event sets and counter arrays for GC and mutator */
20
21 extern int MutatorEvents;
22 extern int GCEvents;
23
24 extern long_long MutatorCounters[];
25 extern long_long GCCounters[];
26
27 long_long papi_counter(long_long values[],int event);
28 void papi_report(long_long PapiCounters[]);
29 void papi_add_events(int EventSet);
30
31 void papi_init_eventsets(void);
32 void papi_start_mutator_count(void);
33 void papi_stop_mutator_count(void);
34 void papi_start_gc_count(void);
35 void papi_stop_gc_count(void);
36
37