Why native code for agents? [message #141915] |
Wed, 15 April 2009 12:05  |
Eclipse User |
|
|
|
Hi Eugene,
Why native code for agents? I would thought Sun would provide an all java
way of talking to the jvm for jvmti.
Just curious,
-Tony
|
|
|
Re: Why native code for agents? [message #142049 is a reply to message #141915] |
Thu, 23 April 2009 20:43  |
Eclipse User |
|
|
|
The JVM Tool Interface specification document is available from here
(http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html), and
describes the entire interface. My presumption is that the requirement for
a native interface is a given, as speed when profiling (or otherwise
interfacing with the JVM) is a top concern so as not to slow down the
virtual machine. Implementing both a Java and native interface to JVM
could merely then have been a resource prioritization. There are also
life-cycle and application/agent barrier concerns with a Java-only JVMTI
implementation.
The JVM Tool Interface requires instrumentation for many of the functions
ones would normally associate with a tooling interface (for instance,
method calls or object allocation), and, as such, this work could be done
without the JVMTI interface, with Java itself, using the
java.lang.instument.* classes available in Java 5 or with another
instrumentation engine.
The original JSR, JSR 163, is available here
(http://jcp.org/en/jsr/detail?id=163).
|
|
|
Powered by
FUDForum. Page generated in 0.24048 seconds