public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Update maint.exp for string cache
Date: Thu, 05 Mar 2020 09:10:00 -0000	[thread overview]
Message-ID: <360e7f2c-fb3f-32ea-c957-a0cc43bb48f0@suse.de> (raw)
In-Reply-To: <87k13z7ke7.fsf@tromey.com>

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

[ was: Re: [PATCH] Introduce objfile::intern ]
On 05-03-2020 00:47, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tom@tromey.com> 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

[-- Attachment #2: 0001-gdb-testsuite-Update-maint.exp-for-string-cache.patch --]
[-- Type: text/x-patch, Size: 2482 bytes --]

[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  <tdevries@suse.de>

	* 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"

      reply	other threads:[~2020-03-05  9:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24  2:58 [PATCH] Introduce objfile::intern Tom Tromey
2020-03-04 23:47 ` Tom Tromey
2020-03-05  9:10   ` Tom de Vries [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=360e7f2c-fb3f-32ea-c957-a0cc43bb48f0@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).