Stack traces, etc.

Anthony Green green@redhat.com
Tue Dec 3 07:21:00 GMT 2002


On Tue, 2002-12-03 at 02:09, Tom Tromey wrote:
> Anthony, you once said your stack trace patch used the address of the
> libffi stub to keep track of interpreted frames.  Can you tell me how
> to do this? 

My scheme mapped PC ranges to ProtectionDomains.  Every interpreted
method passes through a libffi closure, which is pointed at by the
vtable entries.  I just kept track of the address ranges for each
closure as they were created.

> How do I find the size of the stub?

FFI_TRAMPOLINE_SIZE

One optimization would be to do a single allocation of an array of
ncode_closure objects per class, so you just add one bigger PC range per
interpreted class.

But there I go again, thinking about micro optimizations... :-)

AG




More information about the Java mailing list