lkml.org 
[lkml]   [2020]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH v9 03/15] tools/libperf: don't count nonfilterable fds by fdarray__filter()
From
Date

Avoid counting of struct pollfd *entries objects with
fdarray_prop__nonfilterable propery by fdarray__filter().
Non-filterable objects are still processed if monitored
events have been signaled for them.

Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
---
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 a4223f8cb1ce..e902c0260414 100644
--- a/tools/lib/api/fd/array.c
+++ b/tools/lib/api/fd/array.c
@@ -105,7 +105,8 @@ int fdarray__filter(struct fdarray *fda, short revents,
continue;
}

- ++nr;
+ if (!(fda->prop[fd].bits & fdarray_prop__nonfilterable))
+ ++nr;
}

return nr;
--
2.24.1

\
 
 \ /
  Last update: 2020-07-03 09:43    [W:1.714 / U:26.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site