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:   Fri, 15 Nov 2019 15:55:35 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     jolsa@...nel.org, acme@...nel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v6 10/12] perf stat: Use affinity for reading

On Mon, Nov 11, 2019 at 04:59:39PM -0800, Andi Kleen wrote:

SNIP

>  
>  	evlist__for_each_entry(evsel_list, counter) {
> -		ret = read_counter(counter, rs);
> -		if (ret)
> +		if (counter->err)
>  			pr_debug("failed to read counter %s\n", counter->name);
> -
> -		if (ret == 0 && perf_stat_process_counter(&stat_config, counter))
> +		if (counter->err == 0 && perf_stat_process_counter(&stat_config, counter))
>  			pr_warning("failed to process counter %s\n", counter->name);
> +		counter->err = 0;
>  	}
>  }
>  
> diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
> index ca82a93960cd..c8af4bc23f8f 100644
> --- a/tools/perf/util/evsel.h
> +++ b/tools/perf/util/evsel.h
> @@ -86,6 +86,7 @@ struct evsel {
>  	struct list_head	config_terms;
>  	struct bpf_object	*bpf_obj;
>  	int			bpf_fd;
> +	int			err;

I was wondering what would be the best place for this,
and all the previous variables u added and this one
are stat specific, so I think this all belongs to
  
  (struct perf_stat_evsel*) evsel->stat

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ