Harmony verifier extension is used to recalculate stack maps of a class after it is instrumented by TPTP.
The environment is used to debug the extension. For example, it allows writing a class file with a modified stack table down.
JAVA_HOME=<full path to JDK 1.5 directory>
.jni.h
, jvmti.h
, and jvmpi.h
) are expected to be available under %JAVA_HOME%\include
.
cd <Harmony root> svn co http://svn.apache.org/repos/asf/harmony/enhanced/trunk cd working_vm svn checkout build.xml vm/vmcore/src/verifier-3363/ vm/vmcore/include/ make/ vm/include/ |
PATH
, INCLUDE
, and LIB
environment variables.<Harmony root>\working_vm
invoke ant clean-verifier-ext verifier-ext
.<Harmony root>\working_vm\build\windows_x86_msvc_{debug|release}\deploy\lib\verifier-ext.lib
to <TPTP root>\org.apache.harmony_vmcore_verifier\lib\windows\\{debug|release}\IA-32\verifier.lib
.
cd <TPTP root> cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/tptp checkout \ platform/org.eclipse.hyades.probekit platform/org.eclipse.tptp.platform.jvmti.runtime |
<TPTP root>\org.eclipse.tptp.platform.jvmti.runtime\src-native\build\tptp_martini.dsw
.BuildMartini32
project.<TPTP root>\org.eclipse.tptp.platform.jvmti.runtime\src-native\build\tptp_profiler.dsw
.BuildCGProf32
project.BuildJPIAgent32
project.org.eclipse.tptp.platform.jvmti.runtime\src-native\bin\windows\\{debug|release}\IA-32
.
set JAVA_PROFILER_HOME=<TPTP root>\org.eclipse.tptp.platform.jvmti.runtime\src-native\bin\windows\{debug|release}\IA-32 set PATH=%JAVA_PROFILER_HOME%;%PATH% |
\[under construction\] Extract the attached {{ProxyClasses.zip}} into {{<TPTP root>}}. This should create the following directory structure: org\eclipse\tptp\martini, and place 3 class files there. |
java -XX:-FailOverToOldVerifier -cp <TPTP root>\bin -agentlib:JPIBootLoader=JPIAgent:server=standalone,stackmap=true;CGProf java2d.Java2Demo |
(Thanks to Asaf, Vasily)