0N/AThe HotSpot Serviceability Agent (SA) is a debugger for hotspot core
0N/Adumps and hung processes. There is a read-only JDI (Java Debugger
0N/AInterface) implementation on top of SA. This is part of JDK product and
0N/Athe classes are in $JDK/tools/sa-jdi.jar.
0N/A
0N/AIn addition, there are few serviceability tools in $JDK/bin, namely,
0N/Ajstack (java stack trace tool), jmap (heap tool), jinfo (Java config
0N/Atool) and jsadebugd. The classes for these are also in sa-jdi.jar
0N/Afile. sa-jdi.jar file is built along with hotspot (libjvm.so) on Solaris
0N/Aand Linux platforms. On Windows platform, SA-JDI is not included and
0N/Aserviceability tools do not use SA.
0N/A
0N/AApart from these, HotSpot SA consists of a number of tools that are
0N/A*not* included in JDK product bits.
0N/A
0N/AThe sources and makefile for all-of-SA (including non-productized stuff)
0N/Aare under $HOTSPOT_WS/agent directory. The makefile $HOTSPOT/agent/make
0N/Adirectory and shell scripts (and batch files) are used to build and run
0N/ASA non-product tools. There is also documentation of SA under
0N/A$HOTSPOT/agent/doc directory.
0N/A
0N/ATo build complete SA, you need to have Rhino Mozilla jar (js.jar)
0N/Aversion 1.5R5 under $HOTSPOT/agent/src/share/lib directory. Rhino is
0N/AJavaScript interpreter written in Java. Rhino is used to implement SA
0N/Afeatures such as
0N/A
0N/A* SA command line debugger's JavaScript interface
0N/A - refer to $HOTSPOT/agent/doc/clhsdb.html
0N/A - refer to $HOTSPOT/agent/doc/jsdb.html
0N/A* SA simple object query language (SOQL)
0N/A - language to query Java heap.
0N/A
0N/ARhino's "js.jar" is not included in hotspot source bundles. You need to
0N/Adownload it from http://www.mozilla.org/rhino/download.html.
0N/A
0N/AWithout js.jar, $HOTSPOT/agent/make/Makefile will fail to build. But,
0N/Anote that sa-jdi.jar containing the productized portions of SA will
0N/Astill be built when you build hotspot JVM.