linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Ian Rogers <irogers@google.com>, Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Changbin Du <changbin.du@huawei.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v1] perf top: Make zeroing histogram on refresh the default
Date: Thu, 6 Jun 2024 11:11:38 -0300	[thread overview]
Message-ID: <ZmHDmrLCoYPUCv3n@x1> (raw)
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 <ravi.bangoria@amd.com>

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

  reply	other threads:[~2024-06-06 14:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 22:21 [PATCH v1] perf top: Make zeroing histogram on refresh the default Ian Rogers
2024-05-18  1:25 ` Namhyung Kim
2024-05-18  3:18   ` Ian Rogers
2024-05-21 19:45   ` Arnaldo Carvalho de Melo
2024-06-05 23:51     ` Ian Rogers
2024-06-06  4:45 ` Ravi Bangoria
2024-06-06 14:11   ` Arnaldo Carvalho de Melo [this message]
2024-06-07  3:56     ` Ravi Bangoria
2024-06-07 18:18     ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZmHDmrLCoYPUCv3n@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrii@kernel.org \
    --cc=changbin.du@huawei.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).