From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935669AbdGTJJL (ORCPT ); Thu, 20 Jul 2017 05:09:11 -0400 Received: from terminus.zytor.com ([65.50.211.136]:51833 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935308AbdGTJJF (ORCPT ); Thu, 20 Jul 2017 05:09:05 -0400 Date: Thu, 20 Jul 2017 02:04:30 -0700 From: tip-bot for Jin Yao Message-ID: 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 Reply-To: linux-kernel@vger.kernel.org, mpe@ellerman.id.au, alexander.shishkin@linux.intel.com, acme@redhat.com, kan.liang@intel.com, peterz@infradead.org, hpa@zytor.com, yao.jin@linux.intel.com, jolsa@kernel.org, mingo@kernel.org, tglx@linutronix.de, ak@linux.intel.com In-Reply-To: <1500379995-6449-4-git-send-email-yao.jin@linux.intel.com> References: <1500379995-6449-4-git-send-email-yao.jin@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf record: Create a new option save_type in --branch-filter Git-Commit-ID: 60f83fa6341dab4aec01cee354ea902771473adb 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: 60f83fa6341dab4aec01cee354ea902771473adb Gitweb: http://git.kernel.org/tip/60f83fa6341dab4aec01cee354ea902771473adb Author: Jin Yao AuthorDate: Tue, 18 Jul 2017 20:13:11 +0800 Committer: Arnaldo Carvalho de Melo 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 Signed-off-by: Yao Jin Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Michael Ellerman Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1500379995-6449-4-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo --- 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 };