From: Arnaldo Carvalho de Melo Date: Wed, 13 Aug 2014 14:26:21 +0000 (-0300) Subject: perf evlist: Monitor POLLERR and POLLHUP events too X-Git-Tag: omap-for-v3.19/prcm-cleanup~97^2~4^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8179672c2f7b9c41a7ef3e8c907d214fa92ed614;p=pandora-kernel.git 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 Cc: Adrian Hunter Cc: David Ahern Cc: Don Zickus Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-a4fslwspov0bs69nj825hqpq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed