lkml.org 
[lkml]   [2019]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-11-15 15:56    [W:0.112 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site