Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [RFC 1/3] New make target 'check-perf' and new dir gdb.perf
Date: Wed, 28 Aug 2013 04:17:00 -0000	[thread overview]
Message-ID: <1377663394-4975-2-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <1377663394-4975-1-git-send-email-yao@codesourcery.com>

When we add performance tests, we think typical 'make check' should
not run performance tests.  We add a new makefile target 'check-perf'
to run performance test only.

We also add a new dir gdb.perf in testsuite for all performance tests.
However, current 'make check' logic will either run dejagnu in
directory testsuite or iterate all gdb.* directories which has *.exp
files.  Both of them will run tests in gdb.perf, so we have to filter
gdb.perf out.  In makefile target 'check-single', we pass a list of
gdb.* directories except gdb.perf.  We also update $(TEST_DIRS) to
filter out gdb.perf too, so that tests in gdb.perf can't be run in
target check-parallel.

gdb:

2013-08-27  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (check-perf): New target.

gdb/testsuite:

2013-08-27  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (TEST_SRC_DIRS): New variable.
	(check-single): Pass directories $(TEST_SRC_DIRS) to runtest.
	(TEST_DIRS): Use $(TEST_SRC_DIRS).
	(check-perf): New target.
	* configure.ac (AC_OUTPUT): Output Makefile in gdb.perf.
	* configure: Re-generated.
	* gdb.perf/Makefile.in: New.
---
 gdb/Makefile.in                    |    8 ++++++++
 gdb/testsuite/Makefile.in          |   15 ++++++++++++---
 gdb/testsuite/configure            |    3 ++-
 gdb/testsuite/configure.ac         |    2 +-
 gdb/testsuite/gdb.perf/Makefile.in |   15 +++++++++++++++
 5 files changed, 38 insertions(+), 5 deletions(-)
 create mode 100644 gdb/testsuite/gdb.perf/Makefile.in

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c75ec38..98bcc1a 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1003,6 +1003,14 @@ check: force
 	  $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
 	else true; fi
 
+check-perf: force
+	@if [ -f testsuite/Makefile ]; then \
+	  rootme=`pwd`; export rootme; \
+	  rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
+	  cd testsuite; \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS) check-perf; \
+	else true; fi
+
 # The idea is to parallelize testing of multilibs, for example:
 #   make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
 # will run 3 concurrent sessions of check, eventually testing all 10
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index a7b3d5c..34590de 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -151,13 +151,18 @@ DO_RUNTEST = \
 	  export TCL_LIBRARY ; fi ; \
 	$(RUNTEST)
 
+# A list of all directories named "gdb.*" which also hold a .exp file.
+# We filter out gdb.perf because it contains performance testing cases,
+# and we don't want to run them together with other regression tests.
+# They should be run separately by 'make check-perf'.
+TEST_SRC_DIRS = $(filter-out gdb.perf,$(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(srcdir)/gdb.*/*.exp))))))
+
 check-single: all $(abs_builddir)/site.exp
-	$(DO_RUNTEST) $(RUNTESTFLAGS)
+	$(DO_RUNTEST) --directory="$(TEST_SRC_DIRS)" $(RUNTESTFLAGS)
 
-# 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 $(filter-out gdb.base ,$(TEST_SRC_DIRS))
 
 TEST_TARGETS = $(addprefix check-,$(TEST_DIRS))
 
@@ -187,6 +192,10 @@ 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)
 
+check-perf: all $(abs_builddir)/site.exp
+	@if test ! -d gdb.perf; then mkdir gdb.perf; fi
+	$(DO_RUNTEST) --direcotry=gdb.perf --outdir gdb.perf $(RUNTESTFLAGS)
+
 subdir_do: force
 	@for i in $(DODIRS); do \
 		if [ -d ./$$i ] ; then \
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index a40c144..da590f3 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -3448,7 +3448,7 @@ done
 
 
 
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -4176,6 +4176,7 @@ do
     "gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
     "gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
     "gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
+    "gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;;
     "gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
     "gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
     "gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;;
diff --git a/gdb/testsuite/configure.ac b/gdb/testsuite/configure.ac
index 9e07021..94f96cc 100644
--- a/gdb/testsuite/configure.ac
+++ b/gdb/testsuite/configure.ac
@@ -97,5 +97,5 @@ AC_OUTPUT([Makefile \
   gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile \
   gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
   gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
-  gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
+  gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
   gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
diff --git a/gdb/testsuite/gdb.perf/Makefile.in b/gdb/testsuite/gdb.perf/Makefile.in
new file mode 100644
index 0000000..2071d12
--- /dev/null
+++ b/gdb/testsuite/gdb.perf/Makefile.in
@@ -0,0 +1,15 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+.PHONY: all clean mostlyclean distclean realclean
+
+PROGS = 
+
+all info install-info dvi install uninstall installcheck check:
+	@echo "Nothing to be done for $@..."
+
+clean mostlyclean:
+	-rm -f *.o *.diff *~ core $(PROGS)
+
+distclean maintainer-clean realclean: clean
+	-rm -f Makefile config.status config.log gdb.log gdb.sum
-- 
1.7.7.6


  reply	other threads:[~2013-08-28  4:17 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 13:01 [RFC] GDB performance testing infrastructure Yao Qi
2013-08-21 20:39 ` Tom Tromey
2013-08-27  6:21   ` Yao Qi
2013-08-27 13:49 ` Agovic, Sanimir
2013-08-28  3:04   ` Yao Qi
2013-09-19  0:36     ` Doug Evans
2013-08-28  4:17 ` [RFC 0/3] GDB Performance testing Yao Qi
2013-08-28  4:17   ` Yao Qi [this message]
2013-08-28  9:40     ` [RFC 1/3] New make target 'check-perf' and new dir gdb.perf Agovic, Sanimir
2013-09-19 17:47     ` Doug Evans
2013-09-20 19:00       ` Tom Tromey
2013-09-20 18:59     ` Tom Tromey
2013-08-28  4:17   ` [RFC 2/3] Perf test framework Yao Qi
2013-08-28  9:57     ` Agovic, Sanimir
2013-09-03  1:45       ` Yao Qi
2013-09-03  6:38         ` Agovic, Sanimir
2013-09-19 19:09     ` Doug Evans
2013-09-20  8:04       ` Yao Qi
2013-09-20 16:51         ` Doug Evans
2013-09-22  2:54           ` Yao Qi
2013-09-22 23:14             ` Doug Evans
2013-09-20 17:12         ` Doug Evans
2013-08-28  4:17   ` [RFC 3/3] Test on solib load and unload Yao Qi
2013-08-28  4:27     ` Yao Qi
2013-08-28 11:31       ` Agovic, Sanimir
2013-09-03  1:59         ` Yao Qi
2013-09-03  6:33           ` Agovic, Sanimir
2013-09-02 15:24       ` Blanc, Nicolas
2013-09-03  2:04         ` Yao Qi
2013-09-03  7:50           ` Blanc, Nicolas
2013-09-19 22:45       ` Doug Evans
2013-09-20 19:19         ` Tom Tromey
2013-10-05  0:34           ` Doug Evans
2013-10-07 16:31             ` Tom Tromey
2013-09-22  6:25         ` Yao Qi
2013-09-23  0:14           ` Doug Evans
2013-09-24  2:31             ` Yao Qi
2013-10-05  0:37               ` Doug Evans
2013-09-20 19:14       ` Tom Tromey
2013-09-19 17:25   ` [RFC 0/3] GDB Performance testing 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=1377663394-4975-2-git-send-email-yao@codesourcery.com \
    --to=yao@codesourcery.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