Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Concurrency, Threading, GC, Advanced Java and more ... 

News August 2015

Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning

Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:

Training online
Threading Essentials course

Get rid of your performance problems and memory leaks!

Back to newsletter 177 contents

Java 9 retires our old friend of the Java performance community, hprof. The hprof profiler was added in to the JVM distribution in Java 1.2, and it's been a part of the JDK ever since. Probably many of you have never used hprof explicitly, or even been aware of it being in the JDK, but if you ever got a heap dump from the JVM, then you've used it implicitly. Don't worry, heap dumps will still be available in Java 9; even though hprof is being removed - they're retaining the heap dump capability.

A note from this newsletter's sponsor

New Relic - Try New Relic today and get your free Data Nerd shirt!
Free SaaS APM tool to monitor, troubleshoot, and tune apps
running on Websphere, Weblogic, Tomcat, Jetty, JBoss, Solr, Resin

The hprof profiler (you run it with the -Xrunhprof option to the command line, and it accepts a variety of sub-options to configure exactly what profiles you want to generate) was introduced as a demonstration profiler for using the JVMPI (and retained as a demonstration for the replacement JVMTI, though was completely rewritten to be more stable just as JVMTI was itself more stable than JVMPI). It's always been a little fiddly to use, and prone to crashing the JVM, but when it was first introduced it was free, and better than anything else that was free at the time. JHat was created to handle the memory dumps generated by the hprof profiler (JHat is also being retired for Java 9). The retirement rationale is that there are many better free tools out there, so there's no point in maintaining hprof, and that's true. jvisualvm is a better profiler and eclipse memory analyser (MAT) is a better heap dump analyser.

For those of you who like trivia, "hprof" stood for "heap profiler", although it profiled CPU execution as well as the heap. The reason you ran it with "-Xrunhprof" was because "-Xrun" is a generic command to the JVM to run a shared library agent given by the name of the subsequent characters, ie "-Xrunxyz" would run the shared library agent "xyz". In this case, it ran "hprof" - on unix there will be a "" file somewhere under the JRE distribution, on windows a "hprof.dll". It was part of the actual JRE, not only the JDK, because the JRE needed the ability to dump the heap that hprof provided.

Hprof stored all it's profile information outside the heap, in the C-side of the data, to minimize the profiler itself affecting Java object measurements. It included both generic types of cpu execution profilers, sampling (it simply spawned a separate thread which repeatedly slept for a specified number of microseconds then sampled the stacks of all threads), and timing (it used bytecode-insertion to insert timing code into every method entry and exit point). And it included two heap profilers, one which you know dumps the heap, and one which used bytecode-insertion to get the stack for every object allocation and then tracked objects; this latter profiler provided sufficient information to find what was creating objects, both for object allocation profiling and for object heap profiling.

Finally gone in Java 9 along with jhat, bye bye hprof. Now on to all our usual sections: links to tools, articles, news, talks and as ever, all the extracted tips from all of this month's referenced articles .


Java performance tuning related news.


Java performance tuning related tools.

A note from this newsletter's sponsor : Deep dive Application Performance Monitoring
Fix performance issues with Java, .NET and Ruby platforms.
*** Monitor one app instance starting at $9 ***.


Jack Shirazi

Back to newsletter 177 contents

Last Updated: 2022-06-29
Copyright © 2000-2022 All Rights Reserved.
All trademarks and registered trademarks appearing on are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
RSS Feed:
Trouble with this page? Please contact us