From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21429 invoked by alias); 4 Apr 2002 18:49:47 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21397 invoked from network); 4 Apr 2002 18:49:44 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 4 Apr 2002 18:49:44 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 16tCIv-00012s-00; Thu, 04 Apr 2002 13:49:49 -0500 Date: Thu, 04 Apr 2002 10:49:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: Andrew Cagney , gdb@sources.redhat.com Subject: Re: gdb/457: GDB runs slow (internal doco needed) (FAQ) Message-ID: <20020404134949.A3989@nevyn.them.org> Mail-Followup-To: Kevin Buettner , Andrew Cagney , gdb@sources.redhat.com References: <20020404165802.6629.qmail@sources.redhat.com> <3CAC91A0.3000702@cygnus.com> <1020404184426.ZM28992@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1020404184426.ZM28992@localhost.localdomain> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-04/txt/msg00062.txt.bz2 On Thu, Apr 04, 2002 at 11:44:27AM -0700, Kevin Buettner wrote: > On Apr 4, 12:47pm, Andrew Cagney wrote: > > > >> Related to the above. Being able to identify just the information that changed so that GUI refresh operations are limited to areas that need an update. See varobj.[ch]. > > > > > If profiling GDB to improve performance it is important to look > > > > beyond the raw numbers (some one line pid/tid functions come up as > > > > ``hot spots'') and more at the overall picture (the thread_info > > > > object should be used). Replacing apparently hot functions with > > > > macros isn't an option. > > > > > > If the thread_info object is used, we're still going to have all the > > > little accessor functions. Why the categorical objection to macros? > > > Especially in places that they would especially benefit compiler > > > performance, like one-line accessor macros? And even more so since GDB > > > will soon support better macro debugging... > > > > I'll be ok with macro's when you can step into them, print their local > > (macro) variables, ensure (using compiler warnings) that the user can't > > grub a round directly in the object the macro is wrapping, not have any > > side effects, not have pass by name problems, .... > > Even static functions in headers are less evil than macros. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Hmm... > > Jim Blandy recently added an autoconf test for ``inline'', right? I'm > wondering if it'd be possible to define functions like ptid_get_pid() > as being inline (in a header file like defs.h)? I was just thinking the same thing :) > --- time passes --- > > I've done a bit more checking. It appears that autoconf defines ``inline'' > as follows when it's not supported by the compiler: > > #define inline > > I think it might work if it were defined like this instead: > > #define inline static No, it's simpler than that. You define the functions in headers as 'static inline'. I think that works quite far back along the train of C history. Now, I could easily check what difference it made if the profile patches had ever made it into GDB... -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer