From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22267 invoked by alias); 5 Jun 2012 22:21:28 -0000 Received: (qmail 22258 invoked by uid 22791); 5 Jun 2012 22:21:26 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pz0-f41.google.com (HELO mail-pz0-f41.google.com) (209.85.210.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jun 2012 22:21:12 +0000 Received: by dakp5 with SMTP id p5so8257638dak.0 for ; Tue, 05 Jun 2012 15:21:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:x-gm-message-state; bh=HH5UmqQlKGsQov7eKL8GSN6EZTVs1Q9Hb8dUN5kLikA=; b=OpmT61u0xPMf+F8Q5AtkywcFiUdEDHK/EqB6NJgMsdynHJK+6dxXvdMf4G3uMwu/jw BvWSlHSAI0oelVP+KBV3TZ7LaIOi8Z3qnsa8Xwq8FztRv05P6jMjqHJq6xxW4cN4UqOm NV3PJCX4/j7bV3pIIlAfNExD9K30atx6By93Q6b0w0msOIdXvA3YCyL0gPYBPjITbEo2 eScX5soGohlfTJqzELrxhoTCo5eMoK3+d3SVFlSzPkd7hL2Q4Srrky0d7ne5lvtj+4Rb ojSdU2BsBKahWuTqaYQIKuhXJZNLhuHnH3qP407TorzkOOl6pE87jgfibYdD8UkavjYq 10XQ== Received: by 10.68.136.69 with SMTP id py5mr16094714pbb.115.1338934871899; Tue, 05 Jun 2012 15:21:11 -0700 (PDT) Received: from garudatw.twitter.com ([8.25.195.25]) by mx.google.com with ESMTPS id iu6sm146484pbc.35.2012.06.05.15.21.09 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 15:21:10 -0700 (PDT) From: Kaushik Srenevasan To: Daniel Jacobowitz Cc: gdb@sourceware.org Subject: Re: Hotspot JVM GDBJIT plugin References: Date: Tue, 05 Jun 2012 22:21:00 -0000 In-Reply-To: (Daniel Jacobowitz's message of "Tue, 5 Jun 2012 10:24:21 -0400") Message-ID: <873969mmfu.fsf@garudatw.twitter.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Gm-Message-State: ALoCoQkLcHu1qqxDtx46BFErUKvFAR7k86MIs/55E/DLDtTjYZ98RAPEzk25ZCYjAPduvlcf2lAr X-IsSubscribed: yes 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 X-SW-Source: 2012-06/txt/msg00031.txt.bz2 Daniel Jacobowitz writes: > Does 'finish' reliably work? It seems like we'd have to get pretty > lucky (in general) with the VM's implementation of stack frames. e.g. > if JIT compilation triggered during an interpreted function, I wonder > if it would still return to the same place. > You are right. I'd imagine it might not, in the case of on-stack-replacement; depending on how GDB implements finish. Non-OSR compilation replaces the entry point allowing newer invocations to use compiled code. Code already executing in an active frame is stable. > > It would be nice if this code could be shared with the existing inline > frame support, which returns an alternative symbol based on the frame > id. I agree. I didn't realize that simply returning different frame ids is all that is required, at the time. However, I'd like to see 'JIT symbols' be more 'dynamic' than what the current JIT reader model allows. Hotspot needs to be able to return different symbols for the same (template interpreter) code range, replace symbols if it has been configured to reclaim code once the code cache fills up. That's why it might be better to let the reader participate in symbol resolution rather than having it communicate with GDB using statically generated data. I'd imagined this to be in the form of frame based symbol handlers, but I like frame filters the more I think about it (which is also why I want to play with it first, before I submit my changes.) -Kaushik