Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2328682ybh; Fri, 24 Jul 2020 10:01:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye6PTHaMl9ibKJW+jEBEh5kSHK67dAO1QZsAlPm0BT4LErT5AYW52Y+q/MDS9TS4GbyAV3 X-Received: by 2002:aa7:d78b:: with SMTP id s11mr10192625edq.319.1595610063119; Fri, 24 Jul 2020 10:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595610063; cv=none; d=google.com; s=arc-20160816; b=Otele6AfKppj8SukjQm2k2LP0cIDOkHuzi0SuHj5OSA2ygAPmcMfuBQzB1lyrRTYXu A/oJaXdYOMZinV9ZWtg0MdIvoMXhENjCVe5SNsJ+ZW35Ux/CLq7XTECbYmubU6ULOgxI u5dce97ccTL7CojcZ8c7a1z4jdrN+1tqiJwriYUd9onaLQ/fiyEWYcjGkxei1Pb29aVI MZae81Umm04PtgxoVrnKNjH+0C0U4pQNjFbzBLalPmLXqwcRI9JpiysjCFja4QrbMeHs yoV7uer1Q0STHCmFBzwPxWmtHFGNSuLa/wpLbfIQFNd4G/8XhkWoz/FIZIsqsDs9bPRJ jrSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=77GuFRvJBcWpknHjo9KHkL5dRQwXi3Q7sDuHb/M4xcg=; b=QSINQ8uKP1g33aw6yrZvM02AizjKcvwUEOP6785xbO2cEsByHR1AnObQEccs6f/9FZ Ij2Sf7pBQTzxa5I2c/9tW33onDk3iNTeipO7CX+IUEFjM983Pi7mOxxEZStXS7geLgID MfO6lh2Xdzcyi4SCwe4vMWk2fxyvDWJU+9hPaKeInUFxk55oUMWo3nb27wZufyZgaasw QMI/Xdux7OOXqDxPswvI/HgEfMQ8o9gYCJf0cCFAXRF6l+DNKhjqnuKXJLcVUQDjO7Me pXeRi49O4SQGEpYBlDney2FhXDW7ZQQkCBTtwTShtIiKv5Y6KaHemW8cAJv2nPXDcScZ e1ug== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dh22si873038edb.38.2020.07.24.10.00.39; Fri, 24 Jul 2020 10:01:03 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbgGXRAc (ORCPT + 99 others); Fri, 24 Jul 2020 13:00:32 -0400 Received: from mga18.intel.com ([134.134.136.126]:12416 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbgGXRAc (ORCPT ); Fri, 24 Jul 2020 13:00:32 -0400 IronPort-SDR: J+Im2xHnxTdEIj5ktuhQdb9xbQQXesExXlVsPAd+KbSROub+pWwTTEFmpWIZEbC+si2FodhUzV nCGzrFfXS9cA== X-IronPort-AV: E=McAfee;i="6000,8403,9692"; a="138245666" X-IronPort-AV: E=Sophos;i="5.75,391,1589266800"; d="scan'208";a="138245666" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2020 10:00:31 -0700 IronPort-SDR: G6zJ9jlbWHEOMhv6Hj4P4IuC68udFVXIBCA/yuNM45GHvKH2Gyu0xJVeyhsY/k9PcKukfG/xjF HqLYGEcsaIow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,391,1589266800"; d="scan'208";a="284985355" Received: from linux.intel.com ([10.54.29.200]) by orsmga003.jf.intel.com with ESMTP; 24 Jul 2020 10:00:30 -0700 Received: from [10.252.140.222] (kliang2-mobl.ccr.corp.intel.com [10.252.140.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 0AA4A580297; Fri, 24 Jul 2020 10:00:29 -0700 (PDT) Subject: Re: [PATCH V7 07/14] perf/core: Add a new PERF_EV_CAP_COEXIST event capability To: peterz@infradead.org, Andi Kleen Cc: 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 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> <20200724145934.GD10769@hirez.programming.kicks-ass.net> <20200724164356.GL43129@hirez.programming.kicks-ass.net> From: "Liang, Kan" Message-ID: Date: Fri, 24 Jul 2020 13:00:28 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200724164356.GL43129@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/24/2020 12:43 PM, peterz@infradead.org wrote: > On Fri, Jul 24, 2020 at 04:59:34PM +0200, Peter Zijlstra wrote: >> 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. It looks like PT encountered a similar issue as us. They use the 2nd event of the group as the "leader". I think we can simply extend the function to check the slots event in perf tool. https://lore.kernel.org/lkml/20200401101613.6201-17-adrian.hunter@intel.com/ > > Having slots as leader also would allow doing something like > FORMAT_METRIC, where we return sibling/leader in some fashion. > > That also makes sense for instructions, because, IIRC, > instructions/slots is the better IPC. > > And we should probably consider FORMAT_RESET. What's FORMAT_RESET for? Thanks, Kan