From: "Markus Grunwald" <markus.grunwald@gmx.de>
To: gdb@sourceware.org
Subject: Big speed differences when setting breakpoints
Date: Mon, 09 Aug 2010 06:30:00 -0000 [thread overview]
Message-ID: <e94cd1ab56c877bb47ca240fed407176.squirrel@grunwald.homedns.org> (raw)
Hello,
Can somebody explain these differences?
> (gdb) maint time 1
> (gdb) break
/home/gru/projects/vxp/branches/branch-0-2-30-X/Dafit_Code/dafit2/dafit2/CPTApplication.cpp:370
> Breakpoint 1 at 0x8161436: file
/home/gru/projects/vxp/branches/branch-0-2-30-X/Dafit_Code/dafit2/dafit2/CPTApplication.cpp,
line 370.
> Command execution time: 5.840365
compare it to this:
> (gdb) break CPTApplication.cpp:370
> Breakpoint 1 at 0x8161436: file
/home/gru/projects/vxp/branches/branch-0-2-30-X/Dafit_Code/dafit2/dafit2/CPTApplication.cpp,
line 370.
> Command execution time: 0.708044
Setting a breakpoint with the complete path is awfully slow, while it is
ok when you give only the filename. /home is on an nfs mount where disk
access is expensive, but even without nfs, the difference is quite big. I
wrote a little benchmark and straced the "open" calls:
% strace -eopen -o /tmp/gdb2.strace gdb dafit_x86.bin -x
~/gdb-benchmark-only-names.gdb
% strace -eopen -o /tmp/gdb.strace gdb dafit_x86.bin -x ~/gdb-benchmark.gdb
% wc -l /tmp/gdb.strace /tmp/gdb2.strace
88350 /tmp/gdb.strace
20 /tmp/gdb2.strace
What? 80000 calls to "open" if I pass the whole path and only 20 otherwise?
BTW: This is debian stables gdb:
% dpkg -l gdb
||/ Name Version
Description
+++-===================================-===================================-======================================================================================
ii gdb 6.8-3
The GNU Debugger
I would be happy if somebody could explain this behaviour....
Thanks,
Markus Grunwald
--
Markus Grunwald http://the-grue.de
Registered Linux User Nr 101577
http://counter.li.org
next reply other threads:[~2010-08-09 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 6:30 Markus Grunwald [this message]
2010-08-09 16:37 ` Tom Tromey
2010-08-10 8:25 ` Antwort: " Martin.Runge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e94cd1ab56c877bb47ca240fed407176.squirrel@grunwald.homedns.org \
--to=markus.grunwald@gmx.de \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).