From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755508AbdGKMGz (ORCPT ); Tue, 11 Jul 2017 08:06:55 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:57297 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754061AbdGKMGx (ORCPT ); Tue, 11 Jul 2017 08:06:53 -0400 Date: Tue, 11 Jul 2017 14:06:47 +0200 From: Peter Zijlstra To: Jin Yao 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 Subject: Re: [PATCH v7 1/7] perf/core: Define the common branch type classification Message-ID: <20170711120647.mmds5wd3if7u7d7j@hirez.programming.kicks-ass.net> References: <1499785263-17383-1-git-send-email-yao.jin@linux.intel.com> <1499785263-17383-2-git-send-email-yao.jin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1499785263-17383-2-git-send-email-yao.jin@linux.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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: > @@ -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; > };