[RFA/JVMTI] SingleStep notification
Keith Seitz
keiths@redhat.com
Tue Jan 30 01:26:00 GMT 2007
Tom Tromey wrote:
> Keith> I share your reservations about the performance hit this entails. So
> Keith> perhaps a little tweaking is in order. Perhaps the "debug" interpreter
> Keith> should be extended to include not only JDWP but also JVMTI?
>
> My view is that we're only writing this for the sake of JDWP.
> But perhaps that's just my first reaction :)
> Any idea how much this slows things down?
Okay, I think that I have that tweak figured out. I was right: something
was using _Jv_InterpMethod::run instead of _Jv_InterpMethod::run_debug,
and we had the two versions of NEXT_INSN confusing the interpreter.
[_Jv_CompileMethod didn't take into account debug vs non-debug.]
So I have done what I mentioned above: We presume that when any JVMTI
environment is created, we will use the debug stuff from there on out.
There's no going back. If no JVMTI environment is ever created, it uses
the code the faster code path, skipping JVMTI altogether.
Any less offensive?
Keith
ChangeLog
2007-01-29 Keith Seitz <keiths@redhat.com>
* include/jvmti-int.h (JVMTI): Declare member "enabled".
* jvmti.cc (JVMTI): Add member "enabled".
(_Jv_GetJVMTIEnv): Mark JVMTI enabled.
* interpret.cc (_Jv_InterpMethod::ncode): Use JVMTI::enabled
instead of gnu::classpath::jdwp::Jdwp::isDebugging.
(_Jv_CompileMethod): If JVMTI is enabled, use run_debug
instead of run to compile the method.
* interpret-run.cc [DEBUG] (NEXT_INSN): Add JVMTI single step
notification.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jvmti-singlestep2.patch
Type: text/x-patch
Size: 4678 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070130/c4e859cc/attachment.bin>
More information about the Java-patches
mailing list