Please see this thread: http://sourceware.org/ml/gdb/2013-05/msg00074.html I couldn't pick a particular component: the slowdown appears when running a macro on a core file from a C++ program; the macro walks through a list of objects referenced by another object. Other core dumps from the same executable do not show this slowdown, and so far we haven't been able to reproduce it using live debugging. Bisecting via Git declares the slowdown to have been introduced with this commit: 677b1bfabd372790dca4dad32fcb05dd77658728 is the first bad commit commit 677b1bfabd372790dca4dad32fcb05dd77658728 Author: Keith Seitz <keiths@redhat.com> Date: Fri Nov 16 20:54:28 2012 +0000 I'll see if I can get more details.
Created attachment 7037 [details] gprof output of FAST gdb run This is the result of running gdb from the last "fast" commit, e8127d61d885e62b8cd3bde1d1d0989819295268. GDB built with -g -pg.
Created attachment 7038 [details] gprof output of SLOW gdb run This is the result of running gdb from the first "slow" commit, 677b1bfabd372790dca4dad32fcb05dd77658728. GDB built with -g -pg.
Created attachment 7039 [details] pdf summary of call graph Sometimes I find the summary graph produced by dot -Tpdf from the output provided by gprof2dot handy as a visual overview. Was just looking at the output this morning out of curiosity and am attaching this file to see if it is useful for others looking at this bug
CVSROOT: /cvs/src Module name: src Changes by: devans@sourceware.org 2013-06-05 22:28:52 Modified files: gdb : ChangeLog cp-namespace.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.cp: derivation.cc derivation.exp Added files: gdb/testsuite/gdb.cp: derivation2.cc Log message: PR 15519 * cp-namespace.c (find_symbol_in_baseclass): Call cp_lookup_symbol_in_namespace instead of cp_lookup_symbol_namespace. Check result of call to lookup_symbol_static. Call lookup_static_symbol_aux unconditionally. Call check_typedef on base types before accessing them. (cp_lookup_nested_symbol): Fix comment. testsuite/ * gdb.cp/derivation2.cc: New file. * gdb.cp/derivation.cc (main): Call foo2. * gdb.cp/derivation.exp: Add tests for typedefs in another file, and when there's an active block. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15689&r2=1.15690 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cp-namespace.c.diff?cvsroot=src&r1=1.67&r2=1.68 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3685&r2=1.3686 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/derivation2.cc.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/derivation.cc.diff?cvsroot=src&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/derivation.exp.diff?cvsroot=src&r1=1.24&r2=1.25
It seems to be fixed now, could you verify it, Paul?
Thanks Jan; I tested this morning's snapshot (7.6.50.20130610) and the massive slowdown is not there. Nice!
CVSROOT: /cvs/src Module name: src Branch: gdb_7_6-branch Changes by: devans@sourceware.org 2013-06-27 22:18:33 Modified files: gdb : ChangeLog cp-namespace.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.cp: derivation.cc derivation.exp Added files: gdb/testsuite/gdb.cp: derivation2.cc Log message: PR 15519 * cp-namespace.c (find_symbol_in_baseclass): Call cp_lookup_symbol_in_namespace instead of cp_lookup_symbol_namespace. Check result of call to lookup_symbol_static. Call lookup_static_symbol_aux unconditionally. Call check_typedef on base types before accessing them. (cp_lookup_nested_symbol): Fix comment. testsuite/ * gdb.cp/derivation2.cc: New file. * gdb.cp/derivation.cc (main): Call foo2. * gdb.cp/derivation.exp: Add tests for typedefs in another file, and when there's an active block. testsuite/ * gdb.cp/derivation.exp: Make tests have unique names. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.15260.2.55&r2=1.15260.2.56 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cp-namespace.c.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.65.2.1&r2=1.65.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.3580.2.22&r2=1.3580.2.23 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/derivation2.cc.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=NONE&r2=1.2.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/derivation.cc.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.5&r2=1.5.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/derivation.exp.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.24&r2=1.24.2.1