Profiling.h 927 Bytes
Newer Older
1 2
/* -----------------------------------------------------------------------------
 *
3
 * (c) The GHC Team, 1998-2005
4 5 6 7 8
 *
 * Support for profiling
 *
 * ---------------------------------------------------------------------------*/

9 10 11
#ifndef PROFILING_H
#define PROFILING_H

12 13
#include <stdio.h>

14
#include "BeginPrivate.h"
Ian Lynagh's avatar
Ian Lynagh committed
15 16 17 18 19 20 21
#include "Rts.h"

#ifdef PROFILING
#define PROFILING_ONLY(s) s
#else
#define PROFILING_ONLY(s) doNothing()
#endif
22

23 24 25
void initProfiling1 (void);
void initProfiling2 (void);
void endProfiling   (void);
26
void freeProfiling  (void);
27 28

extern FILE *prof_file;
29
extern FILE *hp_file;
30

31 32
#ifdef PROFILING

33
void gen_XML_logfile    ( void );
34
void reportCCSProfiling ( void );
35 36 37

void PrintNewStackDecls ( void );

38 39
void fprintCCS( FILE *f, CostCentreStack *ccs );
void fprintCCS_stderr( CostCentreStack *ccs );
40

41
#ifdef DEBUG
42
void debugCCS( CostCentreStack *ccs );
43 44
#endif

45
#endif
46

47
#include "EndPrivate.h"
48

49
#endif /* PROFILING_H */