From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17507 invoked by alias); 9 Aug 2010 06:30:54 -0000 Received: (qmail 17496 invoked by uid 22791); 9 Aug 2010 06:30:53 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_DP,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mail.gmx.net) (213.165.64.23) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 09 Aug 2010 06:30:48 +0000 Received: (qmail invoked by alias); 09 Aug 2010 06:30:44 -0000 Received: from p57AE066A.dip0.t-ipconnect.de (EHLO benji) [87.174.6.106] by mail.gmx.net (mp025) with SMTP; 09 Aug 2010 08:30:44 +0200 Received: from grunwald.homedns.org (localhost [127.0.0.1]) by benji (Postfix) with ESMTP id 7ED82859D for ; Mon, 9 Aug 2010 08:29:46 +0200 (CEST) Received: from 212.222.53.78 (SquirrelMail authenticated user markus) by grunwald.homedns.org with HTTP; Mon, 9 Aug 2010 08:29:46 +0200 (CEST) Message-ID: Date: Mon, 09 Aug 2010 06:30:00 -0000 Subject: Big speed differences when setting breakpoints From: "Markus Grunwald" To: gdb@sourceware.org User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00049.txt.bz2 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