From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752393Ab2LQGj1 (ORCPT ); Mon, 17 Dec 2012 01:39:27 -0500 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:56269 "EHLO LGEMRELSE6Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893Ab2LQGjP (ORCPT ); Mon, 17 Dec 2012 01:39:15 -0500 X-AuditID: 9c930179-b7becae000000e51-98-50cebe0fc1c3 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , LKML , Jiri Olsa , Stephane Eranian , Namhyung Kim Subject: [PATCH 14/14] perf report: Add report.group config option Date: Mon, 17 Dec 2012 15:39:05 +0900 Message-Id: <1355726345-29553-15-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1355726345-29553-1-git-send-email-namhyung@kernel.org> References: <1355726345-29553-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 From: Namhyung Kim Add report.group config option for setting default value of event group view. It affects the report output only if perf.data contains event group info. A user can write .perfconfig file like below to enable group view by default: $ cat ~/.perfconfig [report] group = true And it can be disabled through command line: $ perf report --no-group Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 9fb3e4bf49d6..40b61681c3d3 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -8,6 +8,7 @@ #include "builtin.h" #include "util/util.h" +#include "util/cache.h" #include "util/annotate.h" #include "util/color.h" @@ -54,6 +55,16 @@ struct perf_report { DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); }; +static int perf_report_config(const char *var, const char *value, void *cb) +{ + if (!strcmp(var, "report.group")) { + symbol_conf.event_group = perf_config_bool(var, value); + return 0; + } + + return perf_default_config(var, value, cb); +} + static int perf_report__add_branch_hist_entry(struct perf_tool *tool, struct addr_location *al, struct perf_sample *sample, @@ -677,6 +688,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) OPT_END() }; + perf_config(perf_report_config, NULL); + argc = parse_options(argc, argv, options, report_usage, 0); if (report.use_stdio) -- 1.7.11.7