linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org,
	Gabriele Monaco <gmonaco@redhat.com>
Subject: Re: [PATCH 2/2] perf ftrace: Fix display for range of the first bucket
Date: Fri, 10 Jan 2025 11:11:19 -0300	[thread overview]
Message-ID: <Z4Eqh5R1M5dElkYN@x1> (raw)
In-Reply-To: <Z4Ep7WbRhZXVINCc@x1>

On Fri, Jan 10, 2025 at 11:08:48AM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, Jan 08, 2025 at 01:00:15PM -0800, Namhyung Kim wrote:
> > When min_latency is not given, it prints 0 - 0.  It should be 0 - 1.
> > 
> > Before:
> >   $ sudo ./perf ftrace latency -a -T do_futex sleep 1
> >   #   DURATION     |      COUNT | GRAPH                                          |
> >        0 -    0 us |        321 | ###########                                    |
> >   ...
> > 
> > After:
> >   $ sudo ./perf ftrace latency -a -T do_futex sleep 1
> >   #   DURATION     |      COUNT | GRAPH                                          |
> >        0 -    1 us |        699 | ############                                   |
> >   ...
> > 
> > Fixes: b875b6bf608589 ("perf ftrace latency: Introduce --min-latency to narrow down into a latency range")
> 
> I couldn't find the above cset in perf-tools not perf-tools-next nor in
> upstream, I fixed it up to:

It is just in perf-tools-next, so probably I did some rebase and that
explains this. Anyway, that should be stable now.

- Arnaldo
 
> Fixes: 08b875b6bf608589 ("perf ftrace latency: Introduce --min-latency to narrow down into a latency range")
> 
> Thanks,
> 
> - Arnaldo
> 
> > Cc: Gabriele Monaco <gmonaco@redhat.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> >  tools/perf/builtin-ftrace.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
> > index 90cf2c9915a7e35b..cfd770ec72867d77 100644
> > --- a/tools/perf/builtin-ftrace.c
> > +++ b/tools/perf/builtin-ftrace.c
> > @@ -840,7 +840,7 @@ static void display_histogram(struct perf_ftrace *ftrace, int buckets[])
> >  	bar_len = buckets[0] * bar_total / total;
> >  
> >  	printf("  %4d - %4d %s | %10d | %.*s%*s |\n",
> > -	       0, min_latency, use_nsec ? "ns" : "us",
> > +	       0, min_latency ?: 1, use_nsec ? "ns" : "us",
> >  	       buckets[0], bar_len, bar, bar_total - bar_len, "");
> >  
> >  	for (i = 1; i < NUM_BUCKET - 1; i++) {
> > -- 
> > 2.47.1.613.gc27f4b7a9f-goog

  reply	other threads:[~2025-01-10 14:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 21:00 [PATCH 1/2] perf ftrace: Check min/max latency only with bucket range Namhyung Kim
2025-01-08 21:00 ` [PATCH 2/2] perf ftrace: Fix display for range of the first bucket Namhyung Kim
2025-01-10 14:08   ` Arnaldo Carvalho de Melo
2025-01-10 14:11     ` Arnaldo Carvalho de Melo [this message]
2025-01-09  7:53 ` [PATCH 1/2] perf ftrace: Check min/max latency only with bucket range Gabriele Monaco
2025-01-10  0:46   ` Namhyung Kim
2025-01-10 10:09     ` Gabriele Monaco
2025-01-10 14:03       ` Arnaldo Carvalho de Melo
2025-01-10 15:11         ` Gabriele Monaco
2025-01-10 18:13           ` Arnaldo Carvalho de Melo

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=Z4Eqh5R1M5dElkYN@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=gmonaco@redhat.com \
    --cc=irogers@google.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=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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).