[PATCH 0/3 V2] GDB Performance testing

Yao Qi
2013-09-25T14:27:24Z

Hello,
Here is the V2 of GDB performance testing. The changes in V2 can be
found in each patch, and they address most of review comments.

Here are some points V2 doesn't address, and I'd like revisit them
and consider them in the next iteration.

- Utilities to generate source files. We need them to generate source
files to compose a reasonably sized program for perf testing. However,
current test case doesn't require these utilities.
- Generated files, including source files, object files and executables
are not removed when the test is done, because the next run may skip
compilation step.

The basic usages of performance testing are unchanged, like

$ make check-perf
$ make check-perf RUNTESTFLAGS="--target_board=native-gdbserver solib.exp"
$ make check-perf RUNTESTFLAGS="solib.exp SOLIB_COUNT=1024"

We can skip compilation step like this,

$ make check-perf RUNTESTFLAGS='solib.exp GDB_PERFORMANCE_SKIP_COMPILE=yes'

in default, compilation is not skipped.

The skeleton of .exp is like this:

load_lib perftest.exp

if [skip_perf_tests] {
return 0
}

PerfTest::assemble {
compile {

PerfTest::compiled
}
setup_gdb {
}
} {
run {
}
}

PerfTest::assemble is inspired by Dwarf::assemble. It has three
procedures, compile, setup_gdb and run. Each test should fill in
the body of these three procedures for its purpose. If variable
GDB_PERFORMANCE_SKIP_COMPILE exists, the procedure compile is not
invoked. If the test case uses pre-compiled program, it can be
written like this:

PerfTest::assemble {
setup_gdb {
}
} {
run {
}
}

I'll update gdb/testsuite/README later.

*** BLURB HERE ***

Yao Qi (3):
New make target 'check-perf' and new dir gdb.perf
Perf test framework
Test on solib load and unload

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 +++
gdb/testsuite/gdb.perf/lib/perftest/__init__.py | 17 +++
gdb/testsuite/gdb.perf/lib/perftest/measure.py | 114 +++++++++++++++++++++
gdb/testsuite/gdb.perf/lib/perftest/perftest.py | 71 +++++++++++++
gdb/testsuite/gdb.perf/lib/perftest/reporter.py | 68 ++++++++++++
gdb/testsuite/gdb.perf/lib/perftest/testresult.py | 59 +++++++++++
gdb/testsuite/gdb.perf/solib.c | 71 +++++++++++++
gdb/testsuite/gdb.perf/solib.exp | 77 ++++++++++++++
gdb/testsuite/gdb.perf/solib.py | 45 ++++++++
gdb/testsuite/lib/gdb.exp | 16 +++
gdb/testsuite/lib/perftest.exp | 67 ++++++++++++
15 files changed, 635 insertions(+), 2 deletions(-)
create mode 100644 gdb/testsuite/gdb.perf/Makefile.in
create mode 100644 gdb/testsuite/gdb.perf/lib/perftest/__init__.py
create mode 100644 gdb/testsuite/gdb.perf/lib/perftest/measure.py
create mode 100644 gdb/testsuite/gdb.perf/lib/perftest/perftest.py
create mode 100644 gdb/testsuite/gdb.perf/lib/perftest/reporter.py
create mode 100644 gdb/testsuite/gdb.perf/lib/perftest/testresult.py
create mode 100644 gdb/testsuite/gdb.perf/solib.c
create mode 100644 gdb/testsuite/gdb.perf/solib.exp
create mode 100644 gdb/testsuite/gdb.perf/solib.py
create mode 100644 gdb/testsuite/lib/perftest.exp

--
1.7.7.6