0

I've read several of the other questions on SO regarding Java profilers, but I haven't found anything that fits my needs.

Here are the features that I need:

  • Java profiler that will work with Java 1.6.0_18 (32-bit)
  • Free for commercial use (my organization does not allow trialware)
  • Able to display method execution times so I can find the bottlenecks (this will be my primary use of the profiler)
  • Plays nice with Eclipse (my organization does not use NetBeans)
  • Works on Windows XP

Additionally, these features would be "nice to have":

  • Graphical display, rather than text output
  • Able to show memory and CPU usage
  • Able to profile execution of a JUnit that I launch manually from Eclipse, rather than profiling a server (such as Tomcat)
  • Also works on Linux

Based on a recommendation from another question, I just downloaded VisualVM 1.3 and tried it out. It did not work properly on my workstation and did not integrate well with Eclipse, so that one is off my list.

Any suggestions?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Jim Tough
  • 14,843
  • 23
  • 75
  • 96
  • VisualVM does integrate well with Eclipse See https://visualvm.dev.java.net/eclipse-launcher.html What problems are you having with it? – Tarski Feb 15 '11 at 13:33
  • I launched VisualVM by itself and it started profiling itself. So far so good. Then I launched Eclipse and VisualVM showed "unknown application" in its list. When it clicked on it, it caused Eclipse to crash with some kind of Windows memory fault error. Tried a few more times with the same result. – Jim Tough Feb 15 '11 at 13:39
  • Say Jim, while you're hunting for a measurement tool, you can look for your bottlenecks by [this method](http://stackoverflow.com/questions/266373/one-could-use-a-profiler-but-why-not-just-halt-the-program/317160#317160). Lots of people do that. – Mike Dunlavey Feb 15 '11 at 13:54
  • Believe VisualVM, which ships with JDK 6+, can generate thread dumps as well. – orangepips Feb 15 '11 at 17:37

3 Answers3

5

The eclipse profiler is a subproject of TPTP (Test and Performance Tools Project).

There is one article from 2006 that shows how to use the profiler (the 2006' version)

Andreas Dolk
  • 113,398
  • 19
  • 180
  • 268
  • I was concerned that their page says the TPTP project is being decommissioned: http://www.eclipse.org/tptp/home/project_info/devplans/EclipseTPTPProjectPlan2010.htm – Jim Tough Feb 15 '11 at 13:42
  • OK, didn't know that, but: *After many successful releases of TPTP, the project has evolved and matured* - IAW - it works (mature) and, as long as we don't use the new Java 7 language features, it should be a very reliable tool. – Andreas Dolk Feb 15 '11 at 14:02
  • Someone in my office also recommended TPTP. I'm keeping it on my 'maybe' list. I need to upgrade my Eclipse version (and re-install all my plugins) to use the latest TPTP version, so I will have to wait on this for a couple of days until I have the time. Still giving you an upvote since this could be a viable solution. – Jim Tough Feb 15 '11 at 14:09
  • 1
    @Jim Tough: just install another version of eclipse in a different directory and add that plugin. – orangepips Feb 15 '11 at 14:22
  • @orangepips I just unpacked the TPTP "all-in-one" distribution from their web page. It is a version of Eclipse Helios (1.6) that is pre-configured with all of the necessary plugins to use TPTP. It works, but when I'm profiling the executing code runs EXTREMELY slow. Still, it did give me some useful info to work with. Thanks to you and Andreas_D for the recommendations. – Jim Tough Feb 15 '11 at 16:53
0

What's about CodePro Profiler , which now is free by Google.

secmask
  • 7,649
  • 5
  • 35
  • 52
  • It is not 'free'. I just checked the page at the link you provided above. There is one option for obtaining a trial license key, and another for using a purchased license key. This may help someone else, but I'm not interested in trialware. – Jim Tough Feb 15 '11 at 15:08
0

I've been making use of the Java VisualVM which comes with Sun/Oracle JDK 6.0. It doesn't integrate with Eclipse, but it doesn't get in the way either. (I'm currently profiling Eclipse plugins).

I did investigate TPTP but I found it difficult to set up and something of a memory hog.

Richard Miskin
  • 1,260
  • 7
  • 12