jdk/src/linux/doc/man/jhat.1
author jjg
Mon, 19 Oct 2009 13:38:09 -0700
changeset 4077 0096541a388e
parent 2692 345bc8d65b19
child 5506 202f599c92aa
permissions -rw-r--r--
6889255: javac MethodSymbol throws NPE if ClassReader does not read parameter names correctly Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
."
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
." This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
." under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
." published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
."
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
." This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
." version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
." accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
." You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
." 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
." Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
." CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
." have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
."
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    22
.TH jhat 1 "04 May 2009"
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    23
." Generated from HTML by html2man (author: Eric Armstrong)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    26
.SH "Name"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
jhat \- Java Heap Analysis Tool
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
.SH "SYNOPSIS"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
\fP\f3jhat\fP [ \f2options\fP ] <heap\-dump\-file>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
.SH "PARAMETERS"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    47
.RS 3
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
options 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
Options, if used, should follow immediately after the command name. 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    51
.br
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
heap\-dump\-file 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
Java binary heap dump file to be browsed. For a dump file that contains multiple heap dumps, you may specify which dump in the file by appending "#<number> to the file name, i.e. "foo.hprof#3". 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    55
.SH "DESCRIPTION" 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
The \f3jhat\fP command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser. jhat supports pre\-designed queries (such as 'show all instances of a known class "Foo"') as well as \f3OQL\fP (\f3O\fPbject \f3Q\fPuery \f3L\fPanguage) \- a SQL\-like query language to query heap dumps. Help on OQL is available from the OQL help page shown by jhat. With the default port, OQL help is available at http://localhost:7000/oqlhelp/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
There are several ways to generate a java heap dump:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
.TP 2
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    65
o
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    66
Use jmap(1) \-dump option to obtain a heap dump at runtime; 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
.TP 2
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    68
o
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    69
Use jconsole(1) option to obtain a heap dump via 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
\f2HotSpotDiagnosticMXBean\fP @
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
.fi
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    73
http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html at runtime; 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
.TP 2
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    75
o
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
Heap dump will be generated when OutOfMemoryError is thrown by specifying \-XX:+HeapDumpOnOutOfMemoryError VM option; 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
.TP 2
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    78
o
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
Use 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
\f2hprof\fP @
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
\f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    90
.SH "OPTIONS"  
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    91
.RS 3
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
\-stack false/true 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
Turn off tracking object allocation call stack. Note that if allocation site information is not available in the heap dump, you have to set this flag to false. Default is true. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
\-refs false/true 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
Turn off tracking of references to objects. Default is true. By default, back pointers (objects pointing to a given object a.k.a referrers or in\-coming references) are calculated for all objects in the heap. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
\-port port\-number 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
Set the port for the jhat's HTTP server. Default is 7000. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
\-exclude exclude\-file 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
Specify a file that lists data members that should be excluded from the "reachable objects" query. For example, if the file lists \f2java.lang.String.value\fP, then, whenever list of objects reachable from a specific object "o" are calculated, reference paths involving \f2java.lang.String.value\fP field will not considered. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
\-baseline baseline\-dump\-file 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
Specify a baseline heap dump. Objects in both heap dumps with the same object ID will be marked as not being "new". Other objects will be marked as "new". This is useful while comparing two different heap dumps. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
\-debug int 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
Set debug level for this tool. 0 means no debug output. Set higher values for more verbose modes. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
\-version\  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
Report version number and exit. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
\-h\  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
Output help message and exit. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
\-help\  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
Output help message and exit. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
\-J<flag>\  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
Pass <flag> to the Java virtual machine on which jhat is run. For example, \-J\-Xmx512m to use a maximum heap size of 512MB. 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   122
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   123
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   125
.SH "SEE ALSO" 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
.TP 2
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   128
o
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   129
jmap(1) 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
.TP 2
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   131
o
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   132
jconsole(1) 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
.TP 2
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   134
o
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
\f2hprof \- Heap and CPU profiling tool\fP @
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
.RE
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   140
.RE
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141