GNU bug report logs -
#10580
24.0.92; gdb initialization takes more than one minute at 100% CPU
Previous Next
Reported by: Dov Grobgeld <dov.grobgeld <at> gmail.com>
Date: Sun, 22 Jan 2012 17:55:03 UTC
Severity: important
Tags: patch
Found in version 24.0.92
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
I just downloaded gdb from cvs and tried with the latest version and there
are still duplicates. Perhaps it is because of gcc? But on the positive
side there is indeed a huge difference in the gdb output.
prompt> gdb --version
GNU gdb (GDB) Fedora (7.3.50.20110722-13.fc16)
prompt> /usr/local/public-dev/bin/gdb --version
GNU gdb (GDB) 7.4.50.20120509-cvs
prompt> gdb -i=mi MyExec < /tmp/gdb.in > /tmp/gdb-old.out
prompt> /usr/local/public-dev/bin/gdb -i=mi MyExec < /tmp/gdb.in >
/tmp/gdb-new.out
prompt> ls -1s --block-size=1 /tmp/gdb*.out
884736 /tmp/gdb-new.out
3727360 /tmp/gdb-old.out
prompt> perl -ne 'while(/(\w+)=\"(.*?)\"/g) { print "$1=$2\n"; }'
/tmp/gdb-old.out | sort | wc
67311 67311 3522494
prompt> perl -ne 'while(/(\w+)=\"(.*?)\"/g) { print "$1=$2\n"; }'
/tmp/gdb-new.out | sort | wc
14221 14221 837082
prompt> perl -ne 'while(/(\w+)=\"(.*?)\"/g) { print "$1=$2\n"; }'
/tmp/gdb-old.out | sort |uniq| wc
3931 3931 220654
prompt> perl -ne 'while(/(\w+)=\"(.*?)\"/g) { print "$1=$2\n"; }'
/tmp/gdb-new.out | sort |uniq| wc
2245 2245 137404
But even the factor 837k vs 137k is substantial, so it is still valid to do
an internal uniq within gdb. I'll try to put together a patch.
Regards,
Dov
On Thu, May 10, 2012 at 7:32 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Thu, 10 May 2012 09:00:49 +0300
> > From: Dov Grobgeld <dov.grobgeld <at> gmail.com>
> > Cc: schwab <at> linux-m68k.org, cyd <at> gnu.org, 10580 <at> debbugs.gnu.org
> >
> > I tried running file-list-exec-source-files and I get duplicates as well.
> > Try the following:
> >
> > prompt> echo -file-list-exec-source-files > /tmp/gdb.in
> > prompt> gdb -i=mi emacs < /tmp/gdb.in > /tmp/gdb.out
> > prompt> perl -ne 'while(/(\w+)=\"(.*?)\"/g) { print "$1=$2\n"; }'
> > /tmp/gdb.out | sort | head -15
> > file=alloc.c
> > file=alloc.c
> > file=allocator.c
> > file=atimer.c
> > file=atimer.c
> > file=bidi.c
> > file=bidi.c
> > file=buffer.c
> > file=buffer.c
> > file=buffer.h
> > file=buffer.h
> > file=buffer.h
> > file=buffer.h
> > file=buffer.h
> > file=buffer.h
>
> I don't see anything like that. Here's my output:
>
> addr=0x011b4ea5
> addr=0x011b4ea5
> addr=0x012329a8
> disp=del
> disp=del
> disp=keep
> enabled=y
> enabled=y
> enabled=y
> file=../lib/allocator.h
> file=../lib/careadlinkat.h
> file=../lib/ignore-value.h
> file=../lib/intprops.h
> file=../lib/intprops.h
> file=../lib/intprops.h
>
> IOW, all the duplicates I see are header files. Not a single .c file
> shows up, not even if I change "head -15" into "head -100".
>
> > My version of gdb is:
> >
> > GNU gdb (GDB) Fedora (7.2-52.fc14)
>
> Maybe you should upgrade, I dunno. I use 7.4.1, FWIW.
>
> Or maybe GCC versions later than what I have do that.
>
> > For my executable gdb outputs full paths as well as the fullname field,
> > which expands the output considerably.
>
> Here too, but that's expected (and necessary).
>
[Message part 2 (text/html, inline)]
This bug report was last modified 12 years and 74 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.