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