[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI : Instrumentation in the vm integration guide

From: Nicolas Geoffray
Subject: Re: [cp-patches] FYI : Instrumentation in the vm integration guide
Date: Sun, 04 Dec 2005 21:46:02 +0100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051019)

Hi Mark

Maybe explicitly say "for calling the
@code{InstrumentationImpl.callTransformers} when a class byte code is
defined with @code{ClassLoader.defineClass}"
So the vm implementer knows this is their job at the moment.

Allright added. I'm committing this in the main branch.

2005-12-04  Nicolas Geoffray  <address@hidden>

       * doc/vmintegration.texinfo: Added subsection in the classpath
       hooks for the VMInstrumentationImpl class.

Index: doc/vmintegration.texinfo
RCS file: /cvsroot/classpath/classpath/doc/vmintegration.texinfo,v
retrieving revision 1.19
diff -u -r1.19 vmintegration.texinfo
--- doc/vmintegration.texinfo   15 Jul 2005 09:04:46 -0000      1.19
+++ doc/vmintegration.texinfo   4 Dec 2005 20:45:03 -0000
@@ -226,6 +226,7 @@
 * java.lang.VMRuntime::
 * java.lang.VMString::
 * java.lang.VMThread::
+* java.lang.VMInstrumentationImpl::
 @end menu
 @node java.lang.VMClass, java.lang.VMObject ,java.lang,java.lang
@@ -607,7 +608,7 @@
 A VM may implement this differently by implementing this method,
 which is @code{static} and the only one in @code{VMString}.
address@hidden java.lang.VMThread,, java.lang.VMString, java.lang
address@hidden java.lang.VMThread,java.lang.VMInstrumentationImpl, 
java.lang.VMString, java.lang
 @subsection @code{java.lang.VMThread}
 @code{VMThread} provides the link between Java's threads and the platform
@@ -682,6 +683,45 @@
 having returned true, and is thus deprecated as a result.
 @end itemize
 @end itemize
address@hidden java.lang.VMInstrumentationImpl,, java.lang.VMThread, java.lang
address@hidden @code{java.lang.VMInstrumentationImpl}
+The @code{java.lang.VMInstrumentationImpl} and
address@hidden provides an implementation of the
address@hidden interface. This interface is for java
+1.5 and is only in the generics branch.
+A @code{InstrumentationImpl} object should be given to any agent
+given in the command line (see the @code{java.lang.instrument} package
+documentation). A VM has to implement the static native methods of the
address@hidden class.
address@hidden @bullet
address@hidden @code{isRedefineClassesSupported()} -- Returns true if the JVM 
+class redefinition.
address@hidden @code{redefineClasses()} -- Gives a set of classes with new 
+The VM must redefine the classes by reading the new bytecodes.
address@hidden @code{getAllLoadedClass()} -- Returns an array of all loaded 
address@hidden @code{getInitiatedClass()} -- Returns an array of all classes 
+by a specific class loader.
address@hidden @code{getObjectSize()} -- Gives the size of an object.
address@hidden itemize
+When agents are defined, the VM has to call transformers of the
address@hidden object each time a class is loaded, eg a call to
address@hidden The @code{InstrumentationImpl} class defines
+a method that has to be called before reading a class file in the VM.
address@hidden @bullet
address@hidden @code{callTransformers} -- Calls each transformer registered to
+the @code{InstrumentationImpl} object and returns a new bytecode file.
address@hidden itemize
+No default implementation is provided in gnu classpath for the
address@hidden methods. A default implementation will perhaps
+be written, but it might break the @code{ClassLoader/VMClassLoader} interface
+for calling the @code{InstrumentationImpl.callTransformers} when a class byte
+code is defined with @code{ClassLoader.defineClass}.
 @node gnu.classpath, java.util, java.lang, Classpath Hooks
 @section @code{gnu.classpath}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]