Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935060AbbLRJOv (ORCPT ); Fri, 18 Dec 2015 04:14:51 -0500 Received: from terminus.zytor.com ([198.137.202.10]:52562 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753683AbbLRJMl (ORCPT ); Fri, 18 Dec 2015 04:12:41 -0500 Date: Fri, 18 Dec 2015 01:12:26 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, jolsa@kernel.org, mingo@kernel.org, hpa@zytor.com, a.p.zijlstra@chello.nl, namhyung@kernel.org, acme@redhat.com, dsahern@gmail.com, kan.liang@intel.com Reply-To: linux-kernel@vger.kernel.org, tglx@linutronix.de, jolsa@kernel.org, mingo@kernel.org, hpa@zytor.com, namhyung@kernel.org, acme@redhat.com, a.p.zijlstra@chello.nl, kan.liang@intel.com, dsahern@gmail.com In-Reply-To: <1446734469-11352-14-git-send-email-jolsa@kernel.org> References: <1446734469-11352-14-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf stat report: Process stat config event Git-Commit-ID: 62ba18ba938a8740ab18e02342b282d7378986f7 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2045 Lines: 57 Commit-ID: 62ba18ba938a8740ab18e02342b282d7378986f7 Gitweb: http://git.kernel.org/tip/62ba18ba938a8740ab18e02342b282d7378986f7 Author: Jiri Olsa AuthorDate: Thu, 5 Nov 2015 15:40:57 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 17 Dec 2015 16:27:00 -0300 perf stat report: Process stat config event Adding processing of stat config event and initialize stat_config object. Reported-by: Kan Liang Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1446734469-11352-14-git-send-email-jolsa@kernel.org [ Renamed 'stat' parameter to 'st' to fix 'already defined' build error with older distros (e.g. RHEL6.7) ] Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-stat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 0a1cfdd..1e5db50 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1533,6 +1533,15 @@ static int __cmd_record(int argc, const char **argv) return argc; } +static +int process_stat_config_event(struct perf_tool *tool __maybe_unused, + union perf_event *event, + struct perf_session *session __maybe_unused) +{ + perf_event__read_stat_config(&stat_config, &event->stat_config); + return 0; +} + static int set_maps(struct perf_stat *st) { if (!st->cpus || !st->threads) @@ -1600,6 +1609,7 @@ static struct perf_stat perf_stat = { .attr = perf_event__process_attr, .thread_map = process_thread_map_event, .cpu_map = process_cpu_map_event, + .stat_config = process_stat_config_event, }, }; -- 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/