JVMTI - Obtaining access to current thread stackframes?

I have a method that logs on entry (based on a flag), and I would like

to be able to identify the caller in the trace. Now, I can use

Thread.getStackTrace() to get the static thread stack, from which I

can get the invoking class and method. However, I would like to get

hold of the 'this' object reference of the immediate parent stack

frame, so that I can identify the instance of the caller. Is there a

way to do this? The JVMTI seems to be written to access a

different JVM, and I can't see a way to put it to use.

This code does not have to be very efficient, as it will only be

turned on rarely in fault isolation. Any help is greatly appreciated.

[716 byte] By [pelakha] at [2007-11-26 23:24:11]
# 1
Class.forName("Some.class.name"). returns the class object reference. Or you are looking for the instance object reference?
swamyva at 2007-7-10 14:30:37 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...