Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* JIT debugging (Attach and speed)
@ 2016-03-22 14:56 Yichao Yu
  2016-03-22 15:46 ` Pedro Alves
  0 siblings, 1 reply; 19+ messages in thread
From: Yichao Yu @ 2016-03-22 14:56 UTC (permalink / raw)
  To: gdb

Hi,

I've recently seen some issues when debugging julia JIT code with GDB.
Some of these might worth a bug report but I'd like to post here first
since the most blocking issue was discussed here a few years ago.

1. Registering JIT code to GDB is O(n^2) and this is very bad for
serious JIT users like julia. (I've seen 10k to 100k jit objects
generated in the test)

   The issue was discussed on this list ~2011[1] but it seems that the
issue is still there. I was also told that lldb 3.8 should support the
same JIT debugging interface without the O(n^2) slow down[2].

2. JIT code registration on attach is broken.

    When I set a breakpoint on `jit_inferior_init`[3] (i.e. lauching
gdb with `gdb --args gdb -p <pid_to_debug>`) which IIUC is what
responsible for walking the jit object list at init time, it seems
that the function is never called.

    (I haven't seen a bug report about this yet)

3. (minor) Reading debug info from JIT object file generates read of large size.

   This triggers an assertion in rr[4]. It's arguably rr's fault to
assume a upper limit on the read request size (fixed now) but since
this doesn't happen otherwise I'd just like to point this out in case
some optimization is needed here.

[1] https://sourceware.org/ml/gdb/2011-01/msg00002.html
[2] https://github.com/JuliaLang/julia/issues/14846#issuecomment-176902134
[3] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/jit.c;h=afc1c517fa745582bd198601e46a77af72114017;hb=HEAD#l1323
[4] https://github.com/mozilla/rr/issues/1665#issuecomment-192983671


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-03-24 21:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-22 14:56 JIT debugging (Attach and speed) Yichao Yu
2016-03-22 15:46 ` Pedro Alves
2016-03-22 16:10   ` Paul Pluzhnikov
2016-03-22 16:15   ` Pedro Alves
2016-03-22 16:23     ` Yichao Yu
2016-03-22 16:41       ` Pedro Alves
2016-03-22 16:47         ` Yichao Yu
2016-03-22 17:00           ` Pedro Alves
2016-03-23  2:18             ` Yichao Yu
2016-03-23  4:51               ` Yichao Yu
2016-03-23 18:24                 ` Pedro Alves
2016-03-23 19:32                   ` Yichao Yu
2016-03-23 19:48                     ` Pedro Alves
2016-03-23 20:51                       ` Yichao Yu
2016-03-24  1:17                         ` Pedro Alves
2016-03-24  3:14                           ` Yichao Yu
2016-03-24 21:02                             ` Yichao Yu
2016-03-23 12:24               ` Pedro Alves
2016-03-23 13:31                 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox