This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] New make target 'check-perf' and new dir gdb.perf
- From: Doug Evans <dje at google dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 8 Oct 2013 22:13:05 -0700
- Subject: Re: [PATCH 1/3] New make target 'check-perf' and new dir gdb.perf
- Authentication-results: sourceware.org; auth=none
- References: <1380119209-25975-1-git-send-email-yao at codesourcery dot com> <1380119209-25975-2-git-send-email-yao at codesourcery dot com>
On Wed, Sep 25, 2013 at 7:26 AM, Yao Qi <yao@codesourcery.com> wrote:
> We 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. We want to achieve:
>
> 1) typical 'make check' should not run performance tests. In each perf
> test case, GDB_PERFORMANCE is checked. If it doesn't exist, return.
> 2) run perf tests easily. We add a new makefile target 'check-perf'.
>
> V2 is simpler than V1, since we don't have to filter out gdb.perf
> directory.
>
> gdb:
>
> 2013-09-25 Yao Qi <yao@codesourcery.com>
>
> * Makefile.in (check-perf): New target.
>
> gdb/testsuite:
>
> 2013-09-25 Yao Qi <yao@codesourcery.com>
>
> * Makefile.in (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 | 4 ++++
> gdb/testsuite/configure | 3 ++-
> gdb/testsuite/configure.ac | 2 +-
> gdb/testsuite/gdb.perf/Makefile.in | 15 +++++++++++++++
> 5 files changed, 30 insertions(+), 2 deletions(-)
> create mode 100644 gdb/testsuite/gdb.perf/Makefile.in
>
> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> index 3b0b5c7..8bdda9e 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..287f445 100644
> --- a/gdb/testsuite/Makefile.in
> +++ b/gdb/testsuite/Makefile.in
> @@ -187,6 +187,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
I realize this is cut-n-paste-n-tweaking existing code,
I'm just curious under what scenario the mkdir is needed (except for a
broken build tree).
> + $(DO_RUNTEST) --directory=gdb.perf --outdir gdb.perf $(RUNTESTFLAGS) GDB_PERFORMANCE=yes
I don't know if it'll ever be useful, but if GDB_PERFORMANCE=yes
appears before RUNTESTFLAGS, then it can be overridden on the command
line.
> +
> subdir_do: force
> @for i in $(DODIRS); do \
> if [ -d ./$$i ] ; then \
> 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
Hi.
This part is ok with me.
I was thinking there is one time when IWBN to run the tests in parallel:
If I make a change to the test harness, I may want to run all the
tests in some reduced-size mode to verify I haven't broken anything.
I won't care what the perf results are - I'll just want to know that
things still work. :-) This can be left for later though.