PERF-DIFF(1) perf Manual PERF-DIFF(1) (NAME) perf-diff - perf.data (SYNOPSIS) perf diff [baseline file] [data file1] [[data file2] ... ] (DESCRIPTION) perf.data perf record . perf.data.old perf.data . perf.data . dso (symbol) . perf.data perf diff . (OPTIONS) -D, --dump-raw-trace (dump) ASCII. --kallsyms= kallsyms -m, --modules . : -k (LIVE) . -d, --dsos= dso . CSV file://filename . Baseline/Delta . --percentage . -C, --comms= comm . CSV file://filename . Baseline/Delta . --percentage . -S, --symbols= . CSV file://filename . Baseline/Delta . --percentage . -s, --sort= (): pid comm dso symbol cpu parent srcline. --sort perf-report . -t, --field-separator= space ( ) . . -v, --verbose diff. -q, --quiet . ( -v) -f, --force . --symfs= . hierarchy ( ) flat ( ) . . -b, --baseline-only baseline . -c, --compute - delta ratio wdiff cycles delta-abs ( delta-abs ). diff.compute . COMPARISON METHODS . --cycles-hist (cycles). . -c cycles . -p, --period (period) hist . -F, --formula . -o, --order . 0 baseline 1 () ( baseline) . 1 . diff.order . --percentage (overhead) . --comms --dsos / --symbols . <> . <> . --time . . a%/n,b%/m,... a%-b%,c%-%d,... . : : perf diff --time 10%/2 : perf diff --time 0%-10% : perf diff --time 10%/1,10%/2 : perf diff --time 0%-10%,30%-40% , . seconds.nanoseconds . 'start' ( ',x.y' ) . ( 'x.y,' ) . --time "1234.567,1234.789 1235," 'a1.b1,c1.d1:a2.b2,c2.d2' . ':' perf.data . 'perf script' . perf script -i perf.data.old mgen 13940 [000] 3946.361400: ... perf script -i perf.data mgen 13940 [000] 3971.150589 ... perf diff --time 3946.361400,:3971.150589, perf.data.old 3946.361400 perf.data.old perf.data 3971.150589 perf.data . --cpu CPU . CPU : 0,1. CPU - : 0-2. CPU . --pid= (PID) ( ). --tid= (TID) ( ). --stream (hot streams). (callchain) (branch records) . (baseline) . perf.data . perf.data . . perf.data () . : - A f1, f2, f3, f4, f6 - B f2, f4, f5 - C f1, f2, f5 : x - b - o perf diff A B C baseline/A compute/B compute/C samples --------------------------------------- b x f1 b x x f2 b f3 b x f4 b f6 x x f5 o perf diff B A C baseline/B compute/A compute/C samples --------------------------------------- b x x f2 b x f4 b x f5 x x f1 x f3 x f6 o perf diff C B A baseline/C compute/B compute/A samples --------------------------------------- b x f1 b x x f2 b x f5 x f3 x x f4 x f6 delta Delta d : d = A->period_percent - B->period_percent : - A/B hist / ( perf.data/perf.data.old) . o period_percent period hist o -C -d / -S period_percent . --percentage=absolute . delta-abs 'delta` . ratio Ratio r : r = A->period / B->period : - A/B hist / ( perf.data/perf.data.old) . o period (period) hist wdiff:WEIGHT-B,WEIGHT-A Weighted diff d : d = B->period * WEIGHT-A - A->period * WEIGHT-B o A/B hist / ( perf.data/perf.data.old) . o period (period) hist o WEIGHT-A/WEIGHT-B -c : -c wdiff:1,2 . o WEIGHT-A o WEIGHT-B (baseline) [Program Block Range] Cycles Diff . (basic block) perf.data . . [Program Block Range] . symbol+offset . (SEE ALSO) perf-record(1), perf-report(1) perf 09/04/2026 PERF-DIFF(1)