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]
Message-ID: <YeMph54WM/vHi7fU@kernel.org>
Date:   Sat, 15 Jan 2022 17:07:35 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     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@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        John Garry <john.garry@...wei.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        eranian@...gle.com
Subject: Re: [PATCH] perf metric: Fix metric_leader

Em Fri, Jan 14, 2022 at 10:28:52PM -0800, Ian Rogers escreveu:
> Multiple events may have a metric_leader to aggregate into. This happens
> for uncore events where, for example, uncore_imc is expanded into
> uncore_imc_0, uncore_imc_1, etc. Such events all have the same metric_id
> and should aggregate into the first event. The change introducing
> metric_ids had a bug where the metric_id was compared to itself,
> creating an always true condition. Correct this by comparing the
> event in the metric_evlist and the metric_leader.

Thanks, applied.

- Arnaldo

 
> Fixes: ec5c5b3d2c21 ("perf metric: Encode and use metric-id as qualifier")
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/perf/util/metricgroup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index 51c99cb08abf..1f1b78b0388f 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -314,7 +314,7 @@ static int setup_metric_events(struct hashmap *ids,
>  		 */
>  		metric_id = evsel__metric_id(ev);
>  		evlist__for_each_entry_continue(metric_evlist, ev) {
> -			if (!strcmp(evsel__metric_id(metric_events[i]), metric_id))
> +			if (!strcmp(evsel__metric_id(ev), metric_id))
>  				ev->metric_leader = metric_events[i];
>  		}
>  	}
> -- 
> 2.34.1.703.g22d0c6ccf7-goog

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ