perf_diff
Compare two perf.data profiles to expose per-symbol overhead changes for optimization validation, regression detection, or A/B testing.
Instructions
Compare two perf.data profiles side by side. Shows per-symbol overhead changes between a baseline and a new measurement.
Use this for before/after comparisons — optimization validation, regression detection, or A/B testing.
Key parameters:
old_input: path to baseline perf.data (required).
new_input: path to comparison perf.data (required).
compute: comparison method — 'delta' (default, percentage-point difference), 'delta-abs' (absolute), 'ratio' (new/old), 'wdiff' (weighted), 'cycles' (cycle-level).
formula: true to show the computation formula.
symbols/dsos/comms: filter scope.
baseline_only: show only symbols present in baseline.
Output: differential table with baseline%, new%, and delta columns. Both files must be from perf record with compatible events.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cpu | No | CPUs to filter | |
| pid | No | Only consider these PIDs | |
| tid | No | Only consider these TIDs | |
| dsos | No | Only consider these DSOs | |
| sort | No | Sort by key(s) | |
| time | No | Time span of interest | |
| comms | No | Only consider these comms | |
| force | No | Don't complain, do it | |
| order | No | Specify compute sorting column (0-based index) | |
| quiet | No | Do not show any warnings or messages | |
| symfs | No | Symbol filesystem root | |
| period | No | Show period values instead of percent | |
| stream | No | Enable hot stream comparison | |
| compute | No | Comparison method | |
| formula | No | Show formula for computed values | |
| modules | No | Load module symbols | |
| symbols | No | Only consider these symbols | |
| verbose | No | Verbosity level | |
| vmlinux | No | vmlinux pathname | |
| kallsyms | No | kallsyms pathname | |
| new_input | Yes | Path to the comparison perf.data file | |
| old_input | Yes | Path to the baseline perf.data file | |
| percentage | No | How to display percentage | |
| cycles_hist | No | Display cycle histogram | |
| baseline_only | No | Show only items with match in baseline | |
| dump_raw_trace | No | Dump raw trace in ASCII | |
| field_separator | No | Separator for columns |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |