[Git][ghc/ghc][wip/testsuite-stack-size] testsuite: Pass -kb16k -kc128k for performance tests

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Fri May 26 11:31:13 UTC 2023



Matthew Pickering pushed to branch wip/testsuite-stack-size at Glasgow Haskell Compiler / GHC


Commits:
479d64d9 by Matthew Pickering at 2023-05-26T12:29:48+01:00
testsuite: Pass -kb16k -kc128k for performance tests

Setting a larger stack chunk size gives a greater protection
from stack underflow (which allocates more stack chunks). This
stabilises some tests against differences cause by more things being
pushed onto the stack.

The performance tests are generally testing work done by the compiler,
using allocation as a proxy, so removing/stabilising the allocations due
to the stack gives us more stable tests which are also more sensitive
to actual changes in compiler performance.

Fixes #23439

- - - - -


1 changed file:

- testsuite/driver/testlib.py


Changes:

=====================================
testsuite/driver/testlib.py
=====================================
@@ -1791,7 +1791,11 @@ async def simple_build(name: Union[TestName, str],
 
     stats_file = name + '.comp.stats'
     if isCompilerStatsTest():
-        extra_hc_opts += ' +RTS -V0 -t' + stats_file + ' --machine-readable -RTS'
+        # Set a bigger chunk size to reduce variation due to additional under/overflowing
+        # The tests are attempting to test how much work the compiler is doing by proxy of
+        # bytes allocated. The additional allocations caused by stack overflow can cause
+        # spurious failures if you trip over the limit (see #23439)
+        extra_hc_opts += ' +RTS -kc128k -kb16k -V0 -t' + stats_file + ' --machine-readable -RTS'
     if backpack:
         extra_hc_opts += ' -outputdir ' + name + '.out'
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/479d64d938489a6b1996a63ee49dbd11adc2a166

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/479d64d938489a6b1996a63ee49dbd11adc2a166
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230526/6dc1b835/attachment-0001.html>


More information about the ghc-commits mailing list