This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes profiling tutorials Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "profiling tutorials" Watch "profiling tutorials" New topic
Author

profiling tutorials

Stephanie Ll
Greenhorn

Joined: Jan 06, 2006
Posts: 4
Hi all!
I'm looking for tutorials on java profiling

I've tried to profile a simple java prog (with only a system.out.println in it )but couldn't make it work.

The java program compiles fine but it's the profiling part that i'm having some probs (i tried to do the profiling on windows)

NOTE: my java version is 1.6
i tried these:
java -prof hello
but got "dumping cpu usage in old prof format ... done"

java -Xrunhprof:cpu samples,thread=y hello
but got "dumping cpu usage by sampling running threads ... done"

I never got the java.hprof.txt file

Why am i getting the dumping msg thing? What do they mean?
What am i doing wrong?? :S
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1220

Hi Stephanie,

do you have a certain reason for doing profiling from the command line? Unfortunately I can't help you with what you are trying to do but I think it would be a lot easier to use an IDE with integrated profiler. That way with only a few mouse clicks your application gets profiled and all data are beautiful visualized and you can additionally filter or sort them in various ways.
I only know the profiler integrated in Netbeans IDE but I'm sure every good modern IDE supports profiling like this.

This is only my opinion and of course it won't help if you have good reasons to do this from the command line...

Marco
Stephanie Ll
Greenhorn

Joined: Jan 06, 2006
Posts: 4
Well i wanted to try it via the cmd as it's an eg from my lecture and my lecturer told us to try it at home.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: profiling tutorials
 
Similar Threads
list of virtual machine arguments
Performance help for CQ5 content management system
Measure Java CPU usage
need java code to increase cpu usage
Control CPU usage at different levels