need to focus on java performance?
David Daney
ddaney@avtrex.com
Thu May 25 16:51:00 GMT 2006
Andrew Haley wrote:
> David Daney writes:
> > Bryce McKinlay wrote:
> > > David Daney wrote:
> > >> The calling method's address is in the standard location (as
> > >> specified by the ABI), we know how to find the class given this
> > >> information.
> > >
> > > Finding the method's address is easy enough, but what about the
> > > address of the atable entry containing the pointer to the method?
> > Isn't the atable part the the calling method's class? The stack trace
> > infrastructure allows you to find the class of a method given an IP that
> > is contained by the method.
>> Mmm, but it's quite expensive. It would be nice not to do unwinding
> in the class initialization path.
>
If you structured the little trampoline code properly, you would not
have to use the full DWARF unwinder. You only have to go back one
level. GCC even has a built-in that allows you to do this
(__builtin_return_address(0)). Now looking up the class given this
might still be slow, but you don't need a complete stacktrace.
David Daney.
More information about the Java
mailing list