United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6346039 : Improve jmap -histo (and maybe -heap) for use with running applications

Details
Type:
Enhancement
Submit Date:
2005-11-04
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2006-01-07
Component:
core-svc
OS:
solaris_9,generic
Sub-Component:
tools
CPU:
sparc,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

Description
The jmap utility currently uses the attach API to implement the -dump option. It might be good to extend jmap so that it uses the same mechanism for -histo (and maybe -heap). This will make the utilities more usable for running applications on Solaris/Linux. Also it means that the options will become available on Windows.

At this time there is little motive to change the -permstat and -finalizerinfo options. If needed, the developer can obtain a heap dump and use jhat/OQL to do more powerful queries. Over time (post-mustang) we can look to update  these other options too.
Also, output from jmap options contains a typo.

j2se/src/share/classes/sun/tools/jmap/JMap.java

System.out.println("    jmap [option] [server_id@]<remote server IP or hostname>");
	    System.out.println("	(to connect to remove debug server)");


remove needs to be remote :)

                                    

Comments
EVALUATION

See suggested fix.
                                     
2005-11-10
SUGGESTED FIX

Alan has -histo implemented but doesn't have the cycles to complete the testing and process needed to get this in. The webrevs are here:

http://sunweb.ireland/~ab23780/histo-hs/webrev/index.html 
http://sunweb.ireland/~ab23780/histo-sdk/webrev/index.html 

Jim has offered to bring this to the finish line.
                                     
2005-11-04



Hardware and Software, Engineered to Work Together