From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D164AC43461 for ; Mon, 14 Sep 2020 22:34:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9156421D7D for ; Mon, 14 Sep 2020 22:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600122870; bh=VUhtghnsr7sxEh6kYrc2+nG7h0VCsXrYJzf4W/n23ms=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=TZLs3TrNPf+S9vena6ve9Ws6ilMaZOHnSbO0ScsDmFL2UyVBNDjhLvoMoLcvTGLGA /QD65c8gZ3HZ0dejS+TOCcU3co/It9NxMAyQVj+dAEKDH8r5+Pdx8nVvIdWN7F/nKf VI1KuMdrmDIm9sovVlkOJOLTJVIhXqvx+XNKaXto= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726122AbgINWe2 (ORCPT ); Mon, 14 Sep 2020 18:34:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:51822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbgINWeU (ORCPT ); Mon, 14 Sep 2020 18:34:20 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E027C208DB; Mon, 14 Sep 2020 22:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600122860; bh=VUhtghnsr7sxEh6kYrc2+nG7h0VCsXrYJzf4W/n23ms=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kkXsHGPubvAizafHEa7CYeF3kjykbcLNySMjzlvTp2vGQFZ3c3CYwkZD518XTEhJf Wx89Jt1JZEFS3cL4NuNGxL01+pQe/eW9dmZVIDnrDjTAO+tq0v9p/Chl/0P53cV54T np9QcdzxPGCGHpzYyjr8IIaDsXHAD9CnHzcS0Xps= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id E158140D3D; Mon, 14 Sep 2020 19:34:17 -0300 (-03) Date: Mon, 14 Sep 2020 19:34:17 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Adrian Hunter , Andi Kleen , Athira Rajeev , LKML , Networking , bpf , Stephane Eranian Subject: Re: [PATCH v3 3/4] perf record: Don't clear event's period if set by a term Message-ID: <20200914223417.GI166601@kernel.org> References: <20200912025655.1337192-1-irogers@google.com> <20200912025655.1337192-4-irogers@google.com> <20200914214655.GE166601@kernel.org> <20200914215106.GF166601@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Sep 14, 2020 at 02:52:57PM -0700, Ian Rogers escreveu: > On Mon, Sep 14, 2020 at 2:51 PM Arnaldo Carvalho de Melo > wrote: > > > > Em Mon, Sep 14, 2020 at 06:46:55PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Fri, Sep 11, 2020 at 07:56:54PM -0700, Ian Rogers escreveu: > > > > If events in a group explicitly set a frequency or period with leader > > > > sampling, don't disable the samples on those events. > > > > > > > > Prior to 5.8: > > > > perf record -e '{cycles/period=12345000/,instructions/period=6789000/}:S' > > > > would clear the attributes then apply the config terms. In commit > > > > 5f34278867b7 leader sampling configuration was moved to after applying the > > > > config terms, in the example, making the instructions' event have its period > > > > cleared. > > > > This change makes it so that sampling is only disabled if configuration > > > > terms aren't present. > > > > > > Adrian, Jiri, can you please take a look a this and provide Reviewed-by > > > or Acked-by tags? > > > > Without this patch we have: > > > > # perf record -e '{cycles/period=1/,instructions/period=2/}:S' sleep 1 > > [ perf record: Woken up 1 times to write data ] > > [ perf record: Captured and wrote 0.051 MB perf.data (6 samples) ] > > # > > # perf evlist -v > > cycles/period=1/: size: 120, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, disabled: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 > > instructions/period=2/: size: 120, config: 0x1, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, sample_id_all: 1, exclude_guest: 1 > > # > > > > So indeed the period=2 is being cleared for the second event in that > > group. > > > > - Arnaldo > > Thanks Arnaldo and Adrian! Adrian's acked-by is here: > https://lore.kernel.org/lkml/77df85d3-a50c-d6aa-1d60-4fc9ea90dc44@intel.com/ > Let me know if anything is missing. Thanks, applied. - Arnaldo