From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Pedro Alves <pedro@palves.net>, Tom Tromey <tromey@adacore.com>,
Andrew Burgess <aburgess@redhat.com>
Cc: Andreas Arnez <arnez@linux.ibm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/5] gdbsupport: Introduce interval_tree
Date: Thu, 02 Jun 2022 16:17:34 +0200 [thread overview]
Message-ID: <19b206abe3cbfac36f8f8b1296094b2e41c54376.camel@linux.ibm.com> (raw)
In-Reply-To: <9e99b32f-10c8-5dff-bb4f-575bfec8ded8@palves.net>
On Thu, 2022-06-02 at 15:12 +0100, Pedro Alves wrote:
> On 2022-06-02 14:35, Ilya Leoshkevich wrote:
> >
> > Adding N JITed sections has the complexity O((N**2)*log(N)),
> > because
> > adding each section involves breakpoint handling, which needs to
> > resolve PCs and thus calls update_section_map(). When N is around
> > 10k,
> > this renders GDB unusable.
>
> Does this adding of N JITed sections happen in batch? Like, is this
> from
> jit_inferior_init, where we loop over JIT objects? Or is it so that
> we
> get notified about JIT objects, one at a time?
>
> In places where we add symbols in batch, we defer breakpoint
> re_setting exactly
> to avoid problems like this, via SYMFILE_DEFER_BP_RESET or something
> similar.
> Looks like jit.c doesn't try to do that. Or is it not possible in
> the scenario
> in question? Like, doesn't the JIT API let you register more than
> one object
> file at once?
In the scenario I'm running into, GDB is notified about them one by
one. I don't think there is a batch API ([1] doesn't mention anything
like this), but even if there were, it wouldn't help in the general
case, because the decisions to JIT individual methods may be split in
time.
[1]
https://sourceware.org/gdb/onlinedocs/gdb/Registering-Code.html#Registering-Code
next prev parent reply other threads:[~2022-06-02 14:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 13:35 [PATCH 0/5] gdb: Store section map in an interval tree Ilya Leoshkevich
2022-06-02 13:35 ` [PATCH 1/5] gdbsupport: Introduce obstack_newvec Ilya Leoshkevich
2022-06-02 14:31 ` Tom Tromey
2022-06-02 14:33 ` Ilya Leoshkevich
2022-06-02 13:35 ` [PATCH 2/5] gdbsupport: Introduce interval_tree Ilya Leoshkevich
2022-06-02 14:12 ` Pedro Alves
2022-06-02 14:17 ` Ilya Leoshkevich [this message]
2022-06-02 14:12 ` Pedro Alves
2022-06-02 14:37 ` Pedro Alves
2022-06-02 15:09 ` Ilya Leoshkevich
2022-06-02 18:04 ` Tom Tromey
2022-06-02 13:35 ` [PATCH 3/5] gdbsupport: Add interval_tree unit tests Ilya Leoshkevich
2022-06-02 13:35 ` [PATCH 4/5] gdbsupport: Add interval_tree fuzzing harness Ilya Leoshkevich
2022-06-02 13:35 ` [PATCH 5/5] gdb: Optimize section map Ilya Leoshkevich
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=19b206abe3cbfac36f8f8b1296094b2e41c54376.camel@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=aburgess@redhat.com \
--cc=arnez@linux.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
--cc=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).