From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755670AbdESJBV (ORCPT ); Fri, 19 May 2017 05:01:21 -0400 Received: from mga07.intel.com ([134.134.136.100]:55399 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755198AbdESJBN (ORCPT ); Fri, 19 May 2017 05:01:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,363,1491289200"; d="scan'208";a="1132489325" From: Adrian Hunter To: Arnaldo Carvalho de Melo , Andi Kleen Cc: linux-kernel@vger.kernel.org Subject: [PATCH 23/37] perf auxtrace: Add itrace option to output power events Date: Fri, 19 May 2017 11:54:22 +0300 Message-Id: <1495184076-23805-24-git-send-email-adrian.hunter@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1495184076-23805-1-git-send-email-adrian.hunter@intel.com> References: <1495184076-23805-1-git-send-email-adrian.hunter@intel.com> Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add itrace option to output power events. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/itrace.txt | 5 +++-- tools/perf/util/auxtrace.c | 4 ++++ tools/perf/util/auxtrace.h | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt index deafd16692b6..a3abe04c779d 100644 --- a/tools/perf/Documentation/itrace.txt +++ b/tools/perf/Documentation/itrace.txt @@ -4,13 +4,14 @@ r synthesize branches events (returns only) x synthesize transactions events w synthesize ptwrite events + p synthesize power events e synthesize error events d create a debug log g synthesize a call chain (use with i or x) l synthesize last branch entries (use with i or x) s skip initial number of events - The default is all events i.e. the same as --itrace=ibxwe + The default is all events i.e. the same as --itrace=ibxwpe In addition, the period (default 100000) for instructions events can be specified in units of: @@ -28,7 +29,7 @@ instructions or transactions events can be specified. It is also possible to skip events generated (instructions, branches, transactions, - ptwrite) at the beginning. This is useful to ignore initialization code. + ptwrite, power) at the beginning. This is useful to ignore initialization code. --itrace=i0nss1000000 diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index baad91ed1e05..651c01dfa5d3 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -948,6 +948,7 @@ void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts) synth_opts->branches = true; synth_opts->transactions = true; synth_opts->ptwrites = true; + synth_opts->pwr_events = true; synth_opts->errors = true; synth_opts->period_type = PERF_ITRACE_DEFAULT_PERIOD_TYPE; synth_opts->period = PERF_ITRACE_DEFAULT_PERIOD; @@ -1034,6 +1035,9 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str, case 'w': synth_opts->ptwrites = true; break; + case 'p': + synth_opts->pwr_events = true; + break; case 'e': synth_opts->errors = true; break; diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index b48afb2f18f3..68e0aa40b24a 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -60,6 +60,7 @@ enum itrace_period_type { * @branches: whether to synthesize 'branches' events * @transactions: whether to synthesize events for transactions * @ptwrites: whether to synthesize events for ptwrites + * @pwr_events: whether to synthesize power events * @errors: whether to synthesize decoder error events * @dont_decode: whether to skip decoding entirely * @log: write a decoding log @@ -81,6 +82,7 @@ struct itrace_synth_opts { bool branches; bool transactions; bool ptwrites; + bool pwr_events; bool errors; bool dont_decode; bool log; -- 1.9.1