Chapter 2. Profiling Tools
If you only have a hammer, you tend to see every problem as a nail.
Before you can tune your application, you
need tools that will help you find the bottlenecks in the code. I
have used many different tools for performance tuning, and so far I
have found the commercially available profilers to
be the most useful. You can easily find several of these, together
with reviews, by searching the Web using
“java+optimi” and
“java+profile” as your search term
or by checking various computer magazines. I also maintain a list at
http://www.JavaPerformanceTuning.com/resources.shtml
.
These tools are usually available free for an evaluation period, and
you can quickly tell which you prefer using. If your budget covers
it, it is worth getting several profilers: they often have
complementary features and provide different details about the
running code. I have included a list of profilers in Chapter 19.
All profilers have some weaknesses, especially when you want to customize them to focus on particular aspects of the application. Another general problem with profilers is that they frequently fail to work in nonstandard environments. Nonstandard environments should be rare, considering Java’s emphasis on standardization, but most profiling tools work at the VM level, and there is not currently a VM profiling standard,[1] so incompatibilities do occur. Even if a VM profiling standard is finalized, I expect there will be some nonstandard VMs you may have ...
Get Java Performance Tuning, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.