Re: [PATCH v12 03/15] tools/libperf: avoid counting of nonfilterable fdarray fds

From: Arnaldo Carvalho de Melo
Date: Tue Jul 21 2020 - 15:59:23 EST


Em Fri, Jul 17, 2020 at 10:00:15AM +0300, Alexey Budankov escreveu:
>
> Avoid counting of struct pollfd *entries objects with
> fdarray_flag__nonfilterable flag by fdarray__filter().
> Nonfilterable objects are still processed if requested
> revents have been signaled for them.

Thanks, applied.

- Arnaldo

> Signed-off-by: Alexey Budankov <alexey.budankov@xxxxxxxxxxxxxxx>
> Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
> ---
> tools/lib/api/fd/array.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/lib/api/fd/array.c b/tools/lib/api/fd/array.c
> index 01b3b89f9797..5e6cb9debe37 100644
> --- a/tools/lib/api/fd/array.c
> +++ b/tools/lib/api/fd/array.c
> @@ -109,7 +109,8 @@ int fdarray__filter(struct fdarray *fda, short revents,
> continue;
> }
>
> - ++nr;
> + if (!(fda->priv[fd].flags & fdarray_flag__nonfilterable))
> + ++nr;
> }
>
> return nr;
> --
> 2.24.1
>
>

--

- Arnaldo