Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

profiling tutorials

 
Stephanie Ll
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic