Re: [PATCH v6 perf,bpf 14/15] perf: introduce side band thread
From: Jiri Olsa
Date: Thu Mar 07 2019 - 09:05:40 EST
On Tue, Mar 05, 2019 at 11:13:58PM -0800, Song Liu wrote:
SNIP
> +void perf_evlist__stop_sb_thread(struct perf_evlist *evlist)
> +{
> + if (!evlist)
> + return;
> + evlist->thread.done = 1;
> + pthread_join(evlist->thread.th, NULL);
> + perf_evlist__exit(evlist);
> + evlist = NULL;
> +}
> diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
> index 868294491194..ed8cab1b7438 100644
> --- a/tools/perf/util/evlist.h
> +++ b/tools/perf/util/evlist.h
> @@ -51,6 +51,11 @@ struct perf_evlist {
> struct perf_env *env;
> u64 first_sample_time;
> u64 last_sample_time;
> + struct {
> + pthread_t th;
> + struct perf_evsel *evsel;
what's the evsel pointer for?
> + volatile int done;
> + } thread;
> };
SNIP