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

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Tue May 23 15:12:11 UTC 2023



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


Commits:
afd1cfeb by Matthew Pickering at 2023-05-23T16:11:57+01:00
testsuite: Pass -ki128k -kc128k for performance tests

Setting a larger stack (chunk size/ initial) 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 -ki128k -kc128k -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/afd1cfeb6985f299b55124292c027d6f79c2e559

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/afd1cfeb6985f299b55124292c027d6f79c2e559
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/20230523/16951cf7/attachment.html>


More information about the ghc-commits mailing list