classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposal: VMStackBrowser


From: Steven Augart
Subject: Re: proposal: VMStackBrowser
Date: Sun, 16 Jan 2005 16:42:17 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217

Archie Cobbs wrote:
Steven Augart wrote:

I propose adding a new class that may be optionally implemented by the
VM, gnu.classpath.VMStackBrowser.  [....]

Looks good. Presumably the idea here is to optimize this in such a
way that you don't have to crawl the entire stack in the constructor
(as is done by the default implementation).

Yes, exactly.  Thank you for explaining it so concisely; I'll incorporate
that phrasing into the class's docs.

In that case, to make such
implementations easier, we should specify that the VMStackBrowser
object is only valid until the instantiating method returns,
That is a Very Good Point.  Absolutely.
> and that
the instantiating method is required to call release() before returning
(e.g., using try { ... } finally { x.release(); } or whatever).

Yes.  In both of these cases, my (Jikes-RVM-Centered) assumptions are
showing.  I swiped the methods from Julian Dolby's work on Jikes RVM's
VM_StackBrowser.  We turn off garbage collection before we initialize
a VM_StackBrowser's internal frame pointer, and then turn on GC
again when we're done.
Then simple implementations that store the current position as a
frame pointer (or whatever) are possible and don't need to worry
about the stack changing out from under them.
Well-expressed, again.  It's great to have folks on here who read my mind
so well :).

Thanks also to Jeroen for his feedback.  I'll submit a formal patch to
classpath-patches sometime this week, and it will include converting
more places in Classpath to use the new VMStackBrowser.

--Steve Augart




reply via email to

[Prev in Thread] Current Thread [Next in Thread]