From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21093 invoked by alias); 26 Apr 2006 14:07:32 -0000 Received: (qmail 20995 invoked by uid 22791); 26 Apr 2006 14:07:31 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Apr 2006 14:07:26 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FYkfU-00039L-MI for gdb@sources.redhat.com; Wed, 26 Apr 2006 16:07:01 +0200 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Apr 2006 16:07:00 +0200 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Apr 2006 16:07:00 +0200 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: MI: performance of getting stack arguments Date: Wed, 26 Apr 2006 14:10:00 -0000 Message-ID: References: <20060418161654.GA15524@nevyn.them.org> <200604191020.08044.ghost@cs.msu.su> <20060419124032.GA9524@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00317.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Apr 19, 2006 at 10:20:07AM +0400, Vladimir Prus wrote: >> It's specifically the -stack-list-arguments command that takes 600ms. The >> separately issued -stack-list-frames takes 150ms which is not fast >> either, but not as bad as -stack-list-arguments. > > OK, there is probably something absurdly stupid going on then. > >> > If it's the arguments, >> > we may be able to improve it. Maybe build a debuggable GDB and "maint >> > set profile"? >> >> Sure. What's the right way to build debuggable GDB, setting CFLAGS=-g >> during configure or something else? > > Two ways. You can use --enable-profiling as Eli suggested, which will > let you get callgraphs, or you can just use a binary built with the > default CFLAGS (-O2 -g), and "maint set profile". You have to use > gprof --no-graph on the output file to get output if you do that. I > still find it useful - e.g. the numbers I posted to dmi-discuss > yesterday came from that. Its advantage is that it doesn't inflate > small functions as badly. Ok, I'll try to do this. First on -stack-list-arguments, since it's pretty slow to. But, maybe I should be using callgrind (part of valgrind suite) for profiling? - Volodya