linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Jin Yao <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: yao.jin@linux.intel.com, jolsa@kernel.org, mingo@kernel.org,
	tglx@linutronix.de, ak@linux.intel.com,
	alexander.shishkin@linux.intel.com, acme@redhat.com,
	linux-kernel@vger.kernel.org, mpe@ellerman.id.au, hpa@zytor.com,
	peterz@infradead.org, kan.liang@intel.com
Subject: [tip:perf/core] perf record: Create a new option save_type in --branch-filter
Date: Thu, 20 Jul 2017 02:04:30 -0700	[thread overview]
Message-ID: <tip-60f83fa6341dab4aec01cee354ea902771473adb@git.kernel.org> (raw)
In-Reply-To: <1500379995-6449-4-git-send-email-yao.jin@linux.intel.com>

Commit-ID:  60f83fa6341dab4aec01cee354ea902771473adb
Gitweb:     http://git.kernel.org/tip/60f83fa6341dab4aec01cee354ea902771473adb
Author:     Jin Yao <yao.jin@linux.intel.com>
AuthorDate: Tue, 18 Jul 2017 20:13:11 +0800
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 18 Jul 2017 23:14:39 -0300

perf record: Create a new option save_type in --branch-filter

The option indicates the kernel to save branch type during sampling.

One example:

  perf record -g --branch-filter any,save_type <command>

Signed-off-by: Yao Jin <yao.jin@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1500379995-6449-4-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-record.txt | 1 +
 tools/perf/util/parse-branch-options.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index b0e9e92..9bdea04 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -332,6 +332,7 @@ following filters are defined:
 	- no_tx: only when the target is not in a hardware transaction
 	- abort_tx: only when the target is a hardware transaction abort
 	- cond: conditional branches
+	- save_type: save branch type during sampling in case binary is not available later
 
 +
 The option requires at least one branch type among any, any_call, any_ret, ind_call, cond.
diff --git a/tools/perf/util/parse-branch-options.c b/tools/perf/util/parse-branch-options.c
index 38fd115..e71fb5f 100644
--- a/tools/perf/util/parse-branch-options.c
+++ b/tools/perf/util/parse-branch-options.c
@@ -28,6 +28,7 @@ static const struct branch_mode branch_modes[] = {
 	BRANCH_OPT("cond", PERF_SAMPLE_BRANCH_COND),
 	BRANCH_OPT("ind_jmp", PERF_SAMPLE_BRANCH_IND_JUMP),
 	BRANCH_OPT("call", PERF_SAMPLE_BRANCH_CALL),
+	BRANCH_OPT("save_type", PERF_SAMPLE_BRANCH_TYPE_SAVE),
 	BRANCH_END
 };
 

  reply	other threads:[~2017-07-20  9:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 12:13 [PATCH v10 0/7] perf report: Show branch type Jin Yao
2017-07-18 12:13 ` [PATCH v10 1/7] perf/core: Define the common branch type classification Jin Yao
2017-07-18  9:31   ` Michael Ellerman
2017-07-18 15:54     ` Arnaldo Carvalho de Melo
2017-07-20  9:03   ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 2/7] perf/x86/intel: Record branch type Jin Yao
2017-07-20  9:04   ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 3/7] perf record: Create a new option save_type in --branch-filter Jin Yao
2017-07-20  9:04   ` tip-bot for Jin Yao [this message]
2017-07-18 12:13 ` [PATCH v10 4/7] perf report: Refactor the branch info printing code Jin Yao
2017-07-20  9:04   ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 5/7] perf util: Create branch.c/.h for common branch functions Jin Yao
2017-07-20  9:05   ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 6/7] perf report: Show branch type statistics for stdio mode Jin Yao
2017-07-20  9:05   ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 7/7] perf report: Show branch type in callchain entry Jin Yao
2017-07-20  9:05   ` [tip:perf/core] " tip-bot for Jin Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-60f83fa6341dab4aec01cee354ea902771473adb@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=yao.jin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).