From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25539 invoked by alias); 22 Mar 2016 14:56:21 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 25489 invoked by uid 89); 22 Mar 2016 14:56:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_05,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=registering, julia, sk:issueco, 100k X-HELO: mail-qg0-f49.google.com Received: from mail-qg0-f49.google.com (HELO mail-qg0-f49.google.com) (209.85.192.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 22 Mar 2016 14:56:18 +0000 Received: by mail-qg0-f49.google.com with SMTP id w104so180242877qge.1 for ; Tue, 22 Mar 2016 07:56:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ft+3qoJKtdVlE+iwsvpmJX15w3gE28Df8/E45WXsgPE=; b=fj45DYfdumhlkxPG/HobQeH0CbAb7jVdgd6VHDmfXAgGWowrjhLfSVM9ofJ6ncbV3O uUORHo27VVEmiIKH6QB+HsGVUkNXLtexVZNu+/blfuF6XLOt/iVkRsbDlrc6YbIblSgW /oIOhs2FHVWnnbCUyYhaMtDEmEq+i2gS0TOgGG3/53aVH25xo6TGgfBfc1sgfNhVnFT0 q3QekQCgxwap+jcJim6zwtcb9lGdWRt+/pWzzC7JZDd+4VbXRRpaRuLczz23KoVTdJeL qFNHt1h5hLFpGXloIQr9TrIvJtymNisv0rc43nrCIv8w+1OFd+CkrTAeOnEl62vr/tS/ Eo5A== X-Gm-Message-State: AD7BkJKmrL1yzm2XxwuphMgYB27YrFsMzBMYu38nBVj3iWaTbjgOacGJT2L5YcFPSImpo+vh7f+El9EM1JfdgA== X-Received: by 10.140.172.212 with SMTP id s203mr49043911qhs.41.1458658576692; Tue, 22 Mar 2016 07:56:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.189.130 with HTTP; Tue, 22 Mar 2016 07:55:57 -0700 (PDT) From: Yichao Yu Date: Tue, 22 Mar 2016 14:56:00 -0000 Message-ID: Subject: JIT debugging (Attach and speed) To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00023.txt.bz2 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 `) 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