From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Have partial symbol tables own psymbol vectors
Date: Tue, 01 Sep 2020 08:20:04 -0600 [thread overview]
Message-ID: <87o8mp7f57.fsf@tromey.com> (raw)
In-Reply-To: <2898fce1-5b22-29ce-3338-01dc3ee629a9@simark.ca> (Simon Marchi's message of "Tue, 1 Sep 2020 09:24:30 -0400")
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> On 2020-08-31 1:09 p.m., Tom Tromey wrote:
>> The main drawback of this patch is that it increases the size of
>> partial symtab.
Simon> Regarding this: it seems to me like in the end, no more memory is used (even when
Simon> sharing partial symtabs between objfiles), it's just moved around, is that right?
Simon> If so, I don't understand why you say it's a "drawback", doesn't it make it sound
Simon> a bit scarier than it actually is?
No, a bit more memory is used.
Right now there are 2 std::vector<>s used for globals and static. (And
there is a pair used to track the vectors being updated.)
Each partial symtab currently has integer indexes into these vectors.
After the patch, the vectors are removed from the psymtab storage (this
is per-objfile, so IMO negligible), but now each partial symtab holds
two vectors. On my machine (x86-64 with GNU libstdc++), a std::vector<>
is 24 bytes. So, we're going from 4*sizeof(int) == 16 bytes per partial
symtab to 48 bytes per.
Tom
next prev parent reply other threads:[~2020-09-01 14:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 19:33 Tom Tromey
2020-08-30 19:18 ` Tom Tromey
2020-08-31 17:09 ` Tom Tromey
2020-08-31 21:39 ` Simon Marchi
2020-09-01 14:23 ` Tom Tromey
2020-09-01 14:28 ` Simon Marchi
2020-10-17 22:33 ` Tom Tromey
2020-09-01 13:24 ` Simon Marchi
2020-09-01 14:20 ` Tom Tromey [this message]
2020-09-01 14:30 ` Simon Marchi
2020-09-01 14:41 ` Simon Marchi
2020-09-01 17:59 ` Tom Tromey
2020-10-17 20:17 ` Tom Tromey
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=87o8mp7f57.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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