From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17321 invoked by alias); 22 Mar 2016 16:47:34 -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 17279 invoked by uid 89); 22 Mar 2016 16:47:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2163 X-HELO: mail-qg0-f52.google.com Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 22 Mar 2016 16:47:30 +0000 Received: by mail-qg0-f52.google.com with SMTP id y89so183770019qge.2 for ; Tue, 22 Mar 2016 09:47:30 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sF+3FQT63G5Ss7sTsj0TI6RrSkNfXX3jviplzL4VaPQ=; b=TW1R2JbZjkjvA4Uc7GSPDBpSkzZV668ro/FquVx6HJ+6Ee/bRxuISRxy8IQZ+BHR36 tjT9DXjmqfE9tlchJJyfSwNqEZKUZfl8LwO4uU+nkTo7fwLH7oN/EowgI6Fk6o7XhME4 C0rtAWvWj3vIrF9wTfR3FombH07jel2hxS46/7DH4eYXp9Y/E2bDICA7ecFkaNjQ1Q/f Qh68z/5/LlewMGBAFQE7VICtQOEfenVfV7qk5zfas4FAB6w2Xr6wgu26CDHuU2w1wwhD PTm+Hhz7JaViVxaYgBjYG4XosC/WInXK1xF9XejhZnXicMOLqij6PDTT45EY760zL6Ur Xg0A== X-Gm-Message-State: AD7BkJKITRiE+iIbToH5X1mHpr32breu0fCCMbikbjFEArMkqhF2tlZ9uLuIX66LAlXfg1vkPzmSqsi0HfeDOg== X-Received: by 10.140.100.246 with SMTP id s109mr48288021qge.35.1458665248340; Tue, 22 Mar 2016 09:47:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.189.130 with HTTP; Tue, 22 Mar 2016 09:47:09 -0700 (PDT) In-Reply-To: <56F1759F.3070100@redhat.com> References: <56F168D7.9050405@redhat.com> <56F16F8F.9050404@redhat.com> <56F1759F.3070100@redhat.com> From: Yichao Yu Date: Tue, 22 Mar 2016 16:47:00 -0000 Message-ID: Subject: Re: JIT debugging (Attach and speed) To: Pedro Alves Cc: gdb@sourceware.org, Paul Pluzhnikov Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00029.txt.bz2 On Tue, Mar 22, 2016 at 12:41 PM, Pedro Alves wrote: > On 03/22/2016 04:22 PM, Yichao Yu wrote: >> On Tue, Mar 22, 2016 at 12:15 PM, Pedro Alves wrote: >>> On 03/22/2016 03:46 PM, Pedro Alves wrote: >> >>> I re-read the 2011 discussion, and it seems like we had an idea for a fix: >> >> IIUC the proposed fix might cause regression in some cases? > > Yeah, there's no full fix available, only some ideas thrown out. > The last discussed one wouldn't cause a regression -- the > "longjmp"-caching idea. We may still need to defer breakpoint re-set > to at most once per jit load event, something like Paul's original > patch, but with a breakpoint_re_set call somewhere. > > It'd even be better to somehow restrict breakpoint re-setting > to the jit modules that were added/removed/changed, but > that's harder. > >> >>>> >>>> Do you know whether this happens with 7.11 and master, and if so, >>>> would it be possible for you to git bisect the culprit? >> >> This is 7.11 package from ArchLinux. I could try bi-secting although >> apparently you are faster at pin-point the issue. >> >>> >>> Currently, jit_inferior_created_hook -> jit_inferior_init is only >>> called when the inferior execs... >>> >>> Grepping around, I think that might have been >>> the fix for PR gdb/13431 (03bef283c2d3): >>> https://sourceware.org/ml/gdb-patches/2012-02/msg00023.html >>> which removed the inferior_created (jit_inferior_created_observer). >>> >>> Adding an inferior_created observer back likely fixes the issue. >> >> I'm happy to test patches. > > I'm happy to provide guidance, but a fix would likely happen faster > if someone else stepped up to write it. Are these lines (or at least the first one) the ones you think should be added back? - observer_attach_inferior_created (jit_inferior_created_observer); observer_attach_inferior_exit (jit_inferior_exit_hook); - observer_attach_executable_changed (jit_executable_changed_observer); I can try that although I'm not particularly sure what was the reason they are removed and how to check for regressions. > > Thanks, > Pedro Alves >