Make tidyProgram discard speculative specialisation rules
[ghc.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 #include "BeginPrivate.h"
15
16 #if defined(mingw32_HOST_OS)
17 /* On Win64, if we say "printf" then gcc thinks we are going to use
18 MS format specifiers like %I64d rather than %llu */
19 #define PRINTF gnu_printf
20 #else
21 /* However, on OS X, "gnu_printf" isn't recognised */
22 #define PRINTF printf
23 #endif
24
25 struct gc_thread_;
26
27 void stat_startInit(void);
28 void stat_endInit(void);
29
30 void stat_startGC(Capability *cap, struct gc_thread_ *_gct);
31 void stat_endGC (Capability *cap, struct gc_thread_ *_gct,
32 W_ live, W_ copied, W_ slop, nat gen,
33 nat n_gc_threads, W_ par_max_copied, W_ par_tot_copied);
34
35 #ifdef PROFILING
36 void stat_startRP(void);
37 void stat_endRP(nat,
38 #ifdef DEBUG_RETAINER
39 nat, int,
40 #endif
41 double);
42 #endif /* PROFILING */
43
44 #if defined(PROFILING) || defined(DEBUG)
45 void stat_startHeapCensus(void);
46 void stat_endHeapCensus(void);
47 #endif
48
49 void stat_startExit(void);
50 void stat_endExit(void);
51
52 void stat_exit(void);
53 void stat_workerStop(void);
54
55 void initStats0(void);
56 void initStats1(void);
57
58 double mut_user_time_until(Time t);
59 double mut_user_time(void);
60
61 #ifdef PROFILING
62 double mut_user_time_during_RP(void);
63 double mut_user_time_during_heap_census(void);
64 #endif /* PROFILING */
65
66 void statDescribeGens( void );
67
68 Time stat_getElapsedGCTime(void);
69 Time stat_getElapsedTime(void);
70
71 /* Only exported for Papi.c */
72 void statsPrintf( char *s, ... )
73 GNUC3_ATTRIBUTE(format (PRINTF, 1, 2));
74
75 #include "EndPrivate.h"
76
77 #endif /* STATS_H */
78
79 // Local Variables:
80 // mode: C
81 // fill-column: 80
82 // indent-tabs-mode: nil
83 // c-basic-offset: 4
84 // buffer-file-coding-system: utf-8-unix
85 // End: