diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-07-01 12:23:54 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-07-01 12:23:54 +0000 |
commit | 2fb511a805af6fc2932e3577139513b0d0992070 (patch) | |
tree | dca3b14f8e9d7707146f69ecf76af5875a832693 /rts/RtsUtils.c | |
parent | 76c520c095eb2b9d75fb66050b91097c787f5279 (diff) | |
download | haskell-2fb511a805af6fc2932e3577139513b0d0992070.tar.gz |
Fix #2197 (properly this time)
$ ./inplace/bin/ghc-stage2 --interactive
GHCi, version 6.11.20090701: http://www.haskell.org/ghc/ :? for help
ghc-stage2: GHCi cannot be used when compiled with -prof
[1] 32473 exit 1 ./inplace/bin/ghc-stage2 --interactive
Diffstat (limited to 'rts/RtsUtils.c')
-rw-r--r-- | rts/RtsUtils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c index dda9660b14..3091aa1f89 100644 --- a/rts/RtsUtils.c +++ b/rts/RtsUtils.c @@ -465,3 +465,13 @@ void printRtsInfo(void) { printf(" ]\n"); } +// Provides a way for Haskell programs to tell whether they're being +// profiled or not. GHCi uses it (see #2197). +int rts_isProfiled(void) +{ +#ifdef PROFILING + return 1; +#else + return 0; +#endif +} |