1 /* -----------------------------------------------------------------------------
2 * (c) The GHC Team 2006
4 * Initialization and use of the PAPI performance monitoring library
6 * ---------------------------------------------------------------------------*/
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); \
19 /* Check the error value of a PAPI call, reporting an error, if needed */
20 extern int papi_error;
22 /* While PAPI reporting is going on this flag is on */
23 extern int papi_is_reporting;
25 /* Event sets and counter arrays for GC and mutator */
27 extern int MutatorEvents;
30 extern long_long MutatorCounters[];
31 extern long_long GCCounters[];
33 long_long papi_counter(long_long values[],int event);
34 void papi_report(long_long PapiCounters[]);
35 void papi_add_events(int EventSet);
37 void papi_init_eventsets(void);
38 void papi_start_mutator_count(void);
39 void papi_stop_mutator_count(void);
40 void papi_start_gc_count(void);
41 void papi_stop_gc_count(void);