[commit: nofib] master: Disable timer-based context switches (e2d614e)

git at git.haskell.org git at git.haskell.org
Tue Jan 1 18:02:13 UTC 2019


Repository : ssh://git@git.haskell.org/nofib

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e2d614e40e8b049ac0bcf3c6ccc6f0009864511e/nofib

>---------------------------------------------------------------

commit e2d614e40e8b049ac0bcf3c6ccc6f0009864511e
Author: Sebastian Graf <sebastian.graf at kit.edu>
Date:   Sun Dec 30 19:17:59 2018 +0100

    Disable timer-based context switches
    
    Summary:
    In the past, we repeatedly had problems with non-deterministic allocations due to stack squeezing during context switches (#4450, #8611).
    This patch adds `+RTS -V0 -RTS` as extra `RUNTEST_OPTS` for every single-threaded benchmark.
    
    Is this the right place to add the flags? Should we also do this for all the other benchmarks?
    
    Reviewers: simonmar, osa1, nomeata, O26 nofib
    
    GHC Trac Issues: #8611
    
    Differential Revision: https://phabricator.haskell.org/D5470


>---------------------------------------------------------------

e2d614e40e8b049ac0bcf3c6ccc6f0009864511e
 mk/opts.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/mk/opts.mk b/mk/opts.mk
index 80fb957..be20125 100644
--- a/mk/opts.mk
+++ b/mk/opts.mk
@@ -18,6 +18,15 @@ RUNTEST_OPTS       = $(SRC_RUNTEST_OPTS) $(WAY$(_way)_RUNTEST_OPTS) \
 ifneq "$(way)" "mp"
 # if testing GUM don't generate a -S style log file; it may well differ 
 SRC_RUNTEST_OPTS += -ghc-timing
+
+# Deactivate context switches to guarantee deterministic allocation
+# measurements. See Trac #8611.
+# We might want this to also happen in the "mp" way. I left it here,
+# assuming that "mp" (probably for multi-processor system) entails
+# nondeterministic measurements anyway, but I don't really know enough
+# about this to make substantiated claims.
+SRC_RUNTEST_OPTS += +RTS -V0 -RTS
+
 endif
 # SRC_RUNTEST_OPTS += +RTS -H10m -K10m -RTS
 



More information about the ghc-commits mailing list