public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29854] ^C should interrupt synchronous wait on cooked index completion
Date: Tue, 06 Dec 2022 15:34:22 +0000 [thread overview]
Message-ID: <bug-29854-4717-QQTQ9cTQ4d@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29854-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=29854
--- Comment #5 from Simon Marchi <simark at simark dot ca> ---
(In reply to Tom Tromey from comment #4)
> Created attachment 14484 [details]
> patch
>
> I couldn't really test this, but maybe you can?
It works.
For fun, I added a "maintenance wait-finalize" command, that does:
static void
maintenance_wait_finalize (const char *args, int from_tty)
{
inferior *inf = current_inferior ();
for (objfile *o : inf->pspace->objfiles ())
{
dwarf_scanner_base *s
= get_dwarf2_per_objfile (o)->per_bfd->index_table.get ();
cooked_index_vector *v = dynamic_cast<cooked_index_vector *> (s);
if (!v)
continue;
printf("Waiting for %s\n", objfile_name (o));
v->wait ();
}
}
This way, I can measure how much time GDB takes to make the index with:
$ /usr/bin/time ./gdb -nx -q --data-directory=data-directory
testsuite/outputs/gdb.gdb/selftest/xgdb -ex "maint wait-finalize" -batch
With my unoptimized build, it takes about 30 seconds. With my optimized build
(on the same binary), it takes 2 seconds. I noticed this, because I would
start gdb.gdb/selftest.exp, then try to interrupt with ^C during the "break
captured_main" command, and runtest would hang for a while, waiting for the GDB
process to exit.
So, it's not really important to fix this, but it fixes an annoyance.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2022-12-06 15:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 19:43 [Bug gdb/29854] New: " simon.marchi at polymtl dot ca
2022-12-05 23:34 ` [Bug gdb/29854] " tromey at sourceware dot org
2022-12-06 0:00 ` tromey at sourceware dot org
2022-12-06 2:38 ` simark at simark dot ca
2022-12-06 15:05 ` tromey at sourceware dot org
2022-12-06 15:34 ` simark at simark dot ca [this message]
2022-12-06 19:09 ` tromey at sourceware dot org
2022-12-06 19:29 ` tromey at sourceware dot org
2022-12-25 19:55 ` tromey at sourceware dot org
2023-02-09 14:35 ` cvs-commit at gcc dot gnu.org
2023-02-09 14:35 ` tromey at sourceware dot org
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=bug-29854-4717-QQTQ9cTQ4d@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@sourceware.org \
/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).