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] SingleStep notification


Tom Tromey wrote:
"Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> The attach patch adds the JVMTI event notification for single Keith> step. It's pretty straightforward: according to the spec, "If a single Keith> step event or breakpoint event is triggered at the current location, Keith> the event is defined to occur immediately before the code at the Keith> current location is executed."

Keith> Comments/questions/concerns?

I think it looks fine.  But don't we only want this code in the
'debug' interpreter?

No, because (unfortunately), the debug interpreter is used solely when JDWP is enabled. Any number of JVMTI agents could exist that might request SingleStep notifications (and they might not need JDWP at all).


I share your reservations about the performance hit this entails. So perhaps a little tweaking is in order. Perhaps the "debug" interpreter should be extended to include not only JDWP but also JVMTI?

However, I recall "bad things happening" when I attempted to enable this only in the DEBUG interpreter. I remember losing several days trying to chase this. Alas, I don't remember what I ascertained the cause was... For some reason, I recall something about startup issues with some classes getting NEXT_INSN from the non-debug case (because they are initialized/loaded before we know if we are debugging). I ended up with a mix of the two interpreters, and code trying to jump between the two.

I'll see if I can play with it and force one or the other based on the use of either JDWP or JVMTI (which rather are the same thing anyway).

And, come to think of it, perhaps the 'breakpoint' instruction should
be handled the same way?  Though that one matters a bit less.

That would be a trivial enough a fix. Let me see what I can do about SingleStep, though...


Keith


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