Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Profiling the profilers

A comparative review of three commercial Java code profilers

  • Print
  • Feedback

Page 3 of 6

To keep this review manageable, I restricted myself to testing standalone Java 2 Platform, Standard Edition (J2SE) applications. I didn't test Java 2 Platform, Enterprise Edition (J2EE) applications, although all three vendors try their best to sell into J2EE markets by including product features that explicitly support servlet profiling or EJB components running on various application servers.

You must have intimate knowledge of an application's architecture and implementation to expect to gain new insights from using a profiler, so I relied mainly on two of my own real-life applications as profiling guinea pigs (see Table 2 below).

Table 2. Profiled applications

Program name World-on-a-Disc Slave
Description Map-based multimedia
engine for CD/DVD-ROM
See www.worldonadisc.com
Generic pluggable file
and directory processor
See www.lv2.clara.co.uk/slave.html
Performance
"Achilles' heel"
CPU-bound I/O-bound
Number of classes 35 60+


All three profilers come with small demonstration applications. I definitely found it necessary to familiarize myself with each profiler by playing with these demos before letting the tools loose on my own programs.

Borland Optimizeit Suite

Borland's Optimizeit Suite is the most mature, full-featured profiler package reviewed here. At ,599 a seat, Borland is clearly not trying to grab the lone developer market. The suite consists of three loosely coupled components: Optimizeit Profiler, Optimizeit Thread Debugger, and Optimizeit Code Coverage.

Borland Optimizeit Suite's core features

Borland's Optimizeit Profiler is the combined tool façade for CPU and heap/object profiling. Figure 2 shows a typical GUI screenshot.

Figure 2. Optimizeit Profiler's class instances view: Easy on the eyes, but an eye opener nevertheless. Click on thumbnail to view full-size image.

Figure 2's class instances view tabulates the distribution of live objects, grouped by class and sorted by number of objects. If you've never used a heap profiler before, be prepared for an epiphany: Not only will the underlying reality of your program viewed through this lens completely disorient you, but once you come to terms with it, you'll never view your program's source code the same way again.

Borland's Profiler lets you click on any class and view precisely where each instance of that class has been allocated. Not only does Profiler tell you in which methods the allocations occurred (Figure 3), but if you double-click any method name, a source code viewer pops up with the allocating statement line highlighted.

Figure 3. Optimizeit Profiler object allocation backtrace view. Click on thumbnail to view full-size image.

This feature is invaluable when you suspect your program suffers from object allocation hot spots (i.e., parts of the program that allocate too many objects), or want to track down the source of live objects you think shouldn't even exist in your program (e.g., Abstract Window Toolkit (AWT) color objects in an XML parser or Swing objects cluttering up a command-line-only utility!).

  • Print
  • Feedback
What is Tech Briefcase?
TechBriefcase is a new, free service where IT Professionals can Search, Store and Share IT white papers and content like this. Learn more
Bookmark content
Speed up your research efforts with content across the web.
Search and Store
Find the white papers you need. Create folders for any topic.
View Anywhere
Open your briefcase on your iPhone, tablet or desktop. Share with colleagues.
Don't have an account yet?

Archived Discussions (Read only)
Subject
. Forum migration complete By AthenAdministrator
. Forum migration update By AthenAdministrator
. JProfiler By Klaus B.
. about JPROBE By nagendar
. I have to disagree By Tom Davies
. disappointed By Maxine A. Moire
. NISUS By Anonymous
. note on jprofiler By Anonymous
. Unsupported platforms By Warren Dew
. CPU Profiling By Max
. Compuware DevPartner By Anonymous
. jProfiler memory usage analysis By Anonymous
. JProbe vs JProfiler By Anonymous
. JProfiler Tutorials By Anonymous
Resources