Merge branch 'master' of http://darcs.haskell.org/ghc
[ghc.git] / rts / Profiling.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-2005
4 *
5 * Support for profiling
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #ifndef PROFILING_H
10 #define PROFILING_H
11
12 #include <stdio.h>
13
14 #include "BeginPrivate.h"
15 #include "Rts.h"
16
17 #ifdef PROFILING
18 #define PROFILING_ONLY(s) s
19 #else
20 #define PROFILING_ONLY(s) doNothing()
21 #endif
22
23 void initProfiling1 (void);
24 void initProfiling2 (void);
25 void endProfiling (void);
26 void freeProfiling (void);
27
28 extern FILE *prof_file;
29 extern FILE *hp_file;
30
31 #ifdef PROFILING
32
33 void gen_XML_logfile ( void );
34 void reportCCSProfiling ( void );
35
36 void PrintNewStackDecls ( void );
37
38 void fprintCCS( FILE *f, CostCentreStack *ccs );
39 void fprintCCS_stderr( CostCentreStack *ccs );
40
41 #ifdef DEBUG
42 void debugCCS( CostCentreStack *ccs );
43 #endif
44
45 #endif
46
47 #include "EndPrivate.h"
48
49 #endif /* PROFILING_H */