diff options
| author | Alexey Budankov <[email protected]> | 2020-07-17 07:00:15 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-07-21 12:53:22 +0000 |
| commit | d3da1f0900891eec10c2a83422ba53c19a7b6380 (patch) | |
| tree | 56b55d234cc1d78a36d60619d5dc39fb831fc07b /tools/lib/api/fd/array.c | |
| parent | libperf: Add flags to fdarray fds objects (diff) | |
| download | kernel-d3da1f0900891eec10c2a83422ba53c19a7b6380.tar.gz kernel-d3da1f0900891eec10c2a83422ba53c19a7b6380.zip | |
libperf: Avoid counting of nonfilterable fdarray fds
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.
Signed-off-by: Alexey Budankov <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/lib/api/fd/array.c')
| -rw-r--r-- | tools/lib/api/fd/array.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |
