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: <20210120125622.GE1760208@krava>
Date:   Wed, 20 Jan 2021 13:56:22 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     John Garry <john.garry@...wei.com>
Cc:     Joakim Zhang <qiangqing.zhang@....com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "acme@...nel.org" <acme@...nel.org>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "alexander.shishkin@...ux.intel.com" 
        <alexander.shishkin@...ux.intel.com>,
        "namhyung@...nel.org" <namhyung@...nel.org>,
        "irogers@...gle.com" <irogers@...gle.com>,
        "kjain@...ux.ibm.com" <kjain@...ux.ibm.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linuxarm@...neuler.org" <linuxarm@...neuler.org>
Subject: Re: [PATCH] perf metricgroup: Fix system PMU metrics

On Tue, Jan 19, 2021 at 05:33:13PM +0000, John Garry wrote:

SNIP

> Please try this:
> 
> From 2380f1ef0250e6818b3dbc7bff4a868810875e2a Mon Sep 17 00:00:00 2001
> From: John Garry <john.garry@...wei.com>
> Date: Tue, 19 Jan 2021 17:29:54 +0000
> Subject: [PATCH] perf metricgroup: Fix metric support for duration_time
> 
> For a metric using duration_time, the strcmp() check when finding identical
> events in metric_events[] is broken, as it does not consider that the
> event pmu_name is NULL - it would be for duration_time.
> 
> As such, add a NULL check here for event pmu_name.
> 
> Signed-off-by: John Garry <john.garry@...wei.com>
> 
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index ee94d3e8dd65..277adff8017f 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -280,6 +280,8 @@ static struct evsel *find_evsel_group(struct evlist
> *perf_evlist,
>  			 */
>  			if (!has_constraint &&
>  			    ev->leader != metric_events[i]->leader &&
> +			    ev->leader->pmu_name &&
> +			    metric_events[i]->leader->pmu_name &&
>  			    !strcmp(ev->leader->pmu_name,
>  				    metric_events[i]->leader->pmu_name))
>  				break;
> -- 
> 2.26.2
> 
> 
> 

that's fixing the issue for me, this was crashing:
  # perf stat -a -I 1000 -M L1D_Cache_Fill_BW,L2_Cache_Fill_BW

could you please send it formaly, so it can be merged?

I can't reproduce the original patch issue and I need
to check the code in more depth

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ