can anyone recommend a good profiler?

hello,

i am looking for a profiler, but since there are so many out there and i dont wanna try out every single one, i am asking you guys if you can recommend one.

i mainly want to profile, which objects take up how much memory.
secondly i want to profile, which methods take up the most time.
thirdly, i am using eclipse, so if it is an eclipse plugin, that would be great, but that is not a must.

thank you very much!

The best free profiler I knwo of is the one for Netbeans. (http://www.netbeans.org/products/profiler/)

I have tried a few profilers for Eclipse and basically have gotten none of them to work :frowning:

http://jiprof.sourceforge.net/

Java Interactive Profiler. Requires Java 1.5

as mentioned in http://www.java-gaming.org/forums/index.php?topic=14127.0

a good tutorial for jip

http://www-128.ibm.com/developerworks/java/library/j-jip/?ca=dgr-lnxw01JavaProfiling#resources

I use JProfiler. It’s a commercial product, but I’m also a commercial developer, so that’s not really an issue for me :wink: It integrates nicely into IntelliJ IDEA, meaning running an with the profiler is just a button click away. I believe it also integrates with eclipse and netbeans too.

If your goign commercial, Ive benea long time fan of OptimizeIt. But its not cheap.

Yourkit provides free license for open-source projects.

I haven’t used it intensively but you may want to take a look at it : http://www.yourkit.com/

thank you guys!

I haven’t tried Eclipse profilers… but I’ve had a hell of a time getting the NetBeans profiler to work consistently. I’ve used it a couple times, and then a week or two later wanted to use it again and it refused to properly “connect”. It’s pretty decent when it works… but it seems to be quite flakey… Not to mention the various bits of voodoo required to set it up if you are using a free-form Ant project. That was on Windows XP, I haven’t tried it on Mac… (on Mac NetBeans has a brutal memory leak and I can’t use it for more than a half hour before it swaps to death and I need to restart.)

I tried TPTP (Eclipse’s profiler) but it is really complex to make it works and there is a significant overhead.
Now, I use http://profiler4j.sourceforge.net/ which is very nice and intuitive.

Note that I have not yet found a profiler that allows me to get good results on the small methods that are called a lot of times (like activate of my state wrapper class, or render of my render command class) ; I also have my integrated profiling functions to narrow and validate profiler4j results.

Vincent

As a related side-question, is -Xprof still broken on 1.6?
It seems to work, but I’m not sure the results are correct.
For me, -Xprof has always been the easiest and most efficient way to do performance profiling. Until it got broken…

I’m afraid that -Xprof is still as slow on Mustang as it was on 1.5. It works, but slows down the application to the point of unusability. I would ask that you please file a bug about this and vote it up. The group which made this undesirable change in 1.5 has been unwilling to revisit the issue.

Well, I found that it slows down the program, but not nearly as much as any other profiler I tried.
JIP for example halts my application to an almost complete halt (think 0.2fps instead of 150fps).
But I’ll submit a bug report because -Xprof is still much slower than in 1.4 and I’m not so sure the 1.6 profiler output is correct (it seems really strange sometimes).

I have had the same problems with the profillers in eclipse, they reduce the speed of my app from 300 fps to about 0.1! The profillers I used in C++ were pretty much seamless; I didn’t even notice much of an overhead!

Bump. I’m in need of a profiler - I usually just dump generic stats with -Xrunhprof and use HPjmeter to peek at them, but it seems that the profile dump is too large for it to handle with my current game. :frowning:

I’m going to try a few from here first, but are there any other suggestions?