From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Tom Tromey <tom@tromey.com>
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
gdb-patches@sourceware.org
Subject: Re: [PATCH v2 0/8] Demangle minimal symbol names in worker threads
Date: Tue, 21 May 2019 07:35:00 -0000 [thread overview]
Message-ID: <20190521073520.GD2568@embecosm.com> (raw)
In-Reply-To: <87a7figtpz.fsf@tromey.com>
* Tom Tromey <tom@tromey.com> [2019-05-19 12:55:04 -0600]:
> >>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
>
> Philippe> That looks like a nice startup speed improvement, will be much appreciated
> Philippe> when debugging big executables at work :).
>
> Philippe> I however do not observe much parallel CPU being used.
> Philippe> What type of operations will be mostly helped by parallel threads ?
>
> With this series, only demangling of minimal symbols is parallelized.
> This does not dominate startup except in unusual situations, maybe a
> very large C++ library that has no debuginfo and is unstripped.
>
> Locally I only saw utilization of 1.5 CPUs or so -- so, not very
> parallel yet.
>
> The real point of this series is to flush out some of the lower-level
> problems with having threading in gdb, so we can use it in more places.
> For example, in this series, the SEGV handler stuff; but also this was
> the reason for the big exception handling changes.
>
> A better win, I think, would be to parallelize partial symbol reading in
> dwarf2read.c. This is a bit tricky... there are cross-CU references to
> consider, and also the bcache seems like a point of contention. I've
> been wondering if, instead, it would make sense to change the DWARF
> reader not to make partial symbols at all.
>
> Philippe> One comment about 'maint set|show enable-threads' :
> Philippe> what is the reason to have this as a maintenance command ?
>
> I see it as a setting for gdb developers, not gdb users. In fact, v1
> didn't have this, but John wanted a way to disable threading for
> debugging gdb.
>
> Philippe> Also, maybe it would be better to have this setting being the
> Philippe> maximum nr of threads to use. In some environments (e.g.
> Philippe> operational environments), one might want to limit the nr of threads
> Philippe> used by GDB.
>
> I think that most users don't know what most programs do under the hood;
> nor should they need to. I suppose in some extreme situation maybe
> someone would want to do this, but disabling threading in this case
> should be good enough. Users like this should probably use gdbserver
> instead though.
Sorry for being really slow, but how does gdbserver help here? The
threads are to help GDB parse the symbols/debug information from the
ELF, right? In most cases GDB will still be parsing the symbols/debug
from the ELF at the GDB end, not the gdbserver end.
>
> Philippe> Note also that I see GDB is starting some threads by default
> Philippe> when guile is configured in, and 'maint set enable-threads off'
> Philippe> seems to not disable this type of threading.
>
> Guile creates threads by default. In general gdb can't control the
> threads made by either Guile or Python, because those can be made by
> scripts created at runtime.
Sure, but I think there's a difference between threads the user has
specifically _asked_ GDB to create (through a script) and threads that
are started to support some builtin GDB feature.
Most users don't build their own GDB (I assume) so don't choose to
enable guile support or not, so I think it probably is worth
mentioning that the guile threads can't be disabled with this flag.
Thanks,
Andrew
next prev parent reply other threads:[~2019-05-21 7:35 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 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-18 21:00 ` [PATCH v2 1/8] Defer minimal symbol name-setting 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 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-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 [this message]
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
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 2/2] Precompute hash value for symbol_set_names Christian Biesinger via gdb-patches
2019-10-03 18:15 ` [PATCH v2 1/2] Don't use the mutex for each symbol_set_names call Christian Biesinger via gdb-patches
2019-09-30 21:45 ` [PATCH] " 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=20190521073520.GD2568@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
--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