YourKit Java Profiler Features:
On demand profiling
Many existing profilers are very heavyweight and cannot be run in production, but only doing testing. And there is a cumbersome process of running the application within the profiler.
Effectively running a profiling tool that has high overhead causes a large amount of problems, as it can often take hours to properly get the tool to a point in a project where the failure occures.
YourKit Java Profiler optimizes the process by profiling where, when and what is needed. CPU profiling adds no performance overhead to the application being profiled until profiling is explicitly started. You can start and stop CPU profiling during execution of Java application as many times as you wish.
YourKit Java Profiler streamlines the memory profiling process by making object allocation monitoring an option. This greatly reduces the amount of system resources needed to profile an application, and increases the overall performance and speed of the profiling job in general. It is so lightweight that can be considered "zero overhead".
Easiest installation and configuration
In our view, profiling should be non-intrusive and very easy to use. During today's fast track development, this is invaluable to allow developers to seamlessly integrate profiling into development process.
The profiling can be done at the will of the developer, at any point during an applications run time. This allows for a much lower impact on system resources, lower time consumption, and a more precise profiling of the application.
No need for cumbersome installations and separate run processes like traditional profilers.
Unlimited profiling for one fee
Commercial license allows running of an unlimited number of Java applications with the profiler agent in development, testing or production stages.
Profiling of J2EE applications
Action "Tools | Integrate with J2EE Server..." automatically enables profiling in a number of popular application servers:
- Geronimo
- JBoss
- Jetty
- JRun
- Orion
- Resin
- Sun Application Server / GlassFish
- Tomcat
- WebLogic
- WebSphere
If your server is not on the list, use the "Generic server" option.
If J2EE server runs on a remote machine, use a console version of J2EE integration wizard. This feature is invaluable when you have only telnet/ssh etc. access to the remote machine. Then you will be able to run the profiler UI on your workstation and profile the server remotely.
Also you can automatically run J2EE server with profiler from within your IDE with the help of IDE integration.
Read more about profiling J2EE applications.
Ability to profile in production environment
Extremely low overhead allows production code profiling.
If profiled code is obfuscated, profiler can automatically restore the original names of classes, methods and fields. Currently, we support RetroGuard, Zelix KlassMaster, ProGuard, yGuard.
Full Java 5 support
YourKit Java Profiler uses new profiling capabilities introduced in Java 5. The profiler benefits from using new JVMTI API, allowing for analysis of very large memory heaps and leading to increased stability when profiling large projects.
Full Java 6 support
If profiled application runs on Java 6, YourKit Java Profiler uses new profiling capabilities introduced in Java 6:
- Memory snapshot is captured automatically on OutOfMemoryError
- Native methods are included in CPU profiling results
- Lengths of arrays are exact in memory snapshots
Rich multiplatform support
Both YourKit Java Profiler and the profiled application can run on the following platforms:
- Windows NT/2000/2003/XP/Vista, 32-bit Java (x86) and 64-bit Java (x86-64)
- Linux, 32-bit Java (x86) and 64-bit Java (x86-64)
- Mac OS X 10.4 and newer, PPC and Intel, 32-bit and 64-bit Java
- Solaris SPARC, 32-bit and 64-bit Java
- Solaris 10 x86, 32-bit and 64-bit Java
- FreeBSD 7 i386 and amd64 (aka x86_64) with Diablo Caffe JDK 1.6.0-7
It is even possible to have 'mixed' configurations.
For example, you can start profiler on a Windows desktop and profile server running Linux or any combination thereof.
Supported Java vendors:
At the moment, the profiler supports profiling on:
- Sun Java: versions 1.3, 1.4, 5, 6 and 7
- JRockit 5 and 6 (see detail...)
- IBM Java 5 SR1 and newer, and IBM Java 6 (see detail...)
64-bit Java support
64-bit Java is supported on Windows (x86-64), Linux (x86-64), Solaris SPARC, Solaris 10 x86, FreeBSD.
Telemetry
This feature allows viewing key information about an application in runtime within live graphs, providing details about memory, garbage collection activity, loaded classes, threads, as well as JVM and OS information.
Very useful and unique feature is that the telemetry information is remembered inside the profiler agent. This allows to connect to profiled application on demand, being able to discover how the application has behaved in the past.
When you are connected to profiled application, find telemetry tabs on the session panel.
Automated profiling: profiler API and command line tool
Profiler API allows users to integrate YourKit Java Profiler programmatically. Create extra value by integrating memory and CPU utilization profiling ability into your application.
Alternatively, command line tool can be used to control profiling without using the profiler UI.
Filters in CPU and memory views
Filters can be used in YourKit Java Profiler to reduce the depth of call trees. By skipping successive calls of e.g. standard library methods, you can give more focus to problematic methods of profiled application.
Filters are applied to views where method call stacks are shown, as well as to hot spot and method list views. With same snapshot you can use different filters or use no filters at all - you do not need to start a new profiling session for such a change. Views are automatically updated when filter settings are changed.
Use "Settings | Filters..." to configure filters.
Filters are used in runtime as well to reduce CPU tracing overhead.
See corresponding help topic for more details.
Improved learnability
It's easier for newbies to discover the power of the profiler thanks to the following new features.
Hint panel provides direct links to context-related Help topics.
Innovative master-slave view concept allows to see key information on a single screen.
This feature greatly improves usability.
For example, when a method is selected in upper table, you can immediately see back traces or merged callees in the slave view below.
Another example: in memory views immediately see paths from GC roots:
Remote profiling
YourKit Java Profiler provides an ability to profile applications remotely, i.e. in case the profiled application and the profiler UI run on different machines. For example, this is much useful when profiling a remote J2EE server from your workstation.
Snapshot captured on remote host can be automatically transferred via network to the local machine.
Read more about profiling remote J2EE applications.
Ability to export profiling results
You can export all reports and data to:
- HTML, optionally packing all generated files to a single ZIP archive
- CSV ("comma separated values") format
- Plain text format
In particular, you can export telemetry data (right-click a graph to invoke a popup menu):
"File | Copy To Clipboard..." (Ctrl+C or another platform specific shortcut) action copies text of selected row in all trees and lists.
Summary, snapshot annotation and automatic deobfuscation
The "Summary" tab provides an overview of JVM properties and parameters of profiled application, as well as a summary of application telemetry information.
Automatic deobfuscation
If the profiled application is obfuscated, YourKit Java Profiler can automatically restore original names of classes, fields and methods if you specify the path to the obfuscation log file.
Snapshot annotation
The "Summary" view for a snapshot lets you store free-form text descriptions directly in the snapshot file.
See corresponding help topic for more details.
CPU telemetry
-
The "CPU" tab shows live CPU consumption statistics.
Also, you can learn what application was doing at particular moments of time with the help of thread stack traces available in telemetry graphs. This is extremely useful analyzing CPU or other resource consumption peaks that have already happened, without CPU profiling (sampling, tracing) turned on. However, this is not a replacement of CPU profiling when you need most accurate and detailed results.
-
When the profiling is started, the bottom table on "CPU" tab shows top-down call
tree with calls from all threads merged:
This live view provides only basic information. To perform comprehensive analysis capture performance snapshot.
Read more about CPU profiling.
Sampling and tracing
You can choose either of the two available measurement modes: sampling or tracing.
When sampling is used, the profiler periodically queries stacks of running threads to estimate the slowest parts of the code.
Sampling is typically the best option when your goal is to locate and discover performance bottlenecks. With sampling, the profiler adds virtually no overhead to the profiled application.
When tracing is used, the profiler instruments the byte code of the profiled application for recording thread CPU time spent inside each profiled method. Both times and invocation counts are available.
Read more about CPU profiling.
J2EE high-level profiling
YourKit Java Profiler provides means for profiling J2EE applications in high-level terms like SQL statements and URLs.
Execution time and invocation counts are available for particular SQL and HTTP queries.
"SQL" section shows list of SQL statements and back traces for all methods invoked with these statements.
"JSPs and Servlets" section shows list of URLs, corresponding to JSPs and Servlets calls, and merged callees for all methods invoked with these URLs.
"JNDI" section shows list of URLs, corresponding to JNDI calls, and back traces for all methods invoked with these URLs.
See corresponding help topic for more details.
CPU views: hot spots, method call tree and method list
CPU view ("View | CPU") shows CPU consumption details.
"Call tree (all threads together)" section shows top-down call tree with all threads merged.
"Call tree (by thread)" section shows top-down call tree for each thread.
"Hot spots" shows methods that consumed the most of CPU time.
"Method list" for each method shows its CPU time, own CPU time and, if recorded, invocation count.
See corresponding help topic for more details.
"Callees list" view
"Callees list" view shows which methods were called from certain methods. It is available as a slave view in:
- Call tree
- Hot spots
- Method list
See corresponding help topic for more details.
Unique "Merged callees" view
Quickly gain knowledge about behavior of a certain method. The "Merged callees" view shows merged call traces started from the method. This gives a summary of method execution, of its "overall" behavior.
Action "View | Method Merged Callees" opens this view for the currently selected method.
See corresponding help topic for more details.
Method back traces view
"Back traces" view shows all places in code where a certain method was called.
Action "View | Method Back Traces" opens this view for the currently selected method.
See corresponding help topic for more details.
Ability to compare CPU snapshots
With YourKit Java Profiler, you can compare two arbitrary CPU snapshots.
See corresponding help topic for more details.
Measure either CPU time or wall time for particular methods
Use "Settings | Wall Time Methods..." to specify methods for which wall time should be measured instead of CPU time:
See corresponding help topic for more details.
Thread telemetry
Use tab Threads to track the live threads.
Automatic deadlock detection
If a Java-level deadlock happens in the profiled application, it will be automatically detected:
See corresponding help topic for more details.
Monitor profiling
Monitor profiling allows analysis of synchronization issues:
- which threads were calling wait(), and for how long
- which threads were blocked on attempt to aquire monitor held by another thread (synchronized methods/blocks), and for how long
Monitor profiling results are shown in the "Monitor Usage" view. Results can be grouped by waiting thread, by blocker thread and by monitor class name.
See corresponding help topic for more details.
Memory telemetry
-
The "Memory" tab shows live memory usage statistics:
-
The bottom table on "Memory" tab provides a class instance count statistics -
a quick overview of current heap state:
This view provides only basic information. To perform comprehensive analysis capture memory snapshot.
See corresponding help topic for more details.
Unique comprehensive objects view
Objects view allows comprehensively examine all objects in snapshot or certain subset of objects.
"Biggest objects (dominators)" view shows individual objects that retain most of memory. Save time and find the largest problems quickly. The objects are shown as a dominator tree. Read more...
This information can be useful to understand and reduce memory usage. In particular, this is useful to find memory leaks caused by individual objects. Sometimes it can be educative to learn about memory distribution in terms of individual objects.
Unique "Class list" view is a powerful tool for examining how memory is distributed among instances of different classes.
This view provides instant feedback about which classes of the profiled application are consuming the most of the memory, causing memory leaks etc.
Classes whose objects retain most memory are shown at the top, as the list is sorted by retained size.
On opening the view, estimated retained sizes are shown instead of exact sizes, which cannot be immediately calculated. The exact sizes may be obtained by using "Calculate exact retained sizes" balloon above the "Retained Size" column. However, for most classes the estimation is very close to the exact value, so there is almost no need to run exact size calculation.
"Merged paths" view is a tool for examining how objects are retained.
It is especially useful when analyzing objects of classes with big number of instances, such as
int[] or java.lang.String etc.
"Merged paths" is similar to "Paths from GC roots" view, but unlike it shows not paths through individual objects, but paths from multiple objects grouped by class.
For example, see the picture below.
The "Merged paths" view shows that the memory hold by int[] instances is mostly retained by
VelocityCharStream instances, which in their turn are retained by
Parser and ParserTokenManager.
"Object explorer" shows all objects of the set and allows to browse their outgoing references. Outgoing references of an object are fields or array elements of the object that point to other objects.
"Incoming references" shows all objects of the set and allows to browse their incoming references. Incoming references of an object are references to that object.
"Class loaders" shows objects grouped by class loader. This view can help solving issues such as leaked loaders.
See corresponding help topic for more details.
Easy way to browse instances of particular class
Use "View | Instances by Class..." action to browse all instances of particular class. It is also very useful when you want to check whether instances of certain class exist or not.
The camel humps notation is supported.
"Find Paths" helps to find reasons of memory leaks
YourKit Java Profiler has unique and very powerful means for memory leak detection - calculation of paths between objects in memory. To find the reason of the leak examine path from GC roots to a leaked object.
You can choose number of shown paths from the list above the view.
You can also find paths between defined sets of objects.
See corresponding help topic for more details.
Find objects by text pattern
"Memory | Strings by Pattern... (Ctrl+F)" action shows instances of java.lang.String,
char[] and byte[] that match given text pattern.
The objects can be found in entire snapshot or in custom objects set.
This can be useful to locate particular objects if their fields refer to a known string.
Optional recording of object allocations
YourKit Java Profiler can optionally record object allocations, i.e. track method call stacks where objects are created. Since recording of allocations can impact performance of application being profiled, you can turn this mode on only for the periods when it is needed.
Allocation recording is used to find sources of excessive garbage allocation and analyze where live objects are created.
If allocations are recorded, Objects view will appear with additional sections.
"Call tree (all threads together)" section shows top-down call tree with methods where objects from the set were created. Calls from all threads are merged.
"Call tree (by thread)" section shows a per-thread top-down call trees with methods where objects from the set were created.
"Hot spots by object count" section shows methods where biggest number of objects was created.
"Hot spots by object size" section shows methods where objects with biggest total shallow size were created.
"Method list" for each method shows the number and shallow size of objects it had created.
The "Garbage Collection" view is a good starting point to search for excessive garbage allocation. It shows numbers and shallow sizes of collected objects, i.e. objects created since allocation recording was started and recycled to the moment of snapshot capture. See Solving performance problems to learn more why one should avoid excessive garbage allocation.
See corresponding help topic for more details.
Automatic inspections
Share experience of typical memory related problems recognition with the help of the "Inspections" feature, which provides means for automatic high level analysis of application memory. Each inspection automatically detects specific memory oddities. Doing such analysis by hand would be a very complicated (if ever possible) task.
With the help of inspections you can easily find causes and possible solutions of usual memory related problems:
- "Duplicate Strings"
- "Null Fields"
- "Sparse Arrays"
- "Zero Length Arrays" finds if there are large numbers of zero length arrays of same type
- "Objects Retained by Inner Classes" finds objects only referenced via inner class synthetic backpointers (easy to do this unintentionally, and may cause leak)
- "Lost SWT Controls"
- "Highly Referenced Objects"
- "Self Referencing Objects"
- "Non-Serializable Objects Referenced from Serializable Objects"
"Inspections" view is added to any tab representing objects, such as "All Objects" or any subset. Inspections for all objects (i.e. for the entire snapshot) are also available via top-level tab "Inspections'.
See corresponding help topic for details.
Object generations
The generations distribute objects by time of their creation, and thus they are very helpful finding memory leaks and doing other analysis of how heap content evolves in time.
When each object is created, it is associated with current generation number. The generation represents object's age: the smaller the generation number, the older the object.
All tabs representing live objects have "Generations" view. In this view, you get objects separated by time of their creation:
See corresponding help topic for details.
"Dead objects" view
"Dead objects" shows objects that are not accessible from GC roots but still present in snapshot (i.e. not collected yet). The view can be used to analyze excessive garbage allocation, especially if the snapshot doesn't contain recorded object allocation information.
See corresponding help topic for details.
"Quick Info" view
"Quick Info" view shows useful information about selected object(s), such as:
- Retained and shallow size
- Object count
- Allocation trace, if available
- Stack traces, if there are local variables referencing to the selected object, as well as the variable names, if corresponding debug info is available
- Object generation information, if available
- Primitive array elements
Ability to automatically capture memory snapshots
You can instruct the profiler to trigger capturing of memory snapshots.
There are 3 kinds of triggers available:
- Capture snapshot on low memory
- Capture on OutOfMemoryError
- Capture snapshots periodically
The triggers can be set up and later altered during profiled application run time.
When triggered memory snapshot is captured notification is shown in UI:
See corresponding help topic for more details.
Ability to compare memory snapshots
With YourKit Java Profiler, you can compare two arbitrary memory snapshots.
See corresponding help topic for more details.
Automated comprehensive memory tests
YourKit's descriptive XML based language allows users to declare custom sets of objects in order to find memory leaks and examine memory distribution.
The descriptive language for memory analysis and profiler API allow to write comprehensive memory tests.
Support of HPROF format snapshots
Java has a built-in feature - under certain circumstances, to save memory dumps into files in so-called HPROF format. You can analyze these files using all of the powerful features that YourKit Java Profiler provides for its own memory snapshots.
HPROF format memory dumps can be created in the following ways:
- On OutOfMemory
- Explicitly from within the profler UI (Java 6)
- Explicitly via jmap utility (Java 6)
- Explicitly via jconsole utility (Java 6)
See corresponding help topic for more details.
Values of primitive types
Values of fields of primitive types (int, boolean, double etc.) are shown in object explorers:
Values of primitive type arrays (int[], char[] etc.) are shown in Quick Info:
For byte[] Quick Info shows text representation in specified encoding:
See corresponding help topic for more details.
Exception telemetry
"Exceptions" telemetry shows exceptions which were thrown in the profiled application.
See corresponding help topic for more details.
Garbage collection profiling
"Garbage Collection" telemetry will help you estimate garbage collector load. If garbage collection takes a significant amount of time, it is advised to profile memory allocation to pin-point and optimize the problematic code.
See corresponding help topic for more details.
IDE integration
- IDE integration provides:
- Ability to launch profiled applications from within the IDE thus making CPU and memory optimization a part of your development process
- Easy navigation from profiling results to underlying source code of profiled application -- "Tools | Open Declaration in IDE Editor (F7)" action opens currently selected class, field or method in IDE editor
- Supported IDEs:
- Eclipse (read more)
- IntelliJ IDEA (read more)
- NetBeans (read more)
- JBuilder (read more)
- JDeveloper (read more)
When profiled application is launched from IDE, the profiler UI automatically opens and connects to the application (If found obtrusive, this option can be turned off from plugin UI)
If profiled application launched from IDE ends quickly, the profiler UI will anyway show the application's profiling results.

