improvements to +RTS -s output
[ghc-hetmet.git] / rts / Stats.h
1 /* -----------------------------------------------------------------------------
2  *
3  * (c) The GHC Team, 1998-2005
4  *
5  * Statistics and timing-related functions.
6  *
7  * ---------------------------------------------------------------------------*/
8
9 #ifndef STATS_H
10 #define STATS_H
11
12 #include "GetTime.h"
13
14 void      stat_startInit(void);
15 void      stat_endInit(void);
16
17 void      stat_startGC(void);
18 void      stat_endGC (lnat alloc, lnat live, 
19                       lnat copied, lnat gen,
20                       lnat max_copied, lnat avg_copied);
21
22 #ifdef PROFILING
23 void      stat_startRP(void);
24 void      stat_endRP(nat, 
25 #ifdef DEBUG_RETAINER
26                             nat, int, 
27 #endif
28                             double);
29 #endif /* PROFILING */
30
31 #if defined(PROFILING) || defined(DEBUG)
32 void      stat_startHeapCensus(void);
33 void      stat_endHeapCensus(void);
34 #endif
35
36 void      stat_startExit(void);
37 void      stat_endExit(void);
38
39 void      stat_exit(int alloc);
40 void      stat_workerStop(void);
41
42 void      initStats(void);
43
44 double    mut_user_time_during_GC(void);
45 double    mut_user_time(void);
46
47 #ifdef PROFILING
48 double    mut_user_time_during_RP(void);
49 double    mut_user_time_during_heap_census(void);
50 #endif /* PROFILING */
51
52 void      statDescribeGens( void );
53 HsInt64   getAllocations( void );
54
55 Ticks stat_getElapsedGCTime(void);
56 Ticks stat_getElapsedTime(void);
57
58 /* Only exported for Papi.c */
59 void statsPrintf( char *s, ... ) 
60     GNUC3_ATTRIBUTE(format (printf, 1, 2));
61
62
63 #endif /* STATS_H */