From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110AbdBNBRt (ORCPT ); Mon, 13 Feb 2017 20:17:49 -0500 Received: from merlin.infradead.org ([205.233.59.134]:40248 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751591AbdBNBOJ (ORCPT ); Mon, 13 Feb 2017 20:14:09 -0500 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Namhyung Kim , Jiri Olsa , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 05/15] perf diff: Change default setting to "delta-abs" Date: Mon, 13 Feb 2017 22:13:50 -0300 Message-Id: <20170214011400.13352-6-acme@kernel.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170214011400.13352-1-acme@kernel.org> References: <20170214011400.13352-1-acme@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Namhyung Kim 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 Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170210161856.18422-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/perf-diff.txt | 4 ++-- tools/perf/builtin-diff.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/Documentation/perf-diff.txt b/tools/perf/Documentation/perf-diff.txt index 7391299defef..66dbe3dee74b 100644 --- a/tools/perf/Documentation/perf-diff.txt +++ b/tools/perf/Documentation/perf-diff.txt @@ -87,7 +87,7 @@ OPTIONS -c:: --compute:: Differential computation selection - delta, ratio, wdiff, delta-abs - (default is delta). Default can be changed using diff.compute + (default is delta-abs). Default can be changed using diff.compute config option. See COMPARISON METHODS section for more info. -p:: @@ -101,7 +101,7 @@ OPTIONS -o:: --order:: Specify compute sorting column number. 0 means sorting by baseline - overhead (default) and 1 means sorting by computed value of column 1 + overhead and 1 (default) means sorting by computed value of column 1 (data from the first file other base baseline). Values more than 1 can be used only if enough data files are provided. The default value can be set using the diff.order config option. diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index e68cc76bdc5a..70a289347591 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -66,7 +66,7 @@ static bool force; static bool show_period; static bool show_formula; static bool show_baseline_only; -static unsigned int sort_compute; +static unsigned int sort_compute = 1; static s64 compute_wdiff_w1; static s64 compute_wdiff_w2; @@ -86,7 +86,7 @@ const char *compute_names[COMPUTE_MAX] = { [COMPUTE_WEIGHTED_DIFF] = "wdiff", }; -static int compute = COMPUTE_DELTA; +static int compute = COMPUTE_DELTA_ABS; static int compute_2_hpp[COMPUTE_MAX] = { [COMPUTE_DELTA] = PERF_HPP_DIFF__DELTA, @@ -810,7 +810,7 @@ static const struct option options[] = { OPT_BOOLEAN('b', "baseline-only", &show_baseline_only, "Show only items with match in baseline"), OPT_CALLBACK('c', "compute", &compute, - "delta,delta-abs,ratio,wdiff:w1,w2 (default delta)", + "delta,delta-abs,ratio,wdiff:w1,w2 (default delta-abs)", "Entries differential computation selection", setup_compute), OPT_BOOLEAN('p', "period", &show_period, -- 2.9.3