cpp: Use #pragma once instead of #ifndef guards
[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 #pragma once
10
11 #include "GetTime.h"
12
13 #include "BeginPrivate.h"
14
15 #if defined(mingw32_HOST_OS)
16 /* On Win64, if we say "printf" then gcc thinks we are going to use
17 MS format specifiers like %I64d rather than %llu */
18 #define PRINTF gnu_printf
19 #else
20 /* However, on OS X, "gnu_printf" isn't recognised */
21 #define PRINTF printf
22 #endif
23
24 struct gc_thread_;
25
26 void stat_startInit(void);
27 void stat_endInit(void);
28
29 void stat_startGCSync(struct gc_thread_ *_gct);
30 void stat_startGC(Capability *cap, struct gc_thread_ *_gct);
31 void stat_endGC (Capability *cap, struct gc_thread_ *_gct, W_ live,
32 W_ copied, W_ slop, uint32_t gen, uint32_t n_gc_threads,
33 W_ par_max_copied);
34
35 #ifdef PROFILING
36 void stat_startRP(void);
37 void stat_endRP(uint32_t,
38 #ifdef DEBUG_RETAINER
39 uint32_t, 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 void statDescribeGens( void );
62
63 Time stat_getElapsedGCTime(void);
64 Time stat_getElapsedTime(void);
65
66 #include "EndPrivate.h"