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