Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: dje@google.com (Doug Evans)
To: gdb-patches@sourceware.org
Subject: [RFA] Add more parallelization to gdb.base testing
Date: Mon, 18 Jun 2012 16:33:00 -0000	[thread overview]
Message-ID: <20120618163310.98BF71E136F@ruffy2.mtv.corp.google.com> (raw)

Hi.

This patch speeds up gdb testing at -j6 on my machine from 7mins to 4mins.
I didn't want to get too carried away here, this felt like a good compromise.
I split the range into four roughly equal partitions alphabet wise,
then noticed that [a-g] has far more files than the others so made the split
more refined.  I'm happy to use whatever partitioning folks want, I just
want the 4mins (or better).

Ok to check in?

btw, it's possible to do better.
The ideal is (effectively) to be able to run all the .exp's at once.
But that's a more work and this is trivial with a reasonable win.

2012-06-15  Doug Evans  <dje@google.com>

	* Makefile.in (TEST_DIRS): Add gdb.base3, gdb.base4.
	(BASE1_FILES, BASE2_FILES): Change to handle a-e and f-m respectively.
	(BASE3_FILES, BASE4_FILES): New, handles n-s and t-z respectively.

diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index fab124e..ca5ca55 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -158,7 +158,7 @@ check-single: all $(abs_builddir)/site.exp
 # A list of all directories named "gdb.*" which also hold a .exp file.
 # We filter out gdb.base and add fake entries, because that directory
 # takes the longest to process, and so we split it in half.
-TEST_DIRS = gdb.base1 gdb.base2 $(filter-out gdb.base,$(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(srcdir)/gdb.*/*.exp))))))
+TEST_DIRS = gdb.base1 gdb.base2 gdb.base3 gdb.base4 $(filter-out gdb.base,$(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(srcdir)/gdb.*/*.exp))))))
 
 TEST_TARGETS = $(addprefix check-,$(TEST_DIRS))
 
@@ -179,11 +179,15 @@ check-parallel:
 @GMAKE_TRUE@	@if test ! -d gdb.$*; then mkdir gdb.$*; fi
 @GMAKE_TRUE@	$(DO_RUNTEST) --directory=gdb.$* --outdir=gdb.$* $(RUNTESTFLAGS)
 
-# Each half (roughly) of the .exp files from gdb.base.
-BASE1_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[a-m]*.exp))
-BASE2_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[n-z]*.exp))
+# A simple partitioning of the .exp files from gdb.base.
+# The partitioning here is a modest attempt at having four equal sized pieces,
+# without trying to be too clever.
+BASE1_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[a-d]*.exp))
+BASE2_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[e-k]*.exp))
+BASE3_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[l-r]*.exp))
+BASE4_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[s-z]*.exp))
 
-# Handle each half of gdb.base.
+# Handle each partition of gdb.base.
 check-gdb.base%: all $(abs_builddir)/site.exp
 	@if test ! -d gdb.base$*; then mkdir gdb.base$*; fi
 	$(DO_RUNTEST) $(BASE$*_FILES) --outdir gdb.base$* $(RUNTESTFLAGS)


             reply	other threads:[~2012-06-18 16:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18 16:33 Doug Evans [this message]
2012-06-18 16:48 ` Joel Brobecker
2012-06-22 16:20 ` Tom Tromey
2012-06-18 16:35 Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120618163310.98BF71E136F@ruffy2.mtv.corp.google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox