Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971AbaANEnv (ORCPT ); Mon, 13 Jan 2014 23:43:51 -0500 Received: from LGEMRELSE1Q.lge.com ([156.147.1.111]:54417 "EHLO LGEMRELSE1Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752617AbaANEnX (ORCPT ); Mon, 13 Jan 2014 23:43:23 -0500 X-AuditID: 9c93016f-b7b1aae000000f15-70-52d4c068f1d9 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , Namhyung Kim , LKML , Jiri Olsa , David Ahern Subject: [PATCH 4/5] perf report: Add report.percentage config option Date: Tue, 14 Jan 2014 13:43:18 +0900 Message-Id: <1389674599-28227-5-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1389674599-28227-1-git-send-email-namhyung@kernel.org> References: <1389674599-28227-1-git-send-email-namhyung@kernel.org> X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add report.percentage option for setting default value of the symbol_conf.filter_relative. It affects the report output only if a filter applied. An user can write .perfconfig file like below to show absolute percentage of filtered entries by default: $ cat ~/.perfconfig [report] percentage = absolute And it can be changed through command line: $ perf report --percentage relative Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 535bd6745355..1bb9e989c7bd 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -71,6 +71,16 @@ static int report__config(const char *var, const char *value, void *cb) rep->min_percent = strtof(value, NULL); return 0; } + if (!strcmp(var, "report.percentage")) { + if (!strcmp(value, "relative")) + symbol_conf.filter_relative = true; + else if (!strcmp(value, "absolute")) + symbol_conf.filter_relative = false; + else + return -1; + + return 0; + } return perf_default_config(var, value, cb); } -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/