[commit: ghc] master: rts: Disable -hb with multiple capabilities (6555c6b)
git at git.haskell.org
git at git.haskell.org
Mon Sep 12 16:15:46 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6555c6bb8447ed65d5da4bab462ee9da7dc3f97a/ghc
>---------------------------------------------------------------
commit 6555c6bb8447ed65d5da4bab462ee9da7dc3f97a
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Mon Sep 12 08:44:24 2016 -0400
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
>---------------------------------------------------------------
6555c6bb8447ed65d5da4bab462ee9da7dc3f97a
rts/ProfHeap.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index 956a250..c94b3e9 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
More information about the ghc-commits
mailing list