source: trunk/openjdk/hotspot/agent/doc/index.html

Last change on this file was 2, checked in by dmik, 15 years ago

Imported OpenJDK 6 b19 sources from Oracle.

File size: 4.8 KB
Line 
1<html>
2<head>
3<title>
4Using HotSpot Serviceability Agent (SA)
5</title>
6</head>
7<body>
8<h1>Using HotSpot Serviceability Agent (SA)</h1>
9
10<h3>HSDB GUI</h3>
11<p>
12The top-level GUI program using the HotSpot Serviceability Agent APIs is
13called <b>HSDB</b>, the "HotSpot Debugger". To run it, type "hsdbproc.sh"
14or "hsdbwindbg.bat" or 64-bit variants (on Unix, Windows platforms
15respectively). More info. on HSDB GUI are in <a href="hsdb.html">hsdb.html</a>.
16</p>
17
18<h3>SA Modes</h3>
19<p>
20There are three modes for the SA debugger:
21<ul>
22<li>attaching to a local process,
23<li>opening a core file, and
24<li>attaching to a remote "debug server".
25</ul>
26<p>
27The remote case requires two programs to be running on the remote machine:
28the rmiregistry (see the script "start-rmiregistry.sh" in this directory;
29run this in the background) and the debug server (see the script
30"start-debug-server-proc.sh"), in that order. start-rmiregistry.sh takes no
31arguments; start-debug-server-proc.sh (or -windbg.bat) takes as argument
32the process ID or the executable and core file names to allow remote debugging
33of.
34</p>
35
36<h3>Command line HSDB</h3>
37<p>
38There are also command line HSDB variants ("clhsdbproc.sh" or "clhsdbwindbg.bat"
39or 64-bit variants). There is also a JavaScript based command line interface
40called "jsdbproc.sh" [or "jsdbwindbg.bat" or 64-bit variants]. More details on
41command line interfaces can be found in
42<ul>
43<li><a href="clhsdb.html">clhsdb.html</a>
44<li><a href="jsdb.html">jsdb.html</a>
45</ul>
46</p>
47
48<h3>Other command line tools</h3>
49<p>
50The following table lists all SA command line tools. &lt;xxx&gt;windbg.bat
51files are for Windows. .sh files are for Solaris. &lt;xxx&gt;64.sh are for
5264 bit debugees.
53</p>
54
55<table border="1">
56<tr>
57<th>
58Tool
59</th>
60<th>
61Description
62</th>
63</tr>
64
65<tr>
66<td>
67dumpflagsproc.sh,
68dumpflagsproc64.sh,
69dumpflagswindbg.bat
70dumpflagswindbg64.bat
71</td>
72<td>
73dumps name and value of all -XX JVM command line arguments passed
74to debuggee.
75</td>
76</tr>
77
78<tr>
79<td>
80<a name="dumpsysprops"></a>
81dumpsyspropsproc.sh,
82dumpsyspropsproc64.sh,
83dumpsyspropswindbg.bat
84dumpsyspropswindbg64.bat
85</td>
86<td>
87This prints name and value of Java level System properties.
88</td>
89</tr>
90
91<tr>
92<td>
93<a name="heapdump"></a>
94heapdumpproc.sh,
95heapdumpproc64.sh,
96heapdumpwindbg.bat
97heapdumpwindbg64.bat
98</td>
99<td>
100Dumps heap in a file in hprof binary format.
101</td>
102</tr>
103
104<tr>
105<td>
106<a name="heapsum"></a>
107heapsumproc.sh,
108heapsumproc64.sh,
109heapsumwindbg.bat
110heapsumwindbg64.bat
111</td>
112<td>
113Prints summary information on Java heap.
114</td>
115</tr>
116
117
118<tr>
119<td>
120jcoreproc.sh,
121jcoreproc64.sh,
122jcorewindbg.bat
123jcorewindbg64.bat
124</td>
125<td>
126This can retrieve .class files from the debuggee.
127set the environment variable <b>JCORE_PACKAGES</b> to comman separated list of
128packages whose classes have to be retrieved from the core file.
129</td>
130</tr>
131
132<tr>
133<tr>
134<td>
135jstackproc.sh,
136jstackproc64.sh,
137jstackwindbg.bat
138jstackwindbg64.bat
139</td>
140<td>
141used to get java stack trace for all java threads.
142</td>
143</tr>
144
145<tr>
146<td>
147jhistoproc.sh,
148jhistoproc64.sh,
149jhistowindbg.bat
150jhistowindbg64.bat
151</td>
152<td>
153used to get object histogram of java heap.
154</td>
155</tr>
156
157<tr>
158<td>
159permstatproc.sh,
160permstatproc64.sh,
161permstatwindbg.bat
162permstatwindbg64.bat
163</td>
164<td>
165To gather statistics on perm. generation.
166</td>
167</tr>
168
169<a name="mixed_pstack"></a>
170<tr>
171<tr>
172<td>
173pstackproc.sh,
174pstackproc64.sh,
175pstackwindbg.bat
176pstackwindbg64.bat
177</td>
178<td>
179This is cross platform mixed mode pstack utility. This works on any (non-java as well) process, core dump. For java process and core dumps, this prints both java and C/C++ frames.
180</td>
181</tr>
182
183<tr>
184<td>
185pmapproc.sh,
186pmapproc64.sh,
187pmapwindbg.bat
188pmapwindbg64.bat
189</td>
190<td>
191This is cross platform Solaris pmap-like utility.
192</td>
193</tr>
194
195<tr>
196<td>
197soqlproc.sh,
198soqlproc64.sh,
199soqlwindbg.bat
200soqlwindbg64.bat
201</td>
202<td>
203This is command line SOQL - Simple Object Query Language tool.
204SOQL is SQL-like query language to query Java heap.
205</td>
206<tr>
207<td>
208start-debug-server-proc.sh,
209start-debug-server-proc64.sh,
210start-debug-server-windbg.bat,
211start-debug-server-windbg64.bat,
212start-rmiregistry.bat,
213start-rmiregistry64.bat,
214start-rmiregistry.sh
215start-rmiregistry64.sh
216</td>
217<td>
218These scripts are used to run SA remotely.
219</td>
220</tr>
221</table>
222
223<h3>Debugging transported core dumps</h3>
224<p>
225When a core dump is moved from the machine where it was produced to a
226difference machine, it may not always be possible for SA to debug the same.
227More info. on debugging on transported core dumps is in
228<a href="transported_core.html">transported_core.html</a>.
229</p>
230
231<h3>SA Bugs</h3>
232<p>
233Not all of the possible states of target VMs have been tested (or
234supportable) with SA. For example, the SA will probably not work at all
235if it freezes the target VM during certain phases of GC. When filing bugs
236a pointer to a core file (see gcore(1)) which the SA can not handle well
237is best.
238</p>
239
240</body>
241</html>
Note: See TracBrowser for help on using the repository browser.