You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Caldarale, Charles R" <Ch...@unisys.com> on 2009/03/31 17:19:32 UTC

RE: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service)

> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> 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 prompt.

> 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


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus 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.


Re: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service)

Posted by Gregor Schneider <rc...@googlemail.com>.
On Tue, Mar 31, 2009 at 5:19 PM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>> 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).
>

Talking about thread-dumps:

I guess Johannes is using a German keyboard. On a German keyboard, a
Java-thread-dump is triggered by <Strg><Pause>

(That's <CTRL><BREAK> translated).

HTH

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org