Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf diff: Change default setting to "delta-abs"

The "delta-abs" compute method will show most changed entries on top.
So users can easily see how much effect between the data. Note that it
also changes the default of -o option to 1 in order to apply the compute
method. To see original-style (sorted by baseline) use -o 0 option.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170210161856.18422-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
be57b3fd 4b35994a

+5 -5
+2 -2
tools/perf/Documentation/perf-diff.txt
··· 87 87 -c:: 88 88 --compute:: 89 89 Differential computation selection - delta, ratio, wdiff, delta-abs 90 - (default is delta). Default can be changed using diff.compute 90 + (default is delta-abs). Default can be changed using diff.compute 91 91 config option. See COMPARISON METHODS section for more info. 92 92 93 93 -p:: ··· 101 101 -o:: 102 102 --order:: 103 103 Specify compute sorting column number. 0 means sorting by baseline 104 - overhead (default) and 1 means sorting by computed value of column 1 104 + overhead and 1 (default) means sorting by computed value of column 1 105 105 (data from the first file other base baseline). Values more than 1 106 106 can be used only if enough data files are provided. 107 107 The default value can be set using the diff.order config option.
+3 -3
tools/perf/builtin-diff.c
··· 66 66 static bool show_period; 67 67 static bool show_formula; 68 68 static bool show_baseline_only; 69 - static unsigned int sort_compute; 69 + static unsigned int sort_compute = 1; 70 70 71 71 static s64 compute_wdiff_w1; 72 72 static s64 compute_wdiff_w2; ··· 86 86 [COMPUTE_WEIGHTED_DIFF] = "wdiff", 87 87 }; 88 88 89 - static int compute = COMPUTE_DELTA; 89 + static int compute = COMPUTE_DELTA_ABS; 90 90 91 91 static int compute_2_hpp[COMPUTE_MAX] = { 92 92 [COMPUTE_DELTA] = PERF_HPP_DIFF__DELTA, ··· 810 810 OPT_BOOLEAN('b', "baseline-only", &show_baseline_only, 811 811 "Show only items with match in baseline"), 812 812 OPT_CALLBACK('c', "compute", &compute, 813 - "delta,delta-abs,ratio,wdiff:w1,w2 (default delta)", 813 + "delta,delta-abs,ratio,wdiff:w1,w2 (default delta-abs)", 814 814 "Entries differential computation selection", 815 815 setup_compute), 816 816 OPT_BOOLEAN('p', "period", &show_period,