perf_inject
Enhance perf.data files by injecting build IDs, decoding hardware traces, merging scheduler events, or processing JIT data to enable analysis in perf_report and perf_script.
Instructions
Transform a perf.data file: inject build IDs, decode hardware traces, merge scheduler events, or process JIT data. Writes a new perf.data.
Use this as a preprocessing step before perf_report or perf_script.
Key parameters:
input: source perf.data path (required).
output: destination perf.data path (required).
build_ids: inject build-id headers for symbol resolution.
itrace: decode hardware traces. Values: 'i0ns' = synthesize instructions, 'b' = synthesize branches, 'c' = synthesize calls, 'e' = synthesize errors.
jit: process JIT-compiled code mappings.
sched_stat: merge sched_stat and sched_switch events.
Output: writes a new perf.data file, returns path and size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jit | No | Process JIT data and inject JIT code | |
| force | No | Don't complain, do it | |
| input | Yes | Path to input perf.data file | |
| strip | No | Use with --itrace to strip non-synthesized events | |
| itrace | No | Decode Instruction Tracing data and inject synthetic events | |
| output | Yes | Path to output perf.data file | |
| verbose | No | Verbosity level | |
| vmlinux | No | vmlinux pathname | |
| kallsyms | No | kallsyms pathname | |
| build_ids | No | Inject build IDs into the output file | |
| guest_data | No | Inject guest data (path to guest perf.data) | |
| guestmount | No | Guest OS root file system mount point | |
| sched_stat | No | Merge sched_stat and sched_switch events | |
| buildid_all | No | Inject build IDs for all DSOs | |
| ignore_vmlinux | No | Don't load vmlinux even if found | |
| mmap2_buildids | No | Inject build IDs in mmap2 events | |
| known_build_ids | No | Known build IDs | |
| convert_callchain | No | Convert callchain to dwarf-based | |
| mmap2_buildid_all | No | Inject build IDs for all mmap2 events | |
| vm_time_correlation | No | Correlate time between host and guest |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |