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: <20200428105155.GG1476763@krava>
Date:   Tue, 28 Apr 2020 12:51:55 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Jin Yao <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH] perf stat: Fix uncore event mixed metric with workload
 error issue

On Mon, Apr 27, 2020 at 10:41:16PM +0800, Jin Yao wrote:

SNIP

> index 9207b6c45475..b01ee06b1965 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -1841,8 +1841,8 @@ static void setup_system_wide(int forks)
>  	 * conditions is met:
>  	 *
>  	 *   - there's no workload specified
> -	 *   - there is workload specified but all requested
> -	 *     events are system wide events
> +	 *   - there is workload specified but at least one requested
> +	 *     event is system wide event
>  	 */
>  	if (!target__none(&target))
>  		return;
> @@ -1851,13 +1851,16 @@ static void setup_system_wide(int forks)
>  		target.system_wide = true;
>  	else {
>  		struct evsel *counter;
> +		bool system_wide = false;
>  
>  		evlist__for_each_entry(evsel_list, counter) {
> -			if (!counter->core.system_wide)
> -				return;
> +			if (counter->core.system_wide) {
> +				system_wide = true;
> +				break;
> +			}

I wonder this would break some expectations.. would it be
more safe to detect duration event and bypass it from the
decission? but maybe the case I'm worried about is not a
problem at all.. Andi?

jirka

>  		}
>  
> -		if (evsel_list->core.nr_entries)
> +		if (evsel_list->core.nr_entries && system_wide)
>  			target.system_wide = true;
>  	}
>  }
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ