From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751439AbdGRPyW (ORCPT ); Tue, 18 Jul 2017 11:54:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:38704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353AbdGRPyV (ORCPT ); Tue, 18 Jul 2017 11:54:21 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 444B322BCC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Tue, 18 Jul 2017 12:54:18 -0300 From: Arnaldo Carvalho de Melo To: Michael Ellerman Cc: Jin Yao , jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com Subject: Re: [PATCH v10 1/7] perf/core: Define the common branch type classification Message-ID: <20170718155418.GA20962@kernel.org> References: <1500379995-6449-1-git-send-email-yao.jin@linux.intel.com> <1500379995-6449-2-git-send-email-yao.jin@linux.intel.com> <871spejdl2.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <871spejdl2.fsf@concordia.ellerman.id.au> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Jul 18, 2017 at 07:31:37PM +1000, Michael Ellerman escreveu: > Jin Yao writes: > > > It is often useful to know the branch types while analyzing branch > > data. For example, a call is very different from a conditional branch. > > > > Currently we have to look it up in binary while the binary may later > > not be available and even the binary is available but user has to take > > some time. It is very useful for user to check it directly in perf > > report. > > > > Perf already has support for disassembling the branch instruction > > to get the x86 branch type. > > > > To keep consistent on kernel and userspace and make the classification > > more common, the patch adds the common branch type classification > > in perf_event.h. > > > > The patch only defines a minimum but most common set of branch types. > > > > PERF_BR_UNKNOWN : unknown > > PERF_BR_COND :conditional > > PERF_BR_UNCOND : unconditional > > PERF_BR_IND : indirect > > PERF_BR_CALL : function call > > PERF_BR_IND_CALL : indirect function call > > PERF_BR_RET : function return > > PERF_BR_SYSCALL : syscall > > PERF_BR_SYSRET : syscall return > > PERF_BR_COND_CALL : conditional function call > > PERF_BR_COND_RET : conditional function return > > > > The patch also adds a new field type (4 bits) in perf_branch_entry > > to record the branch type. > > > > Since the disassembling of branch instruction needs some overhead, > > a new PERF_SAMPLE_BRANCH_TYPE_SAVE is introduced to indicate if it > > needs to disassemble the branch instruction and record the branch > > type. > > > > Change log > > ---------- > > v10: Not changed. > > > > v9: Not changed. > > > > v8: Change PERF_BR_NONE to PERF_BR_UNKNOWN. > > No other change. > > I acked v8, so you could have retained my ack. Here it is again: > > Acked-by: Michael Ellerman (powerpc) Ok, collecting acks from you, Jiri and PeterZ, will try to get this upstreamed soon. - Arnaldo