This is the mail archive of the java-patches@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: RFA: JVMTI GetFrameCount


>>>>> "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


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