Re: [PATCH v1 4/5] perf: Introduce address range filtering

From: Peter Zijlstra
Date: Mon Apr 25 2016 - 10:14:29 EST


On Fri, Apr 22, 2016 at 07:19:11PM +0300, Alexander Shishkin wrote:
> /**
> + * struct perf_addr_filter - address range filter definition
> + * @entry: event's filter list linkage
> + * @inode: object file's inode for file-based filters
> + * @offset: filter range offset
> + * @size: filter range size
> + * @range: 1: range, 0: address
> + * @filter: 1: filter/start, 0: stop
> + * @kernel: 1: kernel, 0: file-based
> + *
> + * This is a hardware-agnostic filter configuration as specified by the user.
> + */
> +struct perf_addr_filter {
> + struct list_head entry;
> + struct inode *inode;
> + unsigned long offset;
> + unsigned long size;
> + unsigned int range : 1,
> + filter : 1,
> + kernel : 1;
> +};

FWIW, why not have !inode be kernel?