Commit Graph

8 Commits

Author SHA1 Message Date
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Yao Qi 07d100d43e Perf test case: skip-prologue
This patch add a perf test case on skip-prologue by inserting
breakpoints on two functions many times, in order to exercise
skip-prologue.

gdb/testsuite:

2013-12-15  Yao Qi  <yao@codesourcery.com>

	* gdb.perf/skip-prologue.c: New.
	* gdb.perf/skip-prologue.exp: New.
	* gdb.perf/skip-prologue.py: New.
2013-12-15 16:16:10 +08:00
Yao Qi 8b5e6dc217 GDB perf test on disassemble
This patch adds a test case to test the performance of GDB doing
disassembly.

gdb/testsuite/

2013-11-28  Yao Qi  <yao@codesourcery.com>

	* lib/gdb.exp (with_gdb_prompt): New proc.
	* gdb.perf/disassemble.exp: New.
	* gdb.perf/disassemble.py: New.
2013-11-28 12:53:26 +08:00
Yao Qi 23e9d3b9ce GDB perf test on backtrace
gdb/testsuite/

2013-11-25  Yao Qi  <yao@codesourcery.com>

	* gdb.perf/backtrace.c: New.
	* gdb.perf/backtrace.exp: New.
	* gdb.perf/backtrace.py: New.
2013-11-25 09:12:38 +08:00
Yao Qi 22825df749 GDB perf test on single step
gdb/testsuite:

2013-11-24  Yao Qi  <yao@codesourcery.com>

	* gdb.perf/single-step.c: New.
	* gdb.perf/single-step.exp: New.
	* gdb.perf/single-step.py: New.
2013-11-24 14:33:31 +08:00
Yao Qi 6dbb67982c Test on solib load and unload
This patch is to add a test case to on the performance of GDB handling
load and unload of shared library.

In V4:

 - Handle malloc and dlopen failure,
 - Document test parameters.

In V3, there are some changes,

 - Adapt to perf test framework changes.
 - Measure load and unload separately.

In V2, there are some changes,

 - A new proc gdb_produce_source to produce source files.  I tried to
   move all source file generation code out of solib.exp, but
   compilation step still needs to know the generated file names.  I
   have to hard-code the file names in compilation step, which is not
   good to me, so I give up on this moving.
 - SOLIB_NUMBER -> SOLIB_COUNT
 - New variable SOLIB_DLCLOSE_REVERSED_ORDER to control the order of
   iterating a list of shared libs to dlclose them.
 - New variable GDB_PERFORMANCE to enable these perf test cases.
 - Remove dlsym call in solib.c.
 - Update solib.py for the updated framework.

gdb/testsuite/

	* lib/gdb.exp (gdb_produce_source): New procedure.
	* gdb.perf/solib.c: New.
	* gdb.perf/solib.exp: New.
	* gdb.perf/solib.py: New.
2013-11-06 13:17:36 +08:00
Yao Qi f27a123653 Perf test framework
This patch adds a basic framework to do performance testing for GDB.
perftest.py is about the test case, testresult.py is about test
results, and how are they saved.  reporter.py is about how results
are reported (in what format).  measure.py is about measuring the
execution of tests by a collection of measurements.

In V5:
 - Simplify perftest.exp.

In V4:

 - Rename MeasurementCPUTime to MeasurementCpuTime,
 - Add 'pass' in empty method,
 - Simplify string comparison in perftest.exp.
 - Rename GDB_PERFORMANCE to GDB_PERFTEST_MODE and rename
   GDB_PERFORMANCE_TIMEOUT to GDB_PERFTEST_TIMEOUT.

In V3, there are some changes,

 - Add wall time measurement, cpu time measurement and vmsize
   measurement.
 - Rename SingleStatisticTestCase to TestCaseWithBasicMeasurements,
   which measures cpu time, wall time, and memory (vmsize).
 - GDB_PERFORMANCE=run|compile|both to control the mode of perf
   testing.
 - New GDB_PERFORMANCE_TIMEOUT to specify the timeout.
 - Split proc prepare to proc compile and startup.
 - Disable GC while doing measurements.

In V2, there are several changes to address Doug and Sanimir's
comments.

 - Add copyright header and docstring in perftest/__init__.py
 - Remove config.py.
 - Fix docstring format.
 - Rename classes "SingleVariable" to "SingleStatistic".
 - Don't extend gdb.Function in class TestCase.  Add a new method run
   to run the test case so that we can pass parameters to test.
 - Allow to customize whether to warm up and to append test log.
 - Move time measurement into test harness.  Add a new class
   Measurement for a specific measurement and a new class Measure to
   measure them for a given test case.
 - A new class ResultFactory to create instances of TestResult.
 - New file lib/perftest.exp, which is to do some preparations and
   cleanups to simplify each *.exp file.
 - Skip compilation step if GDB_PERFORMANCE_SKIP_COMPILE is set.

gdb/testsuite/

2013-11-06  Yao Qi  <yao@codesourcery.com>

	* lib/perftest.exp: New.
	* gdb.perf/lib/perftest/__init__.py: New.
	* gdb.perf/lib/perftest/measure.py: New.
	* gdb.perf/lib/perftest/perftest.py: New.
	* gdb.perf/lib/perftest/reporter.py: New.
	* gdb.perf/lib/perftest/testresult.py: New.
2013-11-06 13:13:15 +08:00
Yao Qi 7636ccf9f2 New make target 'check-perf' and new dir gdb.perf
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_PERFTEST_MODE is checked.  If it doesn't exist, return.
 2) run perf tests easily.  We add a new makefile target 'check-perf'.

gdb:

2013-11-06  Yao Qi  <yao@codesourcery.com>

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

gdb/testsuite:

2013-11-06  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.
2013-11-06 13:10:37 +08:00