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