agent/doc/cireplay.html

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 5029
7b23cb975cf2
child 6876
710a3c8b516e
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

minqi@4267 1 <html>
minqi@4267 2 <head>
minqi@4267 3 <title>
iignatyev@5029 4 Replay
minqi@4267 5 </title>
minqi@4267 6 </head>
minqi@4267 7 <body>
minqi@4267 8
iignatyev@5029 9 <h1>Compiler replay</h1>
minqi@4267 10 <p>
iignatyev@5029 11 The compiler replay is a function to repeat the compiling process from a crashed java process in compiled method<br>
minqi@4267 12 This function only exists in debug version of VM
minqi@4267 13 </p>
minqi@4267 14 <h2>Usage</h2>
iignatyev@5029 15 <pre>
iignatyev@5029 16 First, use SA to attach to the core file, if succeeded, do
iignatyev@5029 17 hsdb&gt; dumpreplaydata &lt;address&gt; | -a | &lt;thread_id&gt; [&gt; replay.txt]
minqi@4267 18 create file replay.txt, address is address of Method, or nmethod(CodeBlob)
iignatyev@5029 19 hsdb&gt; buildreplayjars [all | boot | app]
minqi@4267 20 create files:
minqi@4267 21 all:
minqi@4267 22 app.jar, boot.jar
minqi@4267 23 boot:
minqi@4267 24 boot.jar
minqi@4267 25 app:
minqi@4267 26 app.jar
minqi@4267 27 exit SA now.
minqi@4267 28 Second, use the obtained replay text file, replay.txt and jar files, app.jar and boot.jar, using debug version of java
iignatyev@5029 29 java -Xbootclasspath/p:boot.jar -cp app.jar -XX:ReplayDataFile=&lt;datafile&gt; -XX:+ReplayCompiles ....
minqi@4267 30 This will replay the compiling process.
minqi@4267 31
minqi@4267 32 With ReplayCompiles, the replay will recompile all the methods in app.jar, and in boot.jar to emulate the process in java app.
minqi@4267 33
minqi@4267 34 notes:
minqi@4267 35 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.
iignatyev@5029 36 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;
minqi@4267 37
minqi@4267 38 Use this tool to dump VM type library:
iignatyev@5029 39 vmstructsdump libjvm.so &gt; &lt;type_name&gt;.db
minqi@4267 40
iignatyev@5029 41 set env SA_TYPEDB=&lt;type_name&gt;.db (refer different shell for set envs)

mercurial