Re: [GDB 7.6/GCC 4.8.0] Slowdown in GDB macro processing for cores?

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 05/16/2013 08:42 PM, Paul Smith wrote:
> Hi all.  Is anyone aware of an issue with a big slowdown running macros
> on core files?  I'm not sure if this is related to GCC 4.8 or GDB 7.6,
> or what, but I'm seeing a 4x or more slowdown when running macros on
> core files from previous releases.
> 
> Running against a live process is the same speed as before.

Wow.

If you haven't yet, it'd make sense to try process vs core at the
exact same spot:

$ gdb myprogram
(gdb) run
...
(gdb) mymacro
(gdb) gcore mycore
(gdb) quit

$ gdb myprogram -c mycore
(gdb) mymacro

> Against a core file it takes a second or longer per iteration of this
> loop!  FWIW, the class this macro operates on is very large and contains
> a lot of data per object.
> 
> Any ideas?  Is there a handy way to tell where the slowdown is happening
> here?  

I'm really surprised.  If anything, I'd expect cores to be marginally faster.
I suggest git bisecting gdb looking.  Maybe you'll find the culprit
easily that way.

> Should we just drop back to DWARF2 or DWARF3 (I haven't checked
> if that will help tho)?

Ideally no, of course.  Let us know if that indeed helps.
Using DWARF < 4 should make it easier to git bisect the
culprit, as you can then start bisecting before the
patches that added support for DWARF4.

-- 
Pedro Alves
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.