--- old/agent/doc/c2replay.html 2013-04-17 20:14:25.402654583 +0400 +++ /dev/null 2013-04-15 12:30:09.841410950 +0400 @@ -1,41 +0,0 @@ - -
-
-The C2 compiler replay is a function to repeat the compiling process from a crashed java process in compiled method
-This function only exists in debug version of VM
-
-First, use SA to attach to the core file, if suceeded, do - clhsdb>dumpreplaydata | -a |[> replay.txt] - create file replay.txt, address is address of Method, or nmethod(CodeBlob) - clhsdb>buildreplayjars [all | boot | app] - create files: - all: - app.jar, boot.jar - boot: - boot.jar - app: - app.jar - exit SA now. -Second, use the obtained replay text file, replay.txt and jar files, app.jar and boot.jar, using debug version of java - java -Xbootclasspath/p:boot.jar -cp app.jar -XX:ReplayDataFile= -XX:+ReplayCompiles .... - This will replay the compiling process. - - With ReplayCompiles, the replay will recompile all the methods in app.jar, and in boot.jar to emulate the process in java app. - -notes: - 1) Most time, we don't need the boot.jar which is the classes loaded from JDK. It will be only modified when an agent(JVMDI) is running and modifies the classes. - 2) If encounter error as " " not found, that means the SA is using a VMStructs which is different from the one with corefile. In this case, SA has a utility tool vmstructsdump which is located at agent/src/os/ /proc/ - - Use this tool to dump VM type library: - vmstructsdump libjvm.so > .db - - set env SA_TYPEDB= .db (refer different shell for set envs) --- /dev/null 2013-04-15 12:30:09.841410950 +0400 +++ new/agent/doc/cireplay.html 2013-04-17 20:14:24.930654601 +0400 @@ -0,0 +1,41 @@ + + + +Replay + + + + +Compiler replay
++The compiler replay is a function to repeat the compiling process from a crashed java process in compiled method
+
+This function only exists in debug version of VM +Usage
++First, use SA to attach to the core file, if succeeded, do + hsdb> dumpreplaydata <address> | -a | <thread_id> [> replay.txt] + create file replay.txt, address is address of Method, or nmethod(CodeBlob) + hsdb> buildreplayjars [all | boot | app] + create files: + all: + app.jar, boot.jar + boot: + boot.jar + app: + app.jar + exit SA now. +Second, use the obtained replay text file, replay.txt and jar files, app.jar and boot.jar, using debug version of java + java -Xbootclasspath/p:boot.jar -cp app.jar -XX:ReplayDataFile=<datafile> -XX:+ReplayCompiles .... + This will replay the compiling process. + + With ReplayCompiles, the replay will recompile all the methods in app.jar, and in boot.jar to emulate the process in java app. + +notes: + 1) Most time, we don't need the boot.jar which is the classes loaded from JDK. It will be only modified when an agent(JVMDI) is running and modifies the classes. + 2) If encounter error as "<flag>" not found, that means the SA is using a VMStructs which is different from the one with corefile. In this case, SA has a utility tool vmstructsdump which is located at agent/src/os/<os>/proc/<os_platform> + + Use this tool to dump VM type library: + vmstructsdump libjvm.so > <type_name>.db + + set env SA_TYPEDB=<type_name>.db (refer different shell for set envs)