This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: RFA: JVMTI GetFrameCount
- From: Tom Tromey <tromey at redhat dot com>
- To: Kyle Galloway <kgallowa at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Mon, 31 Jul 2006 14:03:04 -0400
- Subject: Re: RFA: JVMTI GetFrameCount
- References: <44CE07E0.3030304@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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