public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Kaushik Srenevasan <kaushik@twitter.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sourceware.org
Subject: Re: Hotspot JVM GDBJIT plugin
Date: Tue, 05 Jun 2012 22:21:00 -0000	[thread overview]
Message-ID: <873969mmfu.fsf@garudatw.twitter.com> (raw)
In-Reply-To: <CAN9gPaE5UKvtY0ADZB-Jt1oX-AA58-LSaFB53KgEnJx829eGhA@mail.gmail.com>	(Daniel Jacobowitz's message of "Tue, 5 Jun 2012 10:24:21 -0400")

Daniel Jacobowitz <drow@false.org> 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

  reply	other threads:[~2012-06-05 22:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 11:04 Kaushik Srenevasan
2012-05-25 14:37 ` Tom Tromey
2012-05-25 19:50   ` Kaushik Srenevasan
2012-05-25 21:03     ` Tom Tromey
2012-05-30 18:13       ` Phil Muldoon
2012-05-31 21:05         ` Kaushik Srenevasan
2012-06-05 14:24 ` Daniel Jacobowitz
2012-06-05 22:21   ` Kaushik Srenevasan [this message]
2012-06-06 18:05 ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873969mmfu.fsf@garudatw.twitter.com \
    --to=kaushik@twitter.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).