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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Aug 2023 17:54:59 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Andi Kleen <ak@...ux.intel.com>, Ian Rogers <irogers@...gle.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
        Claire Jensen <cjense@...gle.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf stat: Don't display zero tool counts

Em Tue, Aug 01, 2023 at 01:54:52PM -0700, Ian Rogers escreveu:
> Skip zero counts for tool events.
> 
> Reported-by: Andi Kleen <ak@...ux.intel.com>

Andi,

	Have you tested this? Can we please have your Tested-by?

- Arnaldo:1


> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/perf/util/stat-display.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
> index 7329b3340f88..d45d5dcb0e2b 100644
> --- a/tools/perf/util/stat-display.c
> +++ b/tools/perf/util/stat-display.c
> @@ -931,6 +931,11 @@ static bool should_skip_zero_counter(struct perf_stat_config *config,
>  	 */
>  	if (config->aggr_mode == AGGR_THREAD && config->system_wide)
>  		return true;
> +
> +	/* Tool events have the software PMU but are only gathered on 1. */
> +	if (evsel__is_tool(counter))
> +		return true;
> +
>  	/*
>  	 * Skip value 0 when it's an uncore event and the given aggr id
>  	 * does not belong to the PMU cpumask.
> -- 
> 2.41.0.585.gd2178a4bd4-goog
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ