Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1221402lqt; Fri, 7 Jun 2024 11:19:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWls65Y3JghM18i2xeCE3oxqpdKNpsMrIyTFmNbNK9+u4+2cWiNquJ7GvCXwXVCHE5WrmP03XgXr2YmzOQWpDlXoDdyc5wwkwcusXOToQ== X-Google-Smtp-Source: AGHT+IGmBUo0gZ8rJQoRaLLdsNunyc5cBZrnpHk3sMRjwBLMQhjklRvzbYf2GcfHPCNaLkwYcf9D X-Received: by 2002:a05:6e02:1448:b0:374:9cdc:7a3a with SMTP id e9e14a558f8ab-37580313099mr39802445ab.11.1717784347164; Fri, 07 Jun 2024 11:19:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717784347; cv=pass; d=google.com; s=arc-20160816; b=Wp+/6gRIeTN+Ia6yuzad3B2kBuuVIP3igsJnvqqn6710ZNwPDUjcuCawwiAJFQVKpu JUBtwmTn0TeGrUy/3nz2rvfc9nTHj1zokoPWCnXKDN+KwssppmfgDG8rGG3QdP5RdKOx qYzcpZ8I+igZv2eP/5kOnGglV5vd+9lyD5Tp9wGQAVoPdwK94+8ukcUksGP+fnB5tkql nm1VOcZowPLh/A20cFDCiEXXWCaFhbtGhCj7bBAP07HuZyJDyNc9xa76UheS27Lz80PI 6rxVR5g71yWyxhLa1q7VOSRQ+7miXuP/BeyJparosrnogXXR5UczjBIkvQW7eUlwG7+U RDHg== 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=y/BW437DXwDCPR2SJk1Kq1T3rSRxIIOHtj2Qllr6E9o=; fh=hNSi6b/PxxLNc1s8XIv8rHIc7IZ4WlEKWunlv4OEiFw=; b=HEOqi4J8srUe2d7X3LetcY/Jdsw1oGVJo9R09MrpztrhVFc02ThZKX2pWNc6iqYARu gRDHiqQ3hsgFTwwaorpEEzAiQ/QIWMcgtqadxDbeWpQthO7AM/osLKoV6WxSk+JV5K/r fsEQYTQHfIBrQIWYbKI3jXocnRu1bj3w+ohUymMuiRaC5SvROYyBg8YFbTF1HyiWQpRX MLrLhuSuEBeqnFaM2DOnxsyIhAuU6O7cMq9pbdikHWnNfkvHMidCCO57DEN+teYiAXi0 abH0JSYGl3iKhGUiKL0iMuQCf21F7Yk0KtmpDlFnPsqvS/rPTzbpY4eKCMB2t0Gbem2j p2cw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MWCPrez7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206595-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e4899775b3si39505a12.836.2024.06.07.11.19.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 11:19:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206595-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MWCPrez7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206595-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206595-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C5AB328604F for ; Fri, 7 Jun 2024 18:19:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C21B13C3F9; Fri, 7 Jun 2024 18:19:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MWCPrez7" 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 AFB061DFEB; Fri, 7 Jun 2024 18:18:59 +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=1717784339; cv=none; b=iBuDjpmMilQfYfd/deBIVi4spjWVbxrOf+37LGEzR2hZ8kYg4Y62n0O9XJAQxebUGMzcWqo2QNEKqvMYxrak6rFCO9Mv9G8T7lZEEkRtzAJ+e04HetT7Ftug0tMZs5KUGLRoH37Ym5Q56Fbvkmr2xEgl8sPa+21oLSD4JtheKtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717784339; c=relaxed/simple; bh=7JYVFmwVoYI/lP50oTlJEVeX/T08uLhbxMC9TIDM7nE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cQe2wvTZJTW1MeUAaGc/xweIuJ7YPP8xIy4PWT5X7qwrCRCA3tJBjfjqV1nILqSrvUKJdVrrVVJJTXHRNts/JT5gDbPuCaEIKXe/cviRSJHdViLvEoSxQZe0PPWu/GqR+UAk2mN0xAPNtUQA8+b0ECsAutqauUJ5vhKfCDod+l4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MWCPrez7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B98E5C2BBFC; Fri, 7 Jun 2024 18:18:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717784339; bh=7JYVFmwVoYI/lP50oTlJEVeX/T08uLhbxMC9TIDM7nE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MWCPrez7FGeAkANPGfxIeYmx07QUAwFyhD8vh/L/HTocNCr437ymHdYqQioBUAuvL S3MG1Krb85pg3dzrx7ZQ4T8p+1W60XilMuXi377zvTX+8R5UEQeSB4PifTPKxi8JNg 3kLda/jmf4d8k12u527coaQMM4g4zRvfqYcJr7eDwpiMYYExwPHlitF8rB8SnCq5OI JS9XlMNGAv3DIFmrNN0DBmSaici4mEuuTsGM8HUUBPsMh4hpX9vkB0DYi3fiTheLA8 Z9Op9H5dNqvW2eDt5WpIKomyElnM9fb2q8Ya+4pD1CfnNY2ZhLIBYdZfEgk58Ugrdz BEti3c9OCtw8Q== Date: Fri, 7 Jun 2024 11:18:57 -0700 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ravi Bangoria , Ian Rogers , Ingo Molnar , 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=utf-8 Content-Disposition: inline In-Reply-To: On Thu, Jun 06, 2024 at 11:11:38AM -0300, Arnaldo Carvalho de Melo wrote: > 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. This kind of thing happens periodically, I guess we can add some message to help users to set the default config when it's not set. In TUI, it can even set the config directly according to the users response. Thanks, Namhyung