agent/doc/cireplay.html

Mon, 10 Jun 2013 11:30:51 +0200

author
sla
date
Mon, 10 Jun 2013 11:30:51 +0200
changeset 5237
f2110083203d
parent 5029
7b23cb975cf2
child 6876
710a3c8b516e
permissions
-rw-r--r--

8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>

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

mercurial