Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1047193ybc; Tue, 19 Nov 2019 13:35:36 -0800 (PST) X-Google-Smtp-Source: APXvYqzjb6mhNxKwqrDbKCQk0GdgKPLrUN5qSOsBL977KUio2VyqoYOgOQTn0EA8qbfTMtBUDbrE X-Received: by 2002:a17:907:216e:: with SMTP id rl14mr37831941ejb.291.1574199336805; Tue, 19 Nov 2019 13:35:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574199336; cv=none; d=google.com; s=arc-20160816; b=O21QxaHbhyrEVp9KYfLD5bCmdDqqI7/LvAnij9Bt9SqxL2W46+BMlSk8arTVjnCfOJ tf6B3C9SfyUBzotdK0UDidlWwR22TBWPZK0d0AD+oiFtQE2qO8z6lo2jf7ab8PSA8mq3 c7FX/SlCusl9XVfNZySBWiYpKEgYnHCUBf4uHGuK8/iV3mlbPWDZvMBarALholnAIPJF Upar2KKZGr6nJ6M2P9Nut2fcYwuyQgZtbhYpQUZw1CsdL1dOCw8Otvh/esR00PrbItkw QiwdLCV7nXDNOtw1/XvHvpJ4ED3REMyTz1JpUjivqNyIVZimybQFexekGb/SVtlXV+wG JKdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=M+CtvlYCWyzkzDNwvhpt28kYAZgspus7o8NYVGe1+LQ=; b=Td+Gl2YqcFD1naqcmHwVm0B8/YsSgeC4jTOusRjgx4wpYSUL+kf+wOukF83LgWZVt8 hBziWo0XLpSPjTw409JY3zFicFkOsRvrWDMTFJQJh0CLUx0TADRHvTwNNajQvUOpIWKm Ny68zuLc5l3bJ6z0nNTt1UC2JYPqShZimfObmyrXAWlsc85Y0Trx2cwobJu/QaflNNTs RQ22tj34qfoy9JcpJOxA5rfSS9ra0iRFtiSEi40Xa53TMSi1cIo+h7KJ9OHtu0spGMXi UwhZSLrUjx1L1IuyB4FCokPux2agFhxg1uFGxJdriY7liMaep+hrRmOJJ1UEFBP5fnU7 Eo9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="JE/sD7xS"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x70si17698115ede.257.2019.11.19.13.35.05; Tue, 19 Nov 2019 13:35:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="JE/sD7xS"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727212AbfKSVbe (ORCPT + 99 others); Tue, 19 Nov 2019 16:31:34 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:52950 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727082AbfKSVbe (ORCPT ); Tue, 19 Nov 2019 16:31:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=M+CtvlYCWyzkzDNwvhpt28kYAZgspus7o8NYVGe1+LQ=; b=JE/sD7xSL5fxRRAOZmQGXGLSX JA/wmenFRZA9tppgdzydyDDXfx2Wl9H+hynaHyQfXlSzEc9ZLEO7wDtFgasD8u4HkEgo5J1Jju+98 e1MdJxibueUMT1VX90nd6tDeFBWsXwvb0z0plkfrA3LZc8SVqPnw4EDLdiNDJXEXBUD7Iu85ZLB5u LH/eGB34EtD2uKjYlHykqAtOZdWtLz/q2Eq+T1oYqgmhm8qI6TrmTMMW0Kjpm91ogzT7MukKnBbCk 8BqX/v7l61lhTalHwMDHacAjVgg3d7LRNgV8WLjej392JYsGcGnPFgqCyTz+x8ufCxLHKQDeu5d32 s278NqYWw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXB5r-0005Vi-Bo; Tue, 19 Nov 2019 21:31:27 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 5F7D7980E2F; Tue, 19 Nov 2019 22:31:24 +0100 (CET) Date: Tue, 19 Nov 2019 22:31:24 +0100 From: Peter Zijlstra To: Stephane Eranian Cc: "Liang, Kan" , Arnaldo Carvalho de Melo , Ingo Molnar , LKML , Jiri Olsa , Namhyung Kim , vitaly.slobodskoy@intel.com, pavel.gerasimov@intel.com, Andi Kleen , Michael Ellerman Subject: Re: [PATCH V4 03/13] perf tools: Support new branch sample type for LBR TOS Message-ID: <20191119213124.GO3079@worktop.programming.kicks-ass.net> References: <20191119143411.3482-1-kan.liang@linux.intel.com> <20191119143411.3482-4-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 19, 2019 at 11:00:00AM -0800, Stephane Eranian wrote: > On Tue, Nov 19, 2019 at 6:35 AM wrote: > > diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h > > index bb7b271397a6..c2da61c9ace7 100644 > > --- a/tools/include/uapi/linux/perf_event.h > > +++ b/tools/include/uapi/linux/perf_event.h > > @@ -180,7 +180,10 @@ enum perf_branch_sample_type_shift { > > > > PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 16, /* save branch type */ > > > > - PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ > > + PERF_SAMPLE_BRANCH_MAX_SHIFT = 17, /* non-ABI */ > > + > > + /* PMU specific */ > > No! You must abstract this. > > > + PERF_SAMPLE_BRANCH_LBR_TOS_SHIFT = 63, /* save LBR TOS */ > > }; > > > I don't like this because this is too Intel specific. > What is the meaning of this field? You need a clear definition so it can be used > with other PERF_SAMPLE_BRANCH_* implementations. I also detest the MSB usage. Normal pattern is that any bit >= MAX will be rejected by the kernel.