Version 1.0, updated November 19, 2009.
The JProbe dumpreport tool allows you to obtain a basic object report from JVM memory dumps. The report is provided in HTML format and gives instance counts and memory usage for each class discovered in the memory dump. You can create a report sorted by instance count or by memory usage. You can filter the output based on package, and you can restrict the output to show only the top classes by count or by memory used, or you can report on all classes found in the heap.
The tool works standalone with HPROF text and binary memory dumps and with IBM JVM text memory dumps. Coupled with JProbe 8.2, the tool can also report on IBM’s PHD format memory dumps – you’ll need to place dumpreport.jar in the JProbe /lib directory for this to work. This tool will be included automatically with future JProbe releases.
Syntax
java –jar dumpreport.jar [options] <dump> [<output>]
where:
- options represents valid dumpreport options.
- dump is the fully qualified path to a memory dump file.
- output is the fully qualified path to file where the report is saved. If omitted, the report uses the same file name as the <dump> filename, with the .html file extension.
An explanation of all options can be obtained by running the command:
java –jar dumpreport.jar –jp_help
A typical command line with several options might be
java –jar dumpreport.jar –jp_collect_data=com.acme.* -jp_rows=30
-jp_content=instances:heap_memory heap.hprof heapreport.html
which would create a report from an HPROF memory dump with 30 rows, listing object instances from the com.acme set of packages, sorted by memory usage.
The same command with no options:
java –jar dumpreport.jar heap.hprof heapreport.html
which would create a report from an HPROF memory dump with 20 rows, listing the top object instances from any package, sorted by instance count.
Please note that this tool includes the following third party software:
GNU Trove
Copyright © 2001, Eric D. Friedman All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Two classes (HashFunctions and PrimeFinder) included in Trove are licensed under the following terms:
Copyright © 1999 CERN - European Organization for Nuclear Research. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. CERN makes no representations about the suitability of this software for any purpose. It is provided "as is" without expressed or implied warranty.