Re: [PATCH v6 perf,bpf 14/15] perf: introduce side band thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux