tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <>
Subject RE: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service)
Date Tue, 31 Mar 2009 15:19:32 GMT
> From: Christopher Schultz []
> Subject: Re: Profiling tomcat applications with -Xrunhprof (Tomcat runs
> asa Windows Service)
> Are you trying to get profiling data, or are you trying 
> to get a thread dump?

No, he's looking for heap profiling.

> I think you're describing the process to get a thread dump (which is
> CTRL-\, /not/ CTRL-C, which will kill your process).

No, CTRL-C will terminate the process, and get the hprof data, when started from a command

> Which JVM are you using? When I run "java -Xrunhprof:help" from my Sun
> 1.5.0 install (on Linux), it says I should be using -agentlib:hprof and
> that the "Xrunhprof interface" will be removed in future versions.

Which it's been saying for quite some time.  Like many other deprecated interfaces, the -
Xrunhprof will be there for a while; it still works in 1.7.

> Perhaps your version has Xrunhprof removed and using agentlib:hprof
> will work.

The -Xrunhprof is clearly being recognized, since the C:\hprof.txt file is being created.
 (And the profiling is definitely occurring - performance is terrible with it on.)  Changing
it to the newer -agentlib format doesn't make any difference; JVM initialization translates
the old -Xrunhprof syntax to the newer JVMTI format internally.  In neither case does the
hprof file get written, other than the few lines of header.

What might work is using JVisualVM instead and just looking at the information in the GUI.

 - Chuck

for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

View raw message