From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>,
Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [committed][gdb/symtab] Make per_cu->unit_type atomic
Date: Sun, 17 Jul 2022 15:15:35 +0200 [thread overview]
Message-ID: <4225064d-73d9-52bd-fc21-341e787af40b@suse.de> (raw)
In-Reply-To: <874jzht55r.fsf@tromey.com>
On 7/16/22 18:04, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Tom> - packed<dwarf_unit_type, 1> m_unit_type = (dwarf_unit_type) 0;
> Tom> + std::atomic<packed<dwarf_unit_type, 1>> m_unit_type {(dwarf_unit_type)0};
>
> I was thinking about this patch this morning and I wonder if packed<> is
> even needed now that the member is atomic.
With packed:
...
std::atomic<packed<dwarf_unit_type, 1>> m_unit_type {(dwarf_unit_type)0};
...
we have:
...
/* size: 120, cachelines: 2, members: 22 */
...
and without:
...
std::atomic<dwarf_unit_type> m_unit_type {(dwarf_unit_type)0};
...
we have:
...
/* size: 128, cachelines: 2, members: 22 */
...
So it's necessary to keep the struct small.
Thanks,
- Tom
prev parent reply other threads:[~2022-07-17 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 6:19 Tom de Vries via Gdb-patches
2022-07-16 16:04 ` Tom Tromey
2022-07-17 13:15 ` Tom de Vries via Gdb-patches [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=4225064d-73d9-52bd-fc21-341e787af40b@suse.de \
--to=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
--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