[PATCH 2/5] gdbsupport: Introduce interval_tree

Pedro Alves pedro@palves.net
Thu Jun 2 14:12:49 GMT 2022


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?


More information about the Gdb-patches mailing list