Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1688625

[PATCH v9 3/7] perf record: Create a new option save_type in --branch-filter

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From Jin Yao <yao.jin@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v9 3/7] perf record: Create a new option save_type in --branch-filter
Date Mon, 17 Jul 2017 05:20:01 +0200
Message-ID <u44JH-7XV-13@gated-at.bofh.it> (permalink)
References <u44A2-7UE-15@gated-at.bofh.it>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.40,372,1496127600"; d="scan'208";a="879550518"
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 49
Organization linux.* mail to news gateway
X-Original-Cc Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, Jin Yao <yao.jin@linux.intel.com>
X-Original-Date Mon, 17 Jul 2017 19:06:39 +0800
X-Original-Message-ID <1500289603-4352-4-git-send-email-yao.jin@linux.intel.com>
X-Original-References <1500289603-4352-1-git-send-email-yao.jin@linux.intel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1688625

Show key headers only | View raw


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

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

Change log
----------
v9: Not changed.

v8: Not changed.

v7: Not changed.

v6: Not changed.

v5: Not changed.

Signed-off-by: Jin Yao <yao.jin@linux.intel.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
 };
 
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v9 0/7] perf report: Show branch type Jin Yao <yao.jin@linux.intel.com> - 2017-07-17 05:10 +0200
  [PATCH v9 6/7] perf report: Show branch type statistics for stdio mode Jin Yao <yao.jin@linux.intel.com> - 2017-07-17 05:20 +0200
  [PATCH v9 5/7] perf util: Create branch.c/.h for common branch functions Jin Yao <yao.jin@linux.intel.com> - 2017-07-17 05:20 +0200
  [PATCH v9 7/7] perf report: Show branch type in callchain entry Jin Yao <yao.jin@linux.intel.com> - 2017-07-17 05:20 +0200
  [PATCH v9 2/7] perf/x86/intel: Record branch type Jin Yao <yao.jin@linux.intel.com> - 2017-07-17 05:20 +0200
    Re: [PATCH v9 2/7] perf/x86/intel: Record branch type Jiri Olsa <jolsa@redhat.com> - 2017-07-17 10:20 +0200
      Re: [PATCH v9 2/7] perf/x86/intel: Record branch type "Jin, Yao" <yao.jin@linux.intel.com> - 2017-07-17 10:30 +0200
        Re: [PATCH v9 2/7] perf/x86/intel: Record branch type Peter Zijlstra <peterz@infradead.org> - 2017-07-18 11:30 +0200
  [PATCH v9 4/7] perf report: Refactor the branch info printing code Jin Yao <yao.jin@linux.intel.com> - 2017-07-17 05:20 +0200
  [PATCH v9 3/7] perf record: Create a new option save_type in --branch-filter Jin Yao <yao.jin@linux.intel.com> - 2017-07-17 05:20 +0200
  [PATCH v9 1/7] perf/core: Define the common branch type classification Jin Yao <yao.jin@linux.intel.com> - 2017-07-17 05:20 +0200
  Re: [PATCH v9 0/7] perf report: Show branch type Jiri Olsa <jolsa@redhat.com> - 2017-07-17 10:20 +0200

csiph-web