This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Stack traces, etc.


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]