From patchwork Thu Mar 5 09:10:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 38425 Received: (qmail 3644 invoked by alias); 5 Mar 2020 09:10:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 3632 invoked by uid 89); 5 Mar 2020 09:10:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=unread, HX-Languages-Length:3018 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Mar 2020 09:10:58 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BF306AE1C; Thu, 5 Mar 2020 09:10:53 +0000 (UTC) Subject: [committed][gdb/testsuite] Update maint.exp for string cache To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20200224025819.18873-1-tom@tromey.com> <87k13z7ke7.fsf@tromey.com> From: Tom de Vries Message-ID: <360e7f2c-fb3f-32ea-c957-a0cc43bb48f0@suse.de> Date: Thu, 5 Mar 2020 10:10:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <87k13z7ke7.fsf@tromey.com> X-IsSubscribed: yes [ was: Re: [PATCH] Introduce objfile::intern ] On 05-03-2020 00:47, Tom Tromey wrote: >>>>>> "Tom" == Tom Tromey writes: > > Tom> This introduces a string cache on the per-BFD object, replacing the > Tom> macro and filename caches. Both of these caches just store strings, > Tom> so this consolidation by itself saves a little memory (about the size > Tom> of a bcache per objfile). > > I'm checking this in now. This caused a regression in gdb.base/maint.exp, fixed by committed patch below. Thanks, - Tom [gdb/testsuite] Update maint.exp for string cache When running gdb.base/maint.exp, I see: ... FAIL: gdb.base/maint.exp: maint print statistics ... This is due to commit be1e3d3eab "Introduce objfile::intern", which replaces the macro and filename caches with a string cache. Update maint.exp accordingly. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-03-05 Tom de Vries * gdb.base/maint.exp: Update "main print statistics" expected output. --- gdb/testsuite/gdb.base/maint.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index fe25e0fc61..f6eeb98a20 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -200,7 +200,7 @@ if [istarget "*-*-cygwin*"] { send_gdb "maint print statistics\n" gdb_expect { - -re "Statistics for\[^\n\r\]*maint\[^\n\r\]*:\r\n Number of \"minimal\" symbols read: $decimal\r\n( Number of \"partial\" symbols read: $decimal\r\n)? Number of \"full\" symbols read: $decimal\r\n Number of \"types\" defined: $decimal\r\n( Number of psym tables \\(not yet expanded\\): $decimal\r\n)?( Number of read CUs: $decimal\r\n Number of unread CUs: $decimal\r\n)? Number of symbol tables: $decimal\r\n Number of symbol tables with line tables: $decimal\r\n Number of symbol tables with blockvectors: $decimal\r\n Total memory used for objfile obstack: $decimal\r\n Total memory used for BFD obstack: $decimal\r\n Total memory used for psymbol cache: $decimal\r\n Total memory used for macro cache: $decimal\r\n Total memory used for file name cache: $decimal\r\n" { + -re "Statistics for\[^\n\r\]*maint\[^\n\r\]*:\r\n Number of \"minimal\" symbols read: $decimal\r\n( Number of \"partial\" symbols read: $decimal\r\n)? Number of \"full\" symbols read: $decimal\r\n Number of \"types\" defined: $decimal\r\n( Number of psym tables \\(not yet expanded\\): $decimal\r\n)?( Number of read CUs: $decimal\r\n Number of unread CUs: $decimal\r\n)? Number of symbol tables: $decimal\r\n Number of symbol tables with line tables: $decimal\r\n Number of symbol tables with blockvectors: $decimal\r\n Total memory used for objfile obstack: $decimal\r\n Total memory used for BFD obstack: $decimal\r\n Total memory used for psymbol cache: $decimal\r\n Total memory used for string cache: $decimal\r\n" { gdb_expect { -re "$gdb_prompt $" { pass "maint print statistics"