Revert "rts: add Emacs 'Local Variables' to every .c file"
[ghc.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 #ifndef PAPI_H
9 #define PAPI_H
10
11 #include "BeginPrivate.h"
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 void papi_stats_report(void);
20 void papi_init_eventset(int * event_set);
21 void papi_init(void);
22 void papi_start_mutator_count(void);
23 void papi_stop_mutator_count(void);
24
25 void papi_start_gc_count(void);
26 void papi_stop_gc0_count(void);
27 void papi_stop_gc1_count(void);
28
29 // for multithreaded GC, each sub-thread uses these functions to count
30 // events and aggregate them into the main GC counters.
31 void papi_thread_start_gc1_count(int event_set);
32 void papi_thread_stop_gc1_count(int event_set);
33
34 #include "EndPrivate.h"
35
36 #endif /* PAPI_H */