From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756213AbcAIQaQ (ORCPT ); Sat, 9 Jan 2016 11:30:16 -0500 Received: from terminus.zytor.com ([198.137.202.10]:41923 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755827AbcAIQaN (ORCPT ); Sat, 9 Jan 2016 11:30:13 -0500 Date: Sat, 9 Jan 2016 08:29:58 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: kan.liang@intel.com, mingo@kernel.org, linux-kernel@vger.kernel.org, namhyung@kernel.org, a.p.zijlstra@chello.nl, hpa@zytor.com, dsahern@gmail.com, tglx@linutronix.de, jolsa@kernel.org, acme@redhat.com Reply-To: mingo@kernel.org, kan.liang@intel.com, dsahern@gmail.com, jolsa@kernel.org, acme@redhat.com, tglx@linutronix.de, namhyung@kernel.org, linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, hpa@zytor.com In-Reply-To: <1452028152-26762-4-git-send-email-jolsa@kernel.org> References: <1452028152-26762-4-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf script: Process stat config event Git-Commit-ID: 91a2c3d54fd4b5be4e25acc1d8c1cc9a28319774 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 Commit-ID: 91a2c3d54fd4b5be4e25acc1d8c1cc9a28319774 Gitweb: http://git.kernel.org/tip/91a2c3d54fd4b5be4e25acc1d8c1cc9a28319774 Author: Jiri Olsa AuthorDate: Tue, 5 Jan 2016 22:09:07 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 6 Jan 2016 20:11:15 -0300 perf script: Process stat config event Adding processing of stat config event and initialize stat_config object. Signed-off-by: Jiri Olsa Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452028152-26762-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index aa6d7cf..a90bc0b 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -36,6 +36,7 @@ static bool print_flags; static bool nanosecs; static const char *cpu_list; static DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); +static struct perf_stat_config stat_config; unsigned int scripting_max_stack = PERF_MAX_STACK_DEPTH; @@ -1689,6 +1690,14 @@ static void script__setup_sample_type(struct perf_script *script) } } +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_script *script) { struct perf_evlist *evlist = script->session->evlist; @@ -1774,6 +1783,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) .auxtrace_info = perf_event__process_auxtrace_info, .auxtrace = perf_event__process_auxtrace, .auxtrace_error = perf_event__process_auxtrace_error, + .stat_config = process_stat_config_event, .thread_map = process_thread_map_event, .cpu_map = process_cpu_map_event, .ordered_events = true,