Part of my job, since early on after joining Microsoft, has been to make code run fast, be it my code or someone else's, be it C,C++, JavaScript, C#, or now Java. I actually like doing performance tuning. I'm one of those computer geeks who likes getting down to the machine code and understanding what the processor is doing, and try to refactor and redesign code to better factor in realities of how the code actually runs. I've used many tools, and having been at Microsoft gave me access to a wealth of internally developed tools, that may have been clunky, but worked reasonably well. (I still remember the horrendous Excel spreadsheet that someone had written to analyze the results of an early version of an internal profiler. Scary, but it provided an excellent view that was easily searchable, graphable, etc...)
My more recent Microsoft experiences were with the .Net runtime (aka CLR) and there was (usually) a similar wealth of available options. (If you feel the need to get me going, ask me about trying to profile/tune code during the mid-point of CLR 2.0's development cycle...) The .Net runtime ships with an excellent memory profiling, there is
a free profiler, and Visual Studio 2005 (Team System edition) includes a kick-but profiler.
So now I work with Java. I've been developing with Eclipse and using
HPJMeter for my profiling UI (it uses the profiling built into the jvm to do the actual tracing). Recently, I've been trying to do some memory usage tuning. HPJMeter is mostly useless there, although all the info I need is in the log file, HPJMeter appears to throw out the stack traces... sigh. I've looked around at the various free profiler tools and been sorely disappointed.
The latest I'm looking at is the profiler integrated into NetBeans. Finally I am seeing something that is more than just a toy! Given Java's reputation for being slow, how could Sun have been so embarrassingly asleep-at-the-wheel all these years, and not helped fund a decent profiler tool before? This just baffles me.
As part of my frustration with the available free tools, I've been evaluating the various commercial tools:
JProbe 6.0,
YourKit 5.0, and
JProfiler 4.1. JProfiler and YourKit appear to be in a head-to-head customer battle, with very similar feature sets and almost identical pricing structures. JProbe looks like the old-school, high-end solution with node-locked licenses and a significantly higher cost, but with a more mature UI and such features as line-level sample-based tracing. All these products have all sorts of features to help J2EE profiling, but all I want is basic application profiling. For that, JProbe is definitely the best, but JProfiler is the best-for-the-money.
All that said, I've started using
NetBeans Profiler (M11). It isn't quite as feature-rich as any of the commercial offerings, but it provides 90% of the value, at 0% of the cost.... almost. Unfortunately, it is tied to NetBeans, so I would need to either switch from Eclipse to NetBeans, or live with both. They finally got a Mac OS X build out as well! I'm not sure when I'll get around to trying that out, but that is a major selling point for me. (Most of my development is on a Wintel box. My poor PowerBook is just not up to snuff for real development. Apple, please bring me a decent Pentium M laptop A.S.A.P.! Your PowerPC laptops just can't compare!)
post-script:I did not realize (before writing this entry) that Microsoft's new profiler only ships in the Team System edition. That is insane. Team System is bloody expensive! I have an MSDN Universal subscription, so I don't really worry about the cost of individual tools, but I can't but wonder if Sun's pushing a decent profiler into NetBeans will eventually force Microsoft to package a stripped-down version of their profiler in Visual Studio Professional or even Standard. Having been at Microsoft during the development of Visual Studio 2005, I understand how much work went into producing it, but I find it hard to believe that customers are really willing to shell out that kind of money, when Java has Eclipse and NetBeans for free, and IntelliJ (which costs a bit more than Standard Edition). Lets see, NetBeans is a decent IDE (slow and bloated, but then so is VS) with an integrated profiler, version-control integration (CVS and Subversion), and Unit-Test framework (JUnit). To get the same from Microsoft, I need to shell out almost $3k? Someone is either not paying attention to their competition or actively enjoys watching their market-share shrink.