RFA: JVMTI GetFrameCount

Tom Tromey tromey@redhat.com
Mon Jul 31 18:09:00 GMT 2006


>>>>> "Kyle" == Kyle Galloway <kgallowa@redhat.com> writes:

Kyle> This patch implements the GetFrameCount functionality of jvmti.  Any 
Kyle> comments? If not could someone please commit this.

I have a couple questions about it.

Kyle> +  //get the top frame
Kyle> +  _Jv_InterpFrame* top = reinterpret_cast<_Jv_InterpFrame *> (t->interp_frame);
Kyle> +  *count = 0;

First, there seems to be a race condition here, if the request is for
a thread other than the current thread.  In this case the data we're
accessing might be invalidated while we're running, leading to crashes
or other weirdness.

Second, while I understand that we're likely only to be able to debug
interpreted frames, in a case like this we may want to consider
getting a full stack trace, rather than simply pulling out the
interpreted frames.  I'm not really sure however.

BTW.. one thing that came up in this area during discussions last
week.  When gij is started in debug mode it may make sense to disable
the class cache database.  Something to consider at least.

Tom



More information about the Java-patches mailing list