- System requirements
- Profiler architecture
- Profiler installation
- Uninstall profiler
- Running the profiler
- Profiler activation
- Welcome screen
- Start profiling
- Profiling overhead
- Snapshots
- Solving performance problems
- CPU profiling
- Thread profiling
- Virtual threads support
- Object allocation profiling
- Memory profiling
- Monitor profiling
- Exception profiling
- Telemetry
- Probes: monitor events of various kinds
- Events in user interface
- Event inspections
- Built-in probes
- Probe classes
- Monitoring method invocation events
- Probe class annotation @MethodPattern
- Callback onEnter()
- Callback onReturn()
- Callback onExit()
- Callbacks onUncaughtException() and onUncaughtExceptionExt()
- Parameter annotation @Param
- Parameter annotation @Params
- Parameter annotation @This
- Parameter annotation @ClassRef
- Parameter annotation @MethodName
- Parameter annotation @MethodTimeMs
- Parameter annotation @MethodTimeNs
- Parameter annotation @MethodParameterTypes
- Parameter annotation @MethodSignature
- Parameter annotation @OnEnterResult
- Parameter annotation @ReturnValue
- Parameter annotation @ThrownException
- Probe application rules
- Data storage
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Automatic deobfuscation
- Summary
- Filters
- Profiler command line
- Export of profiling results to external formats
- Profiler Java API
- Profiler HTTP API
- Settings
- Troubleshooting and FAQ
Callback onExit()
Callback method onExit()
can be used instead of two separate callbacks
onReturn()
and onUncaughtException()
.
It helps to avoid code duplication when, for example, a lasting event created in onEnter()
should be closed on normal return as well as on exception.
Only one method named onExit()
can exist in a probe class.
It cannot be used together with onReturn()
or onUncaughtException()
.
Difference from onReturn() and onUncaughtException()
onExit()
can use both @ThrownException and
@ReturnValue callback parameters.
If instrumented method exits without throwing an exception, @ThrownException
parameter will be null
, and @ReturnValue
parameter will be assigned accordingly.
If instrumented method throws an exception, @ThrownException
parameter value will be assigned, and @ReturnValue
parameter will be null
or zero.
Parameters
The callback can have any number of parameters, including zero.
Each of the parameters must be annotated with one of the following annotations: