harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weldon Washburn" <weldon...@gmail.com>
Subject Re: [drlvm] how does drlvm insert the safe point into a method
Date Mon, 28 Aug 2006 16:05:43 GMT
On 8/28/06, Fan Bin <fanbin23@gmail.com> wrote:
> I still have a question to Wedlon: What do you mean that "As far as I know the DRLVM
JIT you are looking at does not quite do this yet". Does it mean that the drlvm JIT(Jitrino.JET
and OPT) I'm looking at can't insert the polling code, or just JET can't do this?
>

What I really mean is that I have not looked at Jitrino code recently.
 Please see Mikhail Fursov's answer.  It looks like Jitrino might have
what you need.  You may want to also look in Harmony JIRA.  Feel free
to continue to ask questions.

> Many thanks,
> fanbin
>
> ----- Original Message -----
> From: "Weldon Washburn" <weldonwjw@gmail.com>
> To: <harmony-dev@incubator.apache.org>
> Sent: Monday, August 28, 2006 12:38 PM
> Subject: Re: [drlvm] how does drlvm insert the safe point into a method
>
>
> > Hi Fan,
> >
> > I think you are asking about safe instruction pointer addresses in
> > JITed code where the JIT is able to enumerate all live references.  If
> > this is the case, it turns out there are lots of subtle interactions
> > between all the pieces of the system.  In otherwords, I can't do
> > justice to the topic in an email.  But I will point you in the right
> > direction.
> >
> > The JIT can insert  polling code at points where it knows it can find
> > all live references on a thread's stack.  When the GC wants a thread
> > to suspend and report its live references, it can set a flag in the
> > thread-local context.  When the JITed code sees the flag set, it will
> > suspend the thread and report the live references. As far as I know
> > the DRLVM JIT you are looking at does not quite do this yet.
> >
> > An incomplete but useful for bringup approach is to let the targetted
> > thread continue executing until it tries to allocate an object.
> > Assuming there is no space available, the thread is vectored into the
> > garbage collector itself.  By design, object allocation sites are
> > places where the JIT can enumerate all live references on the stack.
> >
> > There are other schemes, such as suspending and resuming the targetted
> > thread until the JIT reports it can enumerate.  I won't bore you with
> > the details here.  Let me know if this helps.
> >
> >
> > On 8/27/06, Fan Bin <fanbin23@gmail.com> wrote:
> >> Hi, I have a question about jit compiler in drlvm. I want to suspend the thread
manually on a particular point. I know that the thread can only be suspended at safe point.
I guess the safe point is inserted by jit compiler when it compile the method, but I can't
prove it from the source code. So my question is whether it's true that it is the jit compiler
which insert the safe point. If it is true, how does it do this?
> >> Thank you for your help.
> >>
> >
> >
> > --
> > Weldon Washburn
> > Intel Middleware Products Division
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >


-- 
Weldon Washburn
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message