Mon, 10 Jun 2013 11:30:51 +0200
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>
aoqi@0 | 1 | The HotSpot Serviceability Agent (SA) is a debugger for hotspot core |
aoqi@0 | 2 | dumps and hung processes. There is a read-only JDI (Java Debugger |
aoqi@0 | 3 | Interface) implementation on top of SA. This is part of JDK product and |
aoqi@0 | 4 | the classes are in $JDK/tools/sa-jdi.jar. |
aoqi@0 | 5 | |
aoqi@0 | 6 | In addition, there are few serviceability tools in $JDK/bin, namely, |
aoqi@0 | 7 | jstack (java stack trace tool), jmap (heap tool), jinfo (Java config |
aoqi@0 | 8 | tool) and jsadebugd. The classes for these are also in sa-jdi.jar |
aoqi@0 | 9 | file. sa-jdi.jar file is built along with hotspot (libjvm.so) on Solaris |
aoqi@0 | 10 | and Linux platforms. On Windows platform, SA-JDI is not included and |
aoqi@0 | 11 | serviceability tools do not use SA. |
aoqi@0 | 12 | |
aoqi@0 | 13 | Apart from these, HotSpot SA consists of a number of tools that are |
aoqi@0 | 14 | *not* included in JDK product bits. |
aoqi@0 | 15 | |
aoqi@0 | 16 | The sources and makefile for all-of-SA (including non-productized stuff) |
aoqi@0 | 17 | are under $HOTSPOT_WS/agent directory. The makefile $HOTSPOT/agent/make |
aoqi@0 | 18 | directory and shell scripts (and batch files) are used to build and run |
aoqi@0 | 19 | SA non-product tools. There is also documentation of SA under |
aoqi@0 | 20 | $HOTSPOT/agent/doc directory. |
aoqi@0 | 21 | |
aoqi@0 | 22 | To build complete SA, you need to have Rhino Mozilla jar (js.jar) |
aoqi@0 | 23 | version 1.5R5 under $HOTSPOT/agent/src/share/lib directory. Rhino is |
aoqi@0 | 24 | JavaScript interpreter written in Java. Rhino is used to implement SA |
aoqi@0 | 25 | features such as |
aoqi@0 | 26 | |
aoqi@0 | 27 | * SA command line debugger's JavaScript interface |
aoqi@0 | 28 | - refer to $HOTSPOT/agent/doc/clhsdb.html |
aoqi@0 | 29 | - refer to $HOTSPOT/agent/doc/jsdb.html |
aoqi@0 | 30 | * SA simple object query language (SOQL) |
aoqi@0 | 31 | - language to query Java heap. |
aoqi@0 | 32 | |
aoqi@0 | 33 | Rhino's "js.jar" is not included in hotspot source bundles. You need to |
aoqi@0 | 34 | download it from http://www.mozilla.org/rhino/download.html. |
aoqi@0 | 35 | |
aoqi@0 | 36 | Without js.jar, $HOTSPOT/agent/make/Makefile will fail to build. But, |
aoqi@0 | 37 | note that sa-jdi.jar containing the productized portions of SA will |
aoqi@0 | 38 | still be built when you build hotspot JVM. |