lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4Ep7WbRhZXVINCc@x1>
Date: Fri, 10 Jan 2025 11:08:45 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>, Kan Liang <kan.liang@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	linux-perf-users@...r.kernel.org,
	Gabriele Monaco <gmonaco@...hat.com>
Subject: Re: [PATCH 2/2] perf ftrace: Fix display for range of the first
 bucket

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:

Fixes: 08b875b6bf608589 ("perf ftrace latency: Introduce --min-latency to narrow down into a latency range")

Thanks,

- Arnaldo

> Cc: Gabriele Monaco <gmonaco@...hat.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ