This page collects useful notes on running the GDB performance testsuite.

N.B. This page is very much a work-in-progress.

The "monster" performance testcases

These testcases are mocks of real programs. GDB doesn't care what the program does, the mocks just have to look like the real program along the axes one wishes to measure.

Since these programs are huge (I mean probably bigger than anything you'll normally experience) building them is separate from running them. Building them takes awhile, and we don't want to rebuild them each time when testing gdb patches or different copies of gdb.

Example of running the "monster" performance testcases

The author likes to use a collection of three scripts:

  1. - this just exists to put common aspects of building and running into one location.
  2. - run this script to build the monster performance testcases
  3. - run this script to run the monster performance testcases

Note: The author usually has a copy of these in $obj/gdb/testsuite. They don't begin with "perf" so that tab-completion on perftest.sum works nicely.

Remember: This is just an example. Feel free to use it or not. It is offered as a way to get one started using the testsuite quickly.



#tests="gmonster1-backtrace.exp gmonster1-null-lookup.exp gmonster1-pervasive-typedef.exp gmonster1-print-cerr.exp gmonster1-ptype-string.exp gmonster1-runto-main.exp gmonster1-select-file.exp gmonster2-backtrace.exp gmonster2-null-lookup.exp gmonster2-pervasive-typedef.exp gmonster2-print-cerr.exp gmonster2-ptype-string.exp gmonster2-runto-main.exp gmonster2-select-file.exp"

# Set this to n or y.
# y builds the really big versions of the programs (that try to match the real ones they're based on).


#EXTRA_CFLAGS="\\ -Wl,-rpath,$GCC_HEAD/lib64"



# Workaround dejagnu 1.5.3 bug, --directory is broken.                                                                                                           

#! /bin/sh
. ./
make -j10 build-perf \
    RUNTESTFLAGS="gmonster1.exp gmonster2.exp MONSTER=$monster $board CC_FOR_TARGET=$CC_FOR_TARGET CXX_FOR_TARGET=$CXX_FOR_TARGET"

#! /bin/sh
. ./
make -j10 check-perf GDB_PERFTEST_MODE=run \

bash$ cd $obj/gdb/testsuite
bash$ sh
bash$ sh

At this point you should see perftest.sum and perftest.log in the directory with the results of the test.

Remember: These files are appended to by default.

None: GDBPerfTestsuite (last edited 2015-08-15 06:19:38 by DougEvans)

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.