summaryrefslogtreecommitdiff
path: root/rts/Profiling.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-04-27 12:01:13 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-04-27 12:01:13 +0000
commitcbeb99efd4a117de5b028341dc41bc8f50717383 (patch)
tree718b3dab5c48e29f797210702cbc2dc4d2b732ea /rts/Profiling.h
parent47e0b5e52240f8794b117e0dbde4e21f41ffe9ec (diff)
downloadhaskell-cbeb99efd4a117de5b028341dc41bc8f50717383.tar.gz
Basic heap profile support without -prof
Now that constructor info tables contain the name of the constructor, we can generate useful heap profiles without requiring the whole program and libraries to be compiled with -prof. So now, "+RTS -hT" generates a heap profile for any program, dividing the profile by constructor. It wouldn't be hard to add support for grouping constructors by module, or to restrict the profile to certain constructors/modules/packages. This means that for the first time we can get heap profiles for GHCi, which was previously impossible because the byte-code interpreter and linker don't work with -prof.
Diffstat (limited to 'rts/Profiling.h')
-rw-r--r--rts/Profiling.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/rts/Profiling.h b/rts/Profiling.h
index edfc1b2c5e..8961da9b17 100644
--- a/rts/Profiling.h
+++ b/rts/Profiling.h
@@ -11,15 +11,13 @@
#include <stdio.h>
-#if defined(PROFILING) || defined(DEBUG)
-void initProfiling1 ( void );
-void freeProfiling1 ( void );
-void initProfiling2 ( void );
-void endProfiling ( void );
+void initProfiling1 (void);
+void freeProfiling1 (void);
+void initProfiling2 (void);
+void endProfiling (void);
extern FILE *prof_file;
extern FILE *hp_file;
-#endif
#ifdef PROFILING