From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752525AbdGAIwX (ORCPT ); Sat, 1 Jul 2017 04:52:23 -0400 Received: from terminus.zytor.com ([65.50.211.136]:57057 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796AbdGAIwV (ORCPT ); Sat, 1 Jul 2017 04:52:21 -0400 Date: Sat, 1 Jul 2017 01:51:08 -0700 From: tip-bot for Adrian Hunter Message-ID: Cc: acme@redhat.com, ak@linux.intel.com, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, adrian.hunter@intel.com, linux-kernel@vger.kernel.org Reply-To: tglx@linutronix.de, acme@redhat.com, hpa@zytor.com, ak@linux.intel.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: <1495786658-18063-24-git-send-email-adrian.hunter@intel.com> References: <1495786658-18063-24-git-send-email-adrian.hunter@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf auxtrace: Add itrace option to output ptwrite events Git-Commit-ID: 3bdafdffa9baf2b34aebad1c98bc17b50202cb78 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: 3bdafdffa9baf2b34aebad1c98bc17b50202cb78 Gitweb: http://git.kernel.org/tip/3bdafdffa9baf2b34aebad1c98bc17b50202cb78 Author: Adrian Hunter AuthorDate: Fri, 26 May 2017 11:17:24 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 27 Jun 2017 12:09:20 -0300 perf auxtrace: Add itrace option to output ptwrite events Add itrace option to output ptwrite events. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-24-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/itrace.txt | 7 ++++--- tools/perf/util/auxtrace.c | 4 ++++ tools/perf/util/auxtrace.h | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt index e2a4c5e..deafd16 100644 --- a/tools/perf/Documentation/itrace.txt +++ b/tools/perf/Documentation/itrace.txt @@ -3,13 +3,14 @@ c synthesize branches events (calls only) r synthesize branches events (returns only) x synthesize transactions events + w synthesize ptwrite 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=ibxe + The default is all events i.e. the same as --itrace=ibxwe In addition, the period (default 100000) for instructions events can be specified in units of: @@ -26,8 +27,8 @@ Also the number of last branch entries (default 64, max. 1024) for instructions or transactions events can be specified. - It is also possible to skip events generated (instructions, branches, transactions) - at the beginning. This is useful to ignore initialization code. + It is also possible to skip events generated (instructions, branches, transactions, + ptwrite) 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 0daf63b..baad91e 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -947,6 +947,7 @@ void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts) synth_opts->instructions = true; synth_opts->branches = true; synth_opts->transactions = true; + synth_opts->ptwrites = true; synth_opts->errors = true; synth_opts->period_type = PERF_ITRACE_DEFAULT_PERIOD_TYPE; synth_opts->period = PERF_ITRACE_DEFAULT_PERIOD; @@ -1030,6 +1031,9 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str, case 'x': synth_opts->transactions = true; break; + case 'w': + synth_opts->ptwrites = true; + break; case 'e': synth_opts->errors = true; break; diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 9f0de72..b48afb2 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -59,6 +59,7 @@ enum itrace_period_type { * @instructions: whether to synthesize 'instructions' events * @branches: whether to synthesize 'branches' events * @transactions: whether to synthesize events for transactions + * @ptwrites: whether to synthesize events for ptwrites * @errors: whether to synthesize decoder error events * @dont_decode: whether to skip decoding entirely * @log: write a decoding log @@ -79,6 +80,7 @@ struct itrace_synth_opts { bool instructions; bool branches; bool transactions; + bool ptwrites; bool errors; bool dont_decode; bool log;