aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/api/fd/array.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2014-08-13 14:26:21 +0000
committerArnaldo Carvalho de Melo <[email protected]>2014-09-25 19:46:54 +0000
commit8179672c2f7b9c41a7ef3e8c907d214fa92ed614 (patch)
tree5c9e46283b7521e331da545ae6994c6cc4407a7f /tools/lib/api/fd/array.c
parentperf tests: Add test for perf_evlist__filter_pollfd() (diff)
downloadkernel-8179672c2f7b9c41a7ef3e8c907d214fa92ed614.tar.gz
kernel-8179672c2f7b9c41a7ef3e8c907d214fa92ed614.zip
perf evlist: Monitor POLLERR and POLLHUP events too
We want to know when the fd went away, like when a monitored thread exits. If we do not monitor such events, then the tools will wait forever on events from a vanished thread, like when running: $ sleep 5s & $ perf record -p `pidof sleep` This builds upon the kernel patch by Jiri Olsa that actually makes a poll on those file descriptors to return POLLHUP. It is also needed to change the tools to use perf_evlist__filter_pollfd() to check if there are remainings fds to monitor or if all are gone, in which case they will exit the poll/mmap/read loop. Acked-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Don Zickus <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/lib/api/fd/array.c')
0 files changed, 0 insertions, 0 deletions