Open Source Profilers for Java

Share the article!

I’ve noticed an upsurge in activity with respect to the development of profilers for the Java enviroment. These projects either exploit the JVMPI (incidentally, targeted for deprecation!) to provide new forms of visualization or use a byte code enhancement technique to provide alternative monitoring schemes. So to keep myself on top of events, I decided to put together this review:

  • Cougaar Memory Profiler – The Cougaar memory profiler is a tool for debugging memory usage and leaks in any Java application. It features a scalable 100% Java design that is lighter weight than existing JVMPI-based profilers. The profiler tracks memory usage within the application by using tables of WeakReferences.
  • JMemProf – JMemProf is a live Java memory profiler suitable for deployment in web containers such as JBoss, Tomcat and others. JMemProf allows you to retrieve memory profile information while your application is running. JMemProf aims to add dynamic visibility to memory usage in Java web applications; memory profile information can be viewed easily through a Servlet based web interface while the application is running. It is much more dynamic and easily understandable than that of the hprof heap profiler bundled with the J2SDK.
  • JMP – JMP is a profiler for java that can be used to trace objects usage and method timings. JMP uses the JVMPI interface to gather statistics and interact with the JVM. JMP uses a GTK+ interface to show the status.
  • Extensible Java Profiler – Extensible Java Profiler (EJP) is a profiling tool for Java with a scalable and extensible architecture, allowing its usage for exotic programming languages that use a Java backend. EJP is based on the Java Virtual Machine Profiler Interface (JVMPI). It can be used to trace the execution of small parts of Java programs and display it in hierarchical trees with some elements hidden or highlighted.
  • JAMon – The Java Application Monitor (JAMon) is a free, simple, high performance, thread safe, Java API that allows developers to easily monitor production applications. JAMon can be used to determine application performance bottlenecks, user/application interactions, and application scalability. JAMon gathers summary statistics such as hits, execution times (total, average, minimum, maximum, standard deviation), and simultaneous application requests. JAMon statistics are displayed in the sortable JAMon report.
  • jMechanic – jMechanic is an Eclipse Java IDE plugin providing Java Profiling tools. Tools such as CPU Sampling and Heap Summary allow the Java developer to tune up the performance of their Java programs all within the comfort of the Eclipse IDE.
  • JRat – JRat is the Java Runtime Analysis Toolkit. Its purpose is to enable developers to better understand the runtime behavior of their Java programs. There are currently a number of ways JRat can monitor an application (i.e. Bytecode instrumentation, JBoss AOP, Dynamic Proxies, JDI).
  • Eclipse Profiler – This is a plugin for the Eclipse platform which allows java code profiling.
  • xdProf – xdProf is a cross-platform tool that captures and analyzes stack traces sent at a fixed interval from Java Virtual Machines in a distributed system. The performance impact of the xdProf client sending data over a local area network is minimal: less than a 8% increase in total elapsed time for a set of standard benchmarks.
  • Hyades – Hyades is an integrated test, trace and monitoring environment, based on Eclipse, that provides standards, tools and tool interoperability across the test process.
  • GCSpy – The Garbage Collector Spy Tool, or GCspy for short, is a generic and highly-adaptable heap visualisation framework, designed to visualise a wide range of memory management systems, whether they depend on garbage collection or implement explicit de-allocation.
  • heapprofile – A zero-overhead JVMPI plugin for finding first indications of memory leaks in production environments.
    Where commercial tools kill the performance of your application by collecting uninteresting performance data (such as ‘who allocated this object’),
    this plugin stays inactive during runtime and simply dumps a very simple image of the Java heap on request.
  • AdaptJ – The AdaptJ Agent allows to collect event trace data from a Java program running in a Java Virtual Machine. The AdaptJ Analysis Tool allows to read and analyze the traces generated by the agent, using either the built-in analyses or custom ones.
  • JavaTreeProfiler – JVMPI based visualization using a TreeMap.
  • beeSee 2 – beSee 2 provides a mechanism to plug a class preprocessor instrumentation layer in any classloader hierarchy, thus supporting java 1.3, 1.4, J2SE and J2EE environment. beSee 2 is the ground 0 lightweight layer of the next generation AOP architecture. It provides a bytecode kit independant solution and comes ready to use with two implementation: BCEL and Javassist.
  • Omniscient Debugging – The debugger works by collecting “time stamps” which record everything that happens in a program. A GUI then allows you to navigate backwards in time to look at objects, variables, method calls, etc. Although focused on debugging, technique may be applicable for Profilers.
  • HotSwap Client Tool – This is a GUI client tool that provides access to the HotSwap functionality. Using this tool, you can dramatically improve the time of the usual “test – find a bug – stop the program – change – recompile – restart the program” development cycle by removing the “stop” and “restart” elements from it. Furthermore, you can use it to patch “on-the-fly” deployed applications that need to run uninterrupted.
  • STEP – Extsnible Program Trace Encoding. STEP providins a standard method for encoding general program trace data in a flexible and compact format. The system consists of a trace data definition language along with a compiler for the language and an encoding architecture that implements a number of common trace reduction techniques. The system simplifies the development and interoperability of trace clients by encapsulating the encoding process and presenting the data as an abstract object stream.
  • AppStats – AppStats is a lightweight, open source framework developed and used by Grand Central Communications, Inc. to capture, analyze, and publicize health, performance, and monitoring statistics for Java applications.
  • P6Spy – P6Spy is an open source framework for applications that intercept and optionally modify database statements. P6Log intercepts and logs the database statements of any application that uses JDBC. P6Outage detects long-running statements that may be indicative of a database outage proble and will log any statement that surpasses the configurable time boundary during its execution. P6Outage was designed to minimize any logging performance penalty by logging only long running statements.
  • NetBeans Profiler – NetBeans Profiler is a project to integrate the JFluid profiling technoglogy, which is being developed by Sun, into the NetBeans IDE. The JFluid technology addresses this issue by providing a mechanism in the JVM(tm), which allows the user to turn profiling on and off at any time, and, equally important, to profile just a small subset of the code, that they are currently interested in. The profiled subset of the code and the type of profiling (CPU, memory, etc.) can be changed at any moment at run time. This is achieved mainly through dynamic bytecode instrumentation. Features include low overhead profiling, attaching to running applications, CPU Performance profiling, memory profiling, memory leak debugging and task-based profiling.
  • FProfiler – FProfiler is a Java Profiler using BCEL and log4j. Its very fast because it inserts the needed instructions into the Bytecode of the classes. It can be used to find Hotspots in Java programs, libs and servlet environments simply every Java class.
  • Heap Analysis Tool(HAT) – The Heap Analysis Tool (HAT) helps to debug unnecessary object retention (sometimes called “memory leaks”) by providing a convenient means to browse the object topology in a heap snapshot, which is generated by the Java VM. HAT reads a hprof file, then sets itself up as a web server–therefore allowing you to run queries against a heap dump contained within the hprof file.
  • InfraRED – InfraRED is a tool for monitoring performance of a J2EE application and diagnosing performance problems. It collects metrics about various aspects of an applicationxe2x80x99s performance and makes it available for quantitative analysis of the application. InfraRED uses AOP to weave the performance monitoring code into the application.
  • Glassbox Inspector – The Glassbox Inspector project combines AspectJ and JMX for a flexible, modular approach to monitoring performance for enterprise systems. It provides correlated information to allow you to identify specific problems, but with low enough overhead to be used in production environments. It lets you capture statistics such as total counts, total time, and worst-case performance for requests, and will also let let you drill down into that information for database calls within a request.
  • JIP – JIP is a code profiling tool much like the hprof tool that ships with the JDK. JIP allows you to turn the profiler on and off while the JVM is running. JIP is pure Java. It takes advantage of the Java5xe2x84xa2 feature which allows you to hook the classloader. When the profiler is turned off, there is almost no overhead associated with using JIP. JIP allows real world timings for every class in your code.
  • DJProf – DJProf is an experimental Java profiling tool which employs AspectJ to insert the necessary instrumentation for profiling rather than, for example, the Java Machine Profiler Interface (JVMPI). DJProf can be used to profile Java programs without modification (i.e. there is no need to recompile them for profiling) and does not require the user to have any knowledge of AspectJ. The Load-Time Weaving capability of AspectJ is utilised to make this possible. It supports several different modes of profiling such as heap usage, object lifetime, wasted time and time spent.

Please feel free to let me know what I had missed.


Share the article!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>