Overview
Theevents command inspects a JFR or pprof file and lists all available event types with their sample counts. This helps you:
- Discover what was profiled in a recording
- Choose the right event type for analysis
- Verify profiler configuration
This command requires structured profile formats (JFR or pprof). It does not work with collapsed text files.
Usage
Output Format
Displays a table of available events:- EVENT: Event type name
- SAMPLES: Number of samples for this event
total row sums all event samples.
Events are sorted by sample count (descending).
Examples
List Available Events
Check pprof Events
Verify Multi-Event Recording
Check if async-profiler captured multiple event types:Read from Stdin
Supported Event Types
Common async-profiler event types:- cpu: CPU time sampling (on-CPU methods)
- wall: Wall-clock time (includes waiting/blocked)
- alloc: Object allocation profiling
- lock: Lock contention profiling
- cache-misses: CPU cache misses (requires perf)
- page-faults: Page fault events
- context-switches: Context switch events
- cycles, instructions: Hardware performance counters
Hardware counter events (cache-misses, cycles, etc.) require Linux perf support and appropriate permissions.
Use Cases
Choose Analysis Event
Before analyzing, see what’s available:Verify Profiler Configuration
Confirm your profiler recorded the expected events:Troubleshoot Missing Data
If analysis seems empty, check if the expected event exists:Compare Recording Coverage
See which events have the most data:Script Integration
Check available events before automated analysis:Event Types Explained
CPU vs Wall
CPU events sample only when the thread is executing on CPU:- Shows computational hot spots
- Excludes time spent waiting for I/O, locks, sleep
- Best for finding CPU bottlenecks
- Shows total time including waiting
- Reveals I/O waits, lock contention, thread parking
- Best for understanding total latency
Allocation Profiling
alloc events track object allocations:- Sample count = number of allocations, not bytes
- High allocation rate → GC pressure
- Use to find unnecessary allocations
Lock Contention
lock events fire when threads block on monitors:- Shows which locks are contended
- Low sample count is good (means little contention)
- Use to find synchronization bottlenecks
No Events Found
If you see:- Empty or corrupt profile file
- Profile format not supported (use JFR or pprof)
- Recording was started but not stopped (no samples captured)
Error Cases
Collapsed Text Input
Error:Stdin Non-Structured
Error:events. This command needs structured formats: