slow script execution when debugging large binaries

Mike Frysinger vapier@gentoo.org
Thu Aug 10 21:48:00 GMT 2006


On Thursday 10 August 2006 16:40, Daniel Jacobowitz wrote:
> On Thu, Aug 10, 2006 at 04:33:07PM -0400, Mike Frysinger wrote:
> > i'm playing with kgdb and in the process have been learning/writing up
> > little code snippets to make debugging easier ... for example, a small
> > function that will dump the dmesg buffer in kgdb ... now, the issue at
> > hand isnt kgdb :)
>
> Could you build a GDB which includes profiling data (I think it's
> --enable-profile, check gdb/configure.ac) and then use
> maint set profile to generate a profile data file for this?
> It'll tell you where the problem is - probably something is doing
> unnecessary symbol lookup.

attached the output of `gprof` on both runs

fast:
(gdb) maintanence set profile
(gdb) speed-test
(gdb) quit

slow:
(gdb) maintanence set profile
(gdb) file vmlinux
(gdb) speed-test
(gdb) quit
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20060810/9b7b2c47/attachment.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: speed-test-fast.bz2
Type: application/x-bzip2
Size: 10227 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20060810/9b7b2c47/attachment.bz2>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: speed-test-slow.bz2
Type: application/x-bzip2
Size: 18182 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20060810/9b7b2c47/attachment-0001.bz2>


More information about the Gdb mailing list