Best Java Profiling / Testing Tool
Please see the change log for a detailed list of changes.
JProfiler 9.0 introduces the following notable new features:
MBean browser. JProfiler 9 adds a facility for inspecting MBeans, modifying their attributes and executing their operations.
Many server products and third-party libraries publish MBeans to publish metrics and enable programmatic configuration by tools. JProfiler's MBean browser lists beans from all registered MBean servers without the need for starting a JMX connector and opening a port in the profiled JVM.
Editable MBean attributes of all simple types and their arrays can be edited.
Composite and tabular MBean data is shown inline in a tree table structure. Also, tabular data with one index and one value column is shown transposed. This makes it easy to inspect the frequently occurring attributes of type java.util.Map in MXBeans. Below, you can see the system properties in the java.lang/Runtime MXBean.
All operations that have parameters of simple types or their arrays can be invoked from JProfiler.
The returned result of the MBean operation can have a composite or tabular data type and is shown in the same structured format as the MBean attributes.
The JProfiler Chrome extension communicates with a JProfiler instance that is running on the same machine. The profiled backend can run on a remote machine. No configuration is required and the association with the profiled JVM is made automatically.
Custom telemetries. In addition to the pre-defined system telemetries, you can now define your own telemetries. There are two types of data sources: Numeric MBean attribute values and scripts.
For MBean telemetries, you can select the desired attribute in the telemetry section or directly in the MBean browser.
Script telemetries draw their data from a small piece of Java code that you enter in the JProfiler GUI. Typically, you will access static methods in your code. The script is polled once per second. Below, the length of the text in the clipboard is plotted.
Multi-level HTTP call tree splitting. Since JProfiler 4.0, the call tree is split for each distinct URL, with the actual definition of the URL string being configurable in the servlet probe.
JProfiler 9.0 takes URL splitting to a new level: Now you can have an arbitrary number of splitting levels with freely configurable scripts that have access to the HttpServletRequest object.
By default, JProfiler splits by the request URI only, without including parameters. The configuration of URL splitting is available in the session settings, on the "JEE & probes" tab.
For the script splitting mode, JProfiler suggest a number of script templates for useful splittings, for example splitting by session ID, by remote IP address or by a URL parameter.
From those starting points you can edit the scripts to match your particular use case.
Multiple splitting levels are useful if you want to consider several dimensions separately. For example, you might first want to split by the context path to separate deployed applications, then by the user name saved in the HTTP session and finally by the URL.
Method splitting in the call tree. Often, the performance characteristics of a method differ wildly depending on the argument values that are passed to it.
Previously, you could only see the cumulated numbers for all invocations in the call tree. Now, you can select any method and split it with respect to the return value of a script that can access all method parameters.
In the screen shot below, you see a script that splits the call tree by the product of the two integer arguments
Should you need to save state between subsequent invocations of the script, you could use the "scriptContext" parameter which is new for all scripts in JProfiler 9.0.
Heap dump only in quick attach. Sometimes you only want to take an HPROF heap dump of a running JVM instead of attaching the profiling agent to it. Among other things, the HPROF heap dump can be taken quite a bit faster than a heap dump by a JVMTI profiling agent.
Previously, you could use the
jpdump command line executable for that purpose and then open the
saved snapshot in the JProfiler GUI. Now, the quick attach dialog has a new "Heap dump only" button that allows
you to directly take and load the snapshot for the selected JVM.
Configurable retaining reference types in the heap walker. Previously, the heap walker had an option to keep objects retained by weak references. The term "weak references" included soft, weak and phantom references.
In JProfiler 9.0, the retaining reference types can be configured separately in the heap walker options dialog that is displayed each time before taking a heap snapshot. Trigger actions and API methods have received corresponding enhancements. The default setting is now to retain objects that are held by soft references.
The "Weakly referenced objects" inspection has been improved with the "Reachability" and "Result type" options. For example, it is now possible to find all objects that have been retained in the heap dump by soft references by setting the reachability of the inspection to "Retained".
The "Result type" determines whether the weak reference must directly reference an object in the current object set or if a transitive reference chain is considered as well.
Remote attach option for IDE integrations. IDE integrations have had an "Attach to JVM" feature for some time, but attaching to a remote JVM was not possible.
Since JProfiler 9.0, the quick attach dialog that is shown after the "Attach to JVM" action is invoked in the IDE, offers an "On another computer" option that will help you to enable the JVM for profiling and create a remote attach session in JProfiler.