diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-09-12 08:44:24 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-09-12 12:15:28 -0400 |
commit | 6555c6bb8447ed65d5da4bab462ee9da7dc3f97a (patch) | |
tree | 8035d82c256e608a23dd4b186fd7ab9a898d1957 /rts/ProfHeap.c | |
parent | c6ac1e5f25e980c69e36581666210749811ee1c6 (diff) | |
download | haskell-6555c6bb8447ed65d5da4bab462ee9da7dc3f97a.tar.gz |
rts: Disable -hb with multiple capabilities
Biographical profiling is not thread-safe as documented in #12019. Throw
an error when it is used in this way.
Test Plan: Validate
Reviewers: simonmar, austin, erikd
Reviewed By: erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2516
GHC Trac Issues: #12019
Diffstat (limited to 'rts/ProfHeap.c')
-rw-r--r-- | rts/ProfHeap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index 956a250747..c94b3e9ec8 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -400,6 +400,13 @@ initHeapProfiling(void) errorBelch("cannot mix -hb and -hr"); stg_exit(EXIT_FAILURE); } +#ifdef THREADED_RTS + // See Trac #12019. + if (doingLDVProfiling() && RtsFlags.ParFlags.nCapabilities > 1) { + errorBelch("-hb cannot be used with multiple capabilities"); + stg_exit(EXIT_FAILURE); + } +#endif #endif // we only count eras if we're doing LDV profiling. Otherwise era |