diff mbox

[committed] Parallelize the jit testsuite

Message ID 1421444855-1921-1-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Jan. 16, 2015, 9:47 p.m. UTC
This patch adds "check-jit" to lang_checks_parallelized, and
sets check_jit_parallelize, enabling jit.exp to be split across
multiple jobs.

Running:
  time make -j64 check-jit
I saw:
  Before:
    real   6m49.601s
    user   6m19.851s
    sys    0m15.824s
  After
    real   2m55.869s
    user   6m33.339s
    sys    0m17.579s

i.e. about 50% reduction in wallclock time.

Committed to trunk as r219774.

FWIW, this is dominated by test-threads.c, which has most of the
testsuite in one process, each running in a different thread (the
threads spend most of their time waiting for the jit mutex).

FWIW, it's possible to dramatically speed up the jit testsuite
(by about a factor of 5) by hacking jit.dg/harness.h and setting
GCC_JIT_BOOL_OPTION_SELFCHECK_GC there to 0 (I do this when
developing new changes, but I have it turned back on for final
testing, since we want to shake out any GC memory issues).

gcc/jit/ChangeLog:
	* Make-lang.in (lang_checks_parallelized): Add "check-jit".
	(check_jit_parallelize): Set this to an arbitrary value (10).
---
 gcc/jit/Make-lang.in | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
index 551b115..e622690 100644
--- a/gcc/jit/Make-lang.in
+++ b/gcc/jit/Make-lang.in
@@ -247,6 +247,11 @@  jit.man:
 jit.srcman:
 
 lang_checks += check-jit
+lang_checks_parallelized += check-jit
+# This number is somewhat arbitrary.  Two tests are much slower
+# than all the others (test-combination.c and test-threads.c) so
+# we want them to be placed in different "buckets".
+check_jit_parallelize = 10
 
 #
 # Install hooks: