view src/jdk.hotspot.agent/doc/cireplay.html @ 49214:838c11e59a38

8187635: On Windows Swing changes keyboard layout on a window activation Reviewed-by: serb, ssadetsky
author dmarkov
date Wed, 28 Feb 2018 22:00:33 +0000
parents ce4b5303a813
line wrap: on
line source

<h1>Compiler replay</h1>
The compiler replay is a function to repeat the compiling process from a crashed java process in compiled method<br>
This function only exists in debug version of VM
First, use SA to attach to the core file, if succeeded, do
       hsdb&gt; dumpreplaydata &lt;address&gt; | -a | &lt;thread_id&gt; [&gt; replay.txt]
       create file replay.txt, address is address of Method, or nmethod(CodeBlob)
       hsdb&gt; buildreplayjars [all | boot | app]
       create files:
           app.jar, boot.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=&lt;datafile&gt; -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.

       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 "&lt;flag&gt;" 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/&lt;os&gt;/proc/&lt;os_platform&gt;

       Use this tool to dump VM type library:
       vmstructsdump &gt; &lt;type_name&gt;.db

       set env SA_TYPEDB=&lt;type_name&gt;.db (refer different shell for set envs)