Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3881266rwe; Mon, 17 Apr 2023 05:07:15 -0700 (PDT) X-Google-Smtp-Source: AKy350bqHv1KyLDgqgVz4jY/QfKZM8qIw7n5yvdYObkUfx1XYDtQ/F7eNTNDb4cAb37IYNC9WsJ5 X-Received: by 2002:a05:6a20:6a0d:b0:f0:2893:8a3d with SMTP id p13-20020a056a206a0d00b000f028938a3dmr1810894pzk.45.1681733234714; Mon, 17 Apr 2023 05:07:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681733234; cv=none; d=google.com; s=arc-20160816; b=uOAwjqP7MPyYEjfu54ifxulfJcjwNeyz6A5xlD/bo3QKk8xL5YKpULEeYAJShi7Kj2 n7IVhe7SXfW1ItHOK74bPHcI4ORQEQ9Hlxn00bJtB2LDsCEjFYtdSLpyjKlobHNbNYfN z1xHpPI18msW5Ia0KskOEVPSsmnG57EDhHywdQT38WSkbOBxlU4XEM5dM97avaNZPX+6 Vc+kl9WLynALKMQ8WSqgHRUOSyFJZxj6SGZh/o9CG7eSieWFvka3H1uxmM3q9JI7WmyV f3nSRdee5tGMGouLYUC2X9oZe1M+IETWrHZfZcCuo+lazB7MljrlAJI96zz+QpDOAZ4g 3o2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gP0S443LaMj7TRidv8xgYhysgY7/1wengzxzodpEXA0=; b=hxqw+fj42C4F4lL0m0ox13hMoOn2FetU9HjHlF7Lr/H6B0N0L2zi9w0chQWMlu/AfX 6f9sKlZv61BsGEmGuc5fahQ2tqPHfX3DdWWSspK/RDRNVTAt9oShh3YtFwI3eLWEpLIT sMVI66D0qu1rWXF2OfLX/6RtH7TJtHMnr+BNCdytQmdVd7LxGnbq4EuGoaSN2QuiT7hV 3aACDJxSVg2JI4hZF1pVljzmoIumiML3knnYxKmq/1xu3imYlK0OETT0P6QasGYPl41M 1r5XqQ+ssbHnoCJcqwFsoxr2od2gzzsQ4CT+ayqQsrbbt0qrYoAWq+wr2foaWckEhOiJ 7apQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qziPfpA3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a631446000000b0051b32aa2535si11672684pgu.389.2023.04.17.05.07.02; Mon, 17 Apr 2023 05:07:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qziPfpA3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230302AbjDQL4r (ORCPT + 99 others); Mon, 17 Apr 2023 07:56:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjDQL4p (ORCPT ); Mon, 17 Apr 2023 07:56:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A2AB8682 for ; Mon, 17 Apr 2023 04:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=gP0S443LaMj7TRidv8xgYhysgY7/1wengzxzodpEXA0=; b=qziPfpA3Y9O59o/xz1qK81ipUU UThDRsiwDtXtjDOtLekqDzS6d0g6a3UnfvH2hhGP560b93jDPqUoCyID5T9I0QOENuUKpH28gj+mr v2eVQu6EHRRIocYZFgpIXroereG6+nt7/iZCHbfrJ1ymxxeWOJjD6j3iq1q8IX7IZSZkVgdEhnQ96 a5UwkOCMFo4ejSGNWGc0MeWY6Aqu3K3TprN5jV+/+/pPBeJ31ynSSDjJiBWfY+BeqiuGGlj3X8tXN F/kczLzrHgqvhTT4DfMSfy4yyYwvYHIlv28ahIUzYNUJPjxVcQjP13vRt4inagAyMj4vs+9qNMDhB sZbw9s6Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1poNS1-00BJML-2J; Mon, 17 Apr 2023 11:55:17 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 85EDF3002A3; Mon, 17 Apr 2023 13:55:16 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 68C9324248708; Mon, 17 Apr 2023 13:55:16 +0200 (CEST) Date: Mon, 17 Apr 2023 13:55:16 +0200 From: Peter Zijlstra To: Andi Kleen Cc: "Liang, Kan" , mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com, adrian.hunter@intel.com, eranian@google.com Subject: Re: [PATCH 2/6] perf: Support branch events logging Message-ID: <20230417115516.GM83892@hirez.programming.kicks-ass.net> References: <20230414103832.GD83892@hirez.programming.kicks-ass.net> <1d62b865-5d31-ec36-99e0-785844f79199@linux.intel.com> <20230414145324.GB761523@hirez.programming.kicks-ass.net> <803927bb-6f74-5c09-3c18-2fd5f423287b@linux.intel.com> <20230414160945.GC761523@hirez.programming.kicks-ass.net> <085fa11e-ea07-c148-1b32-8a09007ee12b@linux.intel.com> <20230414192407.GA778423@hirez.programming.kicks-ass.net> <2428e6a2-9578-1e1d-bdef-ffcc87301503@linux.intel.com> <20230414220106.GC778423@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 14, 2023 at 03:47:29PM -0700, Andi Kleen wrote: > > You really *must* make then a group such that perf knows what events to > > associated with the LBR event and constain them to the 0-3 range of > > PMCs. > > > > If you want multiplexing, simply create multiple groups with an LBR > > event in them. > > > Well if you force groups then you require user space or a user which > understands all the constraints The LBR feature is naturally a group read, very similar to PERF_SAMPLE_READ+PERF_FORMAT_GROUP. > to create groups. I thought one of the basic ideas of perf was to be able to > abstract those things. Yeah, the abstraction at hand is a group.