[Git][ghc/ghc][master] Use proper RTS flags when collecting residency in perf tests.

Marge Bot gitlab at gitlab.haskell.org
Fri Oct 9 12:45:08 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
45a1d493 by Andreas Klebinger at 2020-10-09T08:45:05-04:00
Use proper RTS flags when collecting residency in perf tests.

Replace options like collect_stats(['peak_megabytes_allocated'],4) with
collect_runtime_residency(4) and so forth. Reason being that the later
also supplies some default RTS arguments which make sure residency does
not fluctuate too much.

The new flags mean we get new (hopefully more accurate) baselines so
accept the stat changes.

-------------------------
Metric Decrease:
     T4029
     T4334
     T7850
Metric Increase:
     T13218
     T7436
-------------------------

- - - - -


2 changed files:

- testsuite/tests/perf/should_run/all.T
- testsuite/tests/perf/space_leaks/all.T


Changes:

=====================================
testsuite/tests/perf/should_run/all.T
=====================================
@@ -88,15 +88,15 @@ test('T4321',
 test('T3736', [], makefile_test, ['T3736'])
 test('T3738',
      [extra_clean(['T3738a.hi', 'T3738a.o']),
-      collect_stats('peak_megabytes_allocated', 0),
+      collect_runtime_residency(1),
       collect_stats('bytes allocated',8),
-      only_ways(['normal'])
+      only_ways(['normal']),
       ],
      compile_and_run,
      ['-O'])
 
 test('MethSharing',
-     [collect_stats('peak_megabytes_allocated',  0),
+     [collect_runtime_residency(1),
       collect_stats('bytes allocated',5),
       only_ways(['normal'])
       ],
@@ -177,7 +177,7 @@ test('T5536',
 
 test('T7257',
      [collect_stats('bytes allocated',10),
-      collect_stats('peak_megabytes_allocated',5),
+      collect_runtime_residency(5),
       only_ways(['normal'])
      ],
     compile_and_run, ['-O'])
@@ -192,14 +192,14 @@ test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
 # For 7507, stack overflow is the bad case
 
 test('T7436',
-     [collect_stats('max_bytes_used',4),
+     [collect_runtime_residency(4),
       only_ways(['normal'])
       ],
      compile_and_run,
      ['-O'])
 
 test('T7436b',
-     [collect_stats('max_bytes_used',4),
+     [collect_runtime_residency(4),
       only_ways(['normal'])
       ],
      compile_and_run,
@@ -221,7 +221,7 @@ test('T7954',
      ['-O'])
 
 test('T7850',
-     [collect_stats('peak_megabytes_allocated',10),
+     [collect_runtime_residency(10),
       only_ways(['normal'])],
      compile_and_run,
      ['-O'])
@@ -308,7 +308,7 @@ test('T12990',
 
 test('T13218',
     [collect_stats('bytes allocated',5),
-     collect_stats('max_bytes_used',10),
+     collect_runtime_residency(10),
      only_ways(['normal'])],
     compile_and_run,
     ['-O'])


=====================================
testsuite/tests/perf/space_leaks/all.T
=====================================
@@ -3,7 +3,7 @@ test('space_leak_001',
      # This could potentially be replaced with
      # collect_stats('all',5) to test all 3 with
      # 5% possible deviation.
-     [collect_stats(['peak_megabytes_allocated','bytes allocated'],5),
+     [ collect_stats(['bytes allocated'],5),
       collect_runtime_residency(15),
       omit_ways(['profasm','profthreaded','threaded1','threaded2','nonmoving_thr'])
       ],
@@ -13,7 +13,7 @@ test('space_leak_001',
 test('T4334',
      # Test for a space leak in Data.List.lines (fixed with #4334)
      [extra_run_opts('1000000 2 t'),
-      collect_stats('peak_megabytes_allocated',2),
+      collect_runtime_residency(2),
       # prof ways don't work well with +RTS -V0, nonmoving way residency is
       # highly variable.
       omit_ways(['profasm','profthreaded','nonmoving_thr'])
@@ -21,9 +21,8 @@ test('T4334',
      compile_and_run, [''])
 
 test('T2762',
-     [collect_stats('peak_megabytes_allocated',2),
+     [collect_runtime_residency(2),
       only_ways(['normal']),
-      extra_run_opts('+RTS -G1 -RTS' ),
       extra_clean(['T2762A.hi', 'T2762A.o'])],
      compile_and_run, ['-O'])
 
@@ -32,9 +31,7 @@ test('T4018',
      compile_and_run, ['-fno-state-hack'])
 
 test('T4029',
-     [collect_stats(['peak_megabytes_allocated'],10),
-      collect_runtime_residency(10),
-      extra_hc_opts('+RTS -G1 -RTS' ),
+     [collect_runtime_residency(10),
       ],
      ghci_script,
      ['T4029.script'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/45a1d493ec877f5fa0b3228deee3e019033c89db

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/45a1d493ec877f5fa0b3228deee3e019033c89db
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/20201009/d2547d44/attachment-0001.html>


More information about the ghc-commits mailing list