summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/driver/testlib.py10
-rw-r--r--testsuite/tests/perf/compiler/all.T7
2 files changed, 10 insertions, 7 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index a4960e83bd..965350f56b 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -393,7 +393,7 @@ def extra_run_opts( val ):
return lambda name, opts, v=val: _extra_run_opts(name, opts, v);
def _extra_run_opts( name, opts, v ):
- opts.extra_run_opts = v
+ opts.extra_run_opts += " " + v
# -----
@@ -401,7 +401,7 @@ def extra_hc_opts( val ):
return lambda name, opts, v=val: _extra_hc_opts(name, opts, v);
def _extra_hc_opts( name, opts, v ):
- opts.extra_hc_opts = v
+ opts.extra_hc_opts += " " + v
# -----
@@ -567,13 +567,15 @@ def llvm_build ( ) -> bool:
# appears to change (up or down) when the underlying profile hasn't
# really changed. To further minimize this effect we run with a single
# generation (meaning we get a residency sample on every GC) with a small
-# allocation area (as suggested in #17387).
+# allocation area (as suggested in #17387). That's what +RTS -h -i0 will do.
+# If you find that a test is flaky, sampling frequency can be adjusted by
+# shrinking the allocation area (+RTS -A64k, for example).
#
# However, please don't just ignore changes in residency. If you see
# a change in one of these figures, please check whether it is real or
# not as follows:
#
-# * Run the test with old and new compilers, adding +RTS -h -i0.01
+# * Run the test with old and new compilers, adding +RTS -h -i0.001
# (you don't need to compile anything for profiling or enable profiling
# libraries to get a heap profile).
# * view the heap profiles, read off the maximum residency. If it has
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index b4910c570a..f9cedaff55 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -9,9 +9,10 @@ setTestOpts(no_lint)
test('T1969',
[# expect_broken(12437),
- # we collect residency for reference only, hence the large acceptance window.
- # We have seen >20% variations in this number.
- collect_compiler_residency(50),
+ collect_compiler_residency(20),
+ extra_run_opts('+RTS -A64k -RTS'),
+ # The default RESIDENCY_OPTS is 256k and we need higher sampling
+ # frequency. Incurs a slow-down by about 2.
collect_compiler_stats('bytes allocated', 1),
only_ways(['normal']),