Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp412084lqt; Thu, 6 Jun 2024 07:18:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5v55MbMjVtH8F5iY2M9+CRRAOMppy3euXu0zAi/G9vfApfUUDpmp/tR7R6sXTAIULCZs0qld5P4w1YfThpZmBRGALN8o4sH0kyNpOUw== X-Google-Smtp-Source: AGHT+IEh2sIg1UzgY25mnn+lKz0b6vFqy+KP0SgQHCJvz1HTI7p7YTk77oWouTW5sUW1BqpyPj3v X-Received: by 2002:a17:906:2809:b0:a68:e2f5:68b1 with SMTP id a640c23a62f3a-a69a00227a9mr392450866b.49.1717683515432; Thu, 06 Jun 2024 07:18:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717683515; cv=pass; d=google.com; s=arc-20160816; b=tXTj4gj/+wLThIOnCa3x0/t7OMtMWTCCnoEmG1UKP3ZS519nxPFUVnbZEM0GUJEOob ONArItX9yAWeTtDujH97gIDEz5lTsMTVujNGm6nBODcf6WEGbSGmaQHCwnqMLUN82Poi h8QBvclGqRYnvMF34eMNgXzI2T10WY4mq+DeWdCdOez6MEbt1m3paSIV5S17ubwkZ2e/ H1ocBJjVDzpZ3lUew5WUUbXCGDKK+aEC09QjdYMs17JKR7y6j8Kq4zHzHfnu7ho8r0x+ oRwmycqG9GeqdJMU4eJcZKAZeyFOKxfTqXYE1XJU3s+GgiuMMqvyobNUH5lAYLh933m/ LMAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=E5bapExdaJQr4fZ+wcmG6WS/0pCdAgoClDeI9Gcuc74=; fh=QCI+gSKzhlfLGxSChVa4QGP2HqlQfLESpppYpSvrbMA=; b=GMCwMVgmfZ51L3X92tpLT8DwmwrfqA2SlomZ7AYOeLwdnXZWbWAMLEb8Zkosh1R4O1 Xq93vruBRoE5ZuTYNFuWFBXPsU6lgIWx67/2JEFUkWA6Kddxp2LjyJo0g6YNbhNZm1Xz Gox1Kwo7IXSPOfBeq4oktiKzk9DrobdLMZGUrYIyLDg2GNZUu6r55yx1peU8U1rbT7BO 5CdWcK5Cfb/wVjUsuIt83gg1kZTklk7K5BxUHf1B31lT5eHvSeOSQX7MgIg3FIxf8njv kxYxZLZeIgViVTMZO41o3riAqyb27a+IkBIR9it6fk6rgi+n1paQv23TQkIMbeP0VY0t Cu2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T8CTIgRg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204423-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204423-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c8074b926si76527666b.1020.2024.06.06.07.18.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204423-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T8CTIgRg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204423-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204423-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CC01C1F22890 for ; Thu, 6 Jun 2024 14:18:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6342019DF73; Thu, 6 Jun 2024 14:11:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="T8CTIgRg" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8981319DF61; Thu, 6 Jun 2024 14:11:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683101; cv=none; b=a+ryMLTumd1L5pE6wiMrPTi4b80SJdhBYcNi9/hg42eHgY9yrY42NflBZs/uGJV95gRSKRlwOsWapzlQ3YNkyDTvu30xG8ARmGaD9O9yef7HS8Deuzasv2XGKw5Bzj9OuRokDp5nE9lpDeXso6/zDyZvWarI44VHSukh4+QJvIg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683101; c=relaxed/simple; bh=415HSXxW8PVvjc6k6Tqy0srTS1+R/TG4X7z7xilDD7A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZoyQKNjgMwrk1eV3vV2yve6Ci9QzUXEKGWTqgOlV7opSVxxEnN8luvU9oVI7YpASZAMXkI9dCgceTc1o7DW/U7pvupvJYhvnzmPp8NoAQLSh7PHN2HvIeMpZgakUOdejPu42bZvorv5wMnH0o9IpQh2+VTJ37hX2RI8HyEjl1PA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=T8CTIgRg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF8A7C32781; Thu, 6 Jun 2024 14:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717683101; bh=415HSXxW8PVvjc6k6Tqy0srTS1+R/TG4X7z7xilDD7A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T8CTIgRgtpdgUm9LcWuC9QNpdFuHZ9TZLbjaD3LbQuehiIuT+Ra0+Rt0qqkvlGT7q 6g1pgHHRu2SjoY/kV9R5CHI+gfma5i73Cj8oIgby6h/i4ut1sNeHAqBYPvkM7uYc9j x0JnV3eBqpXlyCNrEswgIaYHxcuEqPm09cwHvdcMnrJVjaifWD1BDBI7gwzmx2ZFq/ QI1UIwv5GOnaEt+H8DjH72AnEYhcOMuBhbFwKH+UYPEHIb/413l6V86noaObV+OIwv hn1ld0+/3VkEeZW81pZfLhfrLmFhG9NuHlLIN5oUdgndkVxkt0ldtId3/x29AdCR3P ohRBGZmzWD5sQ== Date: Thu, 6 Jun 2024 11:11:38 -0300 From: Arnaldo Carvalho de Melo To: Ravi Bangoria Cc: Ian Rogers , Ingo Molnar , Namhyung Kim , Peter Zijlstra , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Changbin Du , John Fastabend , Andrii Nakryiko , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Stephane Eranian Subject: Re: [PATCH v1] perf top: Make zeroing histogram on refresh the default Message-ID: References: <20240516222159.3710131-1-irogers@google.com> <86136e0d-45e9-4bf4-826b-359e4993488f@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86136e0d-45e9-4bf4-826b-359e4993488f@amd.com> On Thu, Jun 06, 2024 at 10:15:00AM +0530, Ravi Bangoria wrote: > On 5/17/2024 3:51 AM, Ian Rogers wrote: > > Instead of decaying histograms over time change it so that they are > > zero-ed on each perf top refresh. Previously the option '-z', or > > pressing 'z' in tui mode, would enable this behavior. Decaying samples > > is non-intuitive as it isn't how "top" works. Make zeroing on refresh > > the default and rename the command line options from 'z' to 'Z' and > > 'zero' to 'decay'. > I've also felt `perf top` decay as non-intuitive. Esp. when system becomes > idle after some heavy workload, even decayed samples are far more compared > to samples from currently running processes and thus `perf top` keeps > showing already finished processes at the top, which is kind of confusing. > fwiw: > Acked-by: Ravi Bangoria Thanks for voicing your opinion, that is really helpful. Changing tool behaviour can have unintended consequences even when done with the best intentions and analysis, that is why I'm wary of doing it. The --children case generated complaints when we made it the default, so we ended up with a ~/.perfconfig option to disable it: root@number:~# perf config top.children=false root@number:~# perf top -g Or enable explicitely: root@number:~# perf config top.children=true root@number:~# perf top -g Same thing with the build id cache, where one can disable it using 'perf config', etc. So I'd do this initially with a 'perf config top.refresh=zero' instead of changing something so few people complained as not being intuitive after all those years of having that default. - Arnaldo