From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755632AbdGKM3b (ORCPT ); Tue, 11 Jul 2017 08:29:31 -0400 Received: from mga04.intel.com ([192.55.52.120]:6852 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755575AbdGKM3a (ORCPT ); Tue, 11 Jul 2017 08:29:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,346,1496127600"; d="scan'208";a="1171105450" Subject: Re: [PATCH v7 1/7] perf/core: Define the common branch type classification To: Peter Zijlstra Cc: acme@kernel.org, jolsa@kernel.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, mpe@ellerman.id.au, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com References: <1499785263-17383-1-git-send-email-yao.jin@linux.intel.com> <1499785263-17383-2-git-send-email-yao.jin@linux.intel.com> <20170711120647.mmds5wd3if7u7d7j@hirez.programming.kicks-ass.net> From: "Jin, Yao" Message-ID: <63ad127b-4a61-bf56-500f-98bca633998b@linux.intel.com> Date: Tue, 11 Jul 2017 20:29:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170711120647.mmds5wd3if7u7d7j@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/11/2017 8:06 PM, Peter Zijlstra wrote: > On Tue, Jul 11, 2017 at 11:00:57PM +0800, Jin Yao wrote: >> PERF_BR_NONE : unknown > I would suggest PERF_BR_UNKNOWN or PERF_BR_MISC, since PERF_BR_NONE > reads like it wasn't a branch at all. OK, I will change it to PERF_BR_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 (reserve 5 for future branch types) > What's up with that 5 ? I can't see anything like that in the patch > itself: Sorry, I don't say this clearly. We has defined 11 branch types (from PERF_BR_UNKNOWN to PERF_BR_COND_RET), so we can define 5 new types in future. Thanks Jin Yao >> @@ -1024,7 +1048,8 @@ struct perf_branch_entry { >> in_tx:1, /* in transaction */ >> abort:1, /* transaction abort */ >> cycles:16, /* cycle count to last branch */ >> - reserved:44; >> + type:4, /* branch type */ >> + reserved:40; >> }; >