From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9463 invoked by alias); 21 Apr 2007 13:41:32 -0000 Received: (qmail 9454 invoked by uid 22791); 21 Apr 2007 13:41:31 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Apr 2007 14:41:26 +0100 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id E31194B26F; Sat, 21 Apr 2007 08:41:23 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id C940C4B26D; Sat, 21 Apr 2007 08:41:23 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HfFq2-0002jG-0E; Sat, 21 Apr 2007 09:41:18 -0400 Date: Sat, 21 Apr 2007 13:41:00 -0000 From: Daniel Jacobowitz To: jagorak Cc: gdb@sourceware.org Subject: Re: Setting a variable is very slow. Message-ID: <20070421134117.GA10446@caradoc.them.org> Mail-Followup-To: jagorak , gdb@sourceware.org References: <1546343093.20070421134325@wp.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1546343093.20070421134325@wp.pl> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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: 2007-04/txt/msg00135.txt.bz2 On Sat, Apr 21, 2007 at 01:43:25PM +0100, jagorak wrote: > I need to make hundreds of such assignments & calls. The problem is - > setting a single variable is very slow (in most cases it takes much > more time to set a single variable than to call a procedure, even if > the procedure is not very simple). > > Any ideas why this is the case? I know of some problems in this area, but it's not clear which one is your problem here. Could you try building gdb with --enable-profiling? It should generate a gmon.out. That might not show the real problem; if you want to just build a debuggable version and use oprofile, that might work better. It depends whether GDB is eating CPU or being wasteful with ptrace operations. -- Daniel Jacobowitz CodeSourcery