1

What does a Profiler do exactly?

I ran the JProbe profiler on my Java EE Application. For now I selected Performance Analysis only. When I investigated the code, it showed how many times each method gets called and how much time it took. It gave me a clear view of these things.

Now my question is, what in general does a profiler do exactly? The only thing it seems to do is showing how many times a method is called and how much time each method took?

Does Profiling a Java EE application indeed only means this thing? (In the concern of Performance Analyses only)

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Pawan
  • 31,545
  • 102
  • 256
  • 434

2 Answers2

2

Just to add..Profiling is general concept not only restricted to Java or Java EE. It is a dynamic analysis of your program.

  • what does it do? you can check on profiler application.
  • how does it help: Helps you to optimize your program and trouble shoot cases such as Out of memory and dead lock which is not possible with the routine debugging techniques (printlns and debugger).
Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
neo
  • 1,054
  • 1
  • 10
  • 19
2

A profiler can tell you lots of useful things, in addition to traces and method timings:

  • The state of the heap and its generations in real time: perm, eden, etc.
  • Created threads and their states
  • CPU usage
  • Number of instances of each class

I like to use Visual VM 1.3.3 with all the plugins installed. I use the Oracle/Sun JVMs, so it works for me.

duffymo
  • 305,152
  • 44
  • 369
  • 561