- Running the profiler
- Profiler activation
- Running applications with the profiler
- Connect to profiled application
- Troubleshoot connection problems
- Solving performance problems
- Performance bottlenecks
- Optimizing memory usage
- Memory leaks
- Excessive garbage allocation
- Out of memory error (OutOfMemoryError and -XX:+HeapDumpOnOutOfMemoryError)
- CPU profiling
- Deadlock detector
- Memory profiling
- Garbage collection
- Monitor profiling
- Exception profiling
- Probes: monitor events of various kinds
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- IDE integration
- Time measurement (CPU time, wall time)
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler API
- Command line tool to control profiling
- FAQ: How to profile in my scenario?
Excessive garbage allocation
How to find excessive garbage allocation?
Purpose: Reduce time that garbage collector spends on collecting temporary objects.
- Run application with the profiler
- Connect to the application
- 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.
Let us assume there is a task in your application that you want to profile.
- Start object allocation recording with default settings right before the task is started.
- Wait until the task finishes or performs long enough.
- Capture memory snapshot and stop object allocation recording.
- Open snapshot and use Garbage Collection view.
Optionally, the profiled application can be launched with object allocation recording started with the help of corresponding startup options. Memory snapshot with recorded allocation information can be captured automatically on profiled application exit and/or on high memory usage. Read more in the Startup options section.