From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8045 invoked by alias); 27 Dec 2009 03:40:35 -0000 Received: (qmail 8037 invoked by uid 22791); 27 Dec 2009 03:40:34 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 27 Dec 2009 03:40:30 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 284AD2BABF3; Sat, 26 Dec 2009 22:40:29 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QAnr-H4UlOle; Sat, 26 Dec 2009 22:40:29 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 91D4B2BABF2; Sat, 26 Dec 2009 22:40:27 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 9B45DF5937; Sun, 27 Dec 2009 04:39:48 +0100 (CET) Date: Sun, 27 Dec 2009 03:40:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFC: save lots of memory Message-ID: <20091227033948.GA6597@adacore.com> References: <20091105172839.GI4557@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091105172839.GI4557@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00397.txt.bz2 > I'm looking forward to measuring the impact on memory and performance > with one of the bigger apps we have in house :-). I finally took the time to make some measurements. The app I used has about 600kSLOCs (with comments, it is a little over a million lines) of Ada, builds and link to about 145MB of code and 70MB of debug info making a grand total of 215MB. GDB startup time: 3.125s -> 2.369s => delta: -0.756s / -24.1 % Peak memory usage: 158.3MB -> 70.9MB => delta: -87.4MB / -55.0 % The same, but with -readnow: GDB startup time: 7.339s -> 6.461s => delta: 0.878s / - 11.9% Peak memory usage: 568.4MB -> 429.5MB => delta: -138.9MB / -24.4 % Unsurprisingly, symbol lookup time did not appear to be affected either way. I also quickly tried a patch suggested by Tom (attached), and got worse results on both startup time and memory usage. No visible effect on lookup performance. Not sure why, yet. I will keep the idea in mind, though. For now, I must switch to something else again. Impressive numbers nonetheless. This is a really nice catch, Tom! -- Joel