Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2244478ybh; Fri, 24 Jul 2020 08:01:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/CJ/ANgYi284A37Y7bwydOjirh+YmMlYZV+DDEYJ/9lKzCGN6xtHsNrIOKt+g/znp9kGI X-Received: by 2002:a17:906:b146:: with SMTP id bt6mr9512874ejb.138.1595602862968; Fri, 24 Jul 2020 08:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595602862; cv=none; d=google.com; s=arc-20160816; b=rH7OnUGP7O3ayGSj0NLu8+0Nr+T1UQ6rKlJ9BbxqyLOdKpv3XnSoVqCnMwmnGvQ1bg 0yHygiWxQ0u1aovwYTfqgFVW68YuQSiCJKyi9WaUzao8RrBxPZVrzimAOqDqmjQo1tp1 /TRcF5SM6NBhWHAFW8aJyDRcoeXPVh9pfnADDRgYvqcxWGJEP00Ys3FIVUBsB7gX8NvP mD3RDxNHPO/eL5n5hIsKUyO3HP4xVL7uNFEKZ8/cPXA0ldFo6VArfYKqzYCcfbZaCbxP +fnfjJt6v+W6KRkBHP6Ea3QyfjLGznJEFROM0REb8a78CWenugWLSrnsc9lzIFs8FHtl D9GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1ItMqL340ouNzbzuW1GpW8ukZAZHgejtfjSWU5ZtegA=; b=nYxaG5sN1NPy66QksN9KDmMAL5BHFNGwjzP045+Wsv4fSBvqymMCZ3/aroo6D3X8tx B544fg3HD2gWVMANoVgrrM1vYEcQCS6Hw+rKolu6AiN1akWKhml61mA7LUHNfOKOQLEz XHwCuqOZ1Ax1VJMJPbzMQFZDxmXMzXLM2k6ZfPQ6v5WvR547MbrSa9TiHrxQhXs+rdhE OTSljvwp1XqwzFsfD8zcq+rp7rEw7tndOg8u3c3dAm52oTR+J3GJ9WeltqVMuihrcK9C EUkEBkm7lJ//Er2vEs0SmQQmmkl094Kg22r8OpXMThvpzxRR0edx0Y1rbrYm0sxxZ/x5 SfYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=uVRmpMr5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u23si617453eds.479.2020.07.24.08.00.40; Fri, 24 Jul 2020 08:01:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=uVRmpMr5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727019AbgGXO7l (ORCPT + 99 others); Fri, 24 Jul 2020 10:59:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726717AbgGXO7l (ORCPT ); Fri, 24 Jul 2020 10:59:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C7D5C0619D3 for ; Fri, 24 Jul 2020 07:59:41 -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=1ItMqL340ouNzbzuW1GpW8ukZAZHgejtfjSWU5ZtegA=; b=uVRmpMr5ycKZkUO6F4QTP/NMTI 3HrE2OI77CTcStV5CVVrS1956k/BQIzdmwF6N/7sw0eSWcxysBjbdE2CIqBLbW1aJ9WYawc3HSPGS HutLQiDFDGccMgUw02T4O4hl3eqRpCa3c3CuMGls51WdLHM8Dsiueb/0No86A6erdJ4igbFz0UQ1H 6u8aJue8kIgWP8E0AFo0EdQkm/tdyKMwPai5If3f0PGlbFt0hmhq4LwFlyetI3lFWl8ac2BU5sWBL KrOHfU0TqCl78XkgCT7PRm+rYBH4cHYE6lP7Yt5+ytDtRH8IZuDjcttx/6OCwmoze164Ap3nwQcub 3fuJvyMg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyzAd-0005vQ-6j; Fri, 24 Jul 2020 14:59:35 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id BA1593060F3; Fri, 24 Jul 2020 16:59:34 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9EC62236F1EB3; Fri, 24 Jul 2020 16:59:34 +0200 (CEST) Date: Fri, 24 Jul 2020 16:59:34 +0200 From: Peter Zijlstra To: Andi Kleen Cc: "Liang, Kan" , acme@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, eranian@google.com, alexander.shishkin@linux.intel.com, like.xu@linux.intel.com Subject: Re: [PATCH V7 07/14] perf/core: Add a new PERF_EV_CAP_COEXIST event capability Message-ID: <20200724145934.GD10769@hirez.programming.kicks-ass.net> References: <20200723171117.9918-1-kan.liang@linux.intel.com> <20200723171117.9918-8-kan.liang@linux.intel.com> <20200724105543.GV119549@hirez.programming.kicks-ass.net> <20200724114628.GJ43129@hirez.programming.kicks-ass.net> <0d33a25c-cfe4-af7f-c915-a98dba17b53b@linux.intel.com> <20200724135412.GA10769@hirez.programming.kicks-ass.net> <20200724143258.GB10769@hirez.programming.kicks-ass.net> <20200724144632.GE1180481@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200724144632.GE1180481@tassilo.jf.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2020 at 07:46:32AM -0700, Andi Kleen wrote: > > Something that seems to 'work' is: > > '{cycles,cpu/instructions,period=50000/}', so maybe you can make the > > group modifier :S use any sampling event if there is one, and otherwise > > designate the leader. > > > > Then you can write things like: > > > > '{slots, metric1, metric2, cpu/cycles,freq=50000/}:S' > > > > and then since cycles is specified as a sampling event, it will use > > that. > > Okay possible, but it makes things more complicated > for the user to understand and requires special documentation. > Hopefully it's worth it the internal simplification. You already require special documentation for this metrics stuff. We already need to state that SLOTS cannot be a sampling event, so you already need to pay attention to this anyway. A shortcut could be a :s event modifier, then you can write: '{slots, metric1, metric2, cycles:s}:S' and have the tool select the :s tagged one.