From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 0/8] Demangle minimal symbol names in worker threads
Date: Fri, 31 May 2019 17:13:00 -0000 [thread overview]
Message-ID: <1559322805.1454.45.camel@skynet.be> (raw)
In-Reply-To: <87sgsvcpax.fsf@tromey.com>
On Thu, 2019-05-30 at 20:48 -0600, Tom Tromey wrote:
> Tom> Locally I only saw utilization of 1.5 CPUs or so -- so, not very
> Tom> parallel yet.
>
> I found the "mutrace" tool and it looks like the new mutex is heavily
> contended. This is pretty much what I suspected, but still unfortunate.
>
> $ mutrace -d ./gdb -nx -batch ./gdb
> [...]
> Mutex # Locked Changed Cont. tot.Time[ms] avg.Time[ms] max.Time[ms] Flags
> 2 3714780 45723 26425 975.514 0.000 22.141 M-.--.
>
> I'm not really sure what to do about it.
Use lockless data structures (e.g. concurrencykit.org) ?
But I am quite sure such lockless libraries/data structures will not
be available on all supported GDB platforms, so it might not be very
cheap to change and maintain GDB to use e.g. lockless hash tables
on some platforms and some other hash tables in less common platforms.
Alternatively, develop a few GDB specific lockless data structures
that are protected by a mutex and/or are single threads on less
common platforms ?
>
> I do wonder if there are many duplicates when demangling minsym names.
> One idea would be to demangle in parallel and only then fill in the
> table.
>
> A similar problem will occur when/if we want to parallelize psymbol
> reading. Those use the demangle hash table, but also the bcache. (The
> bcache is important, but I found recently that the demangling isn't
> really needed -- the names are demangled due to the physname work, and
> the demangle hash table is only used to ensure that the bcache gives
> good results. Removing the demangling step here can also provide a nice
> speedup...)
>
> Tom
next prev parent reply other threads:[~2019-05-31 17:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-18 21:00 Tom Tromey
2019-05-18 21:00 ` [PATCH v2 6/8] Introduce thread-safe way to handle SIGSEGV Tom Tromey
2019-05-18 21:00 ` [PATCH v2 5/8] Introduce run_on_main_thread Tom Tromey
2019-05-18 21:00 ` [PATCH v2 2/8] Remove static buffer from ada_decode Tom Tromey
2019-05-18 21:00 ` [PATCH v2 8/8] Add maint set/show enable-threads Tom Tromey
2019-05-22 5:01 ` Eli Zaretskii
2019-05-26 20:46 ` Tom Tromey
2019-05-27 2:32 ` Eli Zaretskii
2019-05-18 21:00 ` [PATCH v2 7/8] Demangle minsyms in parallel Tom Tromey
2019-05-18 21:00 ` [PATCH v2 1/8] Defer minimal symbol name-setting Tom Tromey
2019-05-18 21:00 ` [PATCH v2 4/8] Lock the demangled hash table Tom Tromey
2019-05-18 21:00 ` [PATCH v2 3/8] Add configure check for std::thread Tom Tromey
2019-05-19 13:59 ` [PATCH v2 0/8] Demangle minimal symbol names in worker threads Philippe Waroquiers
2019-05-19 18:55 ` Tom Tromey
2019-05-21 0:35 ` Philippe Waroquiers
2019-05-21 7:35 ` Andrew Burgess
2019-05-21 15:45 ` Tom Tromey
2019-05-21 16:21 ` Andrew Burgess
2019-05-31 2:48 ` Tom Tromey
2019-05-31 17:13 ` Philippe Waroquiers [this message]
2019-09-29 0:35 ` [PATCH] Don't use the mutex for each symbol_set_names call Christian Biesinger via gdb-patches
2019-09-30 14:18 ` Tom Tromey
2019-09-30 16:55 ` Christian Biesinger via gdb-patches
2019-10-02 17:18 ` Tom Tromey
2019-10-02 18:20 ` Christian Biesinger via gdb-patches
2019-10-02 22:02 ` Christian Biesinger via gdb-patches
2019-10-03 18:15 ` [PATCH v2 1/2] " Christian Biesinger via gdb-patches
2019-10-03 18:15 ` [PATCH v2 2/2] Precompute hash value for symbol_set_names Christian Biesinger via gdb-patches
2019-09-30 21:45 ` [PATCH] Don't use the mutex for each symbol_set_names call Christian Biesinger via gdb-patches
2019-10-01 17:02 ` 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=1559322805.1454.45.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--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