- System requirements
- Profiler architecture
- Running the profiler
- Profiler activation
- Running applications with the profiler
- Local profiling
- Remote profiling
- Startup options
- Attaching profiler agent to a running JVM
- Profiling overhead: how to reduce or avoid
- Enabling profiling manually
- About JVMTI
- Connect to profiled application
- Troubleshoot connection problems
- Solving performance problems
- CPU profiling
- Threads
- 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)
- Filters
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler Java API
- Profiler HTTP API
- Command line tool to control profiling
- Settings
- FAQ: How to profile in my scenario?
Local profiling
Local profiling is the case when the profiled application and the profiler UI run on the same machine, usually the developer workstation.
See also Remote profiling.
You should perform two actions to perform local profiling:
1. Ensure the local application is running with the profiler agent
To profile a Java application, the profiler agent should be loaded into the JVM.
There are different approaches depending on the application type:
Java SE application
Use one of the following:
- IDE integration: use the Profile action from within your IDE, like you do Run or Debug.
- To profile an application from outside an IDE, perform a few simple steps described in Enabling profiling manually.
- Attach profiler agent to a running JVM.
Java EE application (EE server)
Use one of the following:
- IDE integration: use the Profile action from within your IDE, like you do Run or Debug.
-
Java EE server integration wizard: use if the application server runs standalone, i.e. you start it with a script or it runs as a service.
The wizard automatically enables profiling in a number of popular application servers, generating appropriate startup scripts. Even if your server is not in the list of known servers, the wizard offers the "Generic server" option which will instruct you on how to manually perform the necessary changes.
The wizard can be started from the profiler Welcome screen, or by using Tools | Profile Local Java EE Server or Application....
- Attach profiler agent to a running JVM.
Profiling Java Web Start/JNLP
Use one of the following:
-
Start Java Web Start application with the profiler agent by setting the environment variable
JAVAWS_VM_ARGS
:JAVAWS_VM_ARGS=-agentpath:<agent library path>
If necessary, specify other VM options too:
JAVAWS_VM_ARGS=-agentpath:<agent library path> <other VM options>
Please learn how to specify
-agentpath:<agent library path>
in Enabling profiling manually.Hint: on Windows, you can set
JAVAWS_VM_ARGS
variable globally in "My Computer" settings. - Attach profiler agent to a running JVM.
2. Connect to the local application
When the local application is running, connect to it from the profiler UI to perform profiling.