Skip to content

RFC perf pollfd series

Arnaldo Carvalho de Melo lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10perf evlist: Introduce perf_evlist__filter_pollfd methodtools/perf/util/evlist.c tools/perf/util/evlist.h+18 -01 reply
2/10perf tests: Add test for perf_evlist__filter_pollfd()tools/perf/Makefile.perf tools/perf/tests/builtin-test.c tools/perf/tests/evlist.c +1 more+109 -00 replies
3/10perf evlist: Monitor POLLERR and POLLHUP events tootools/perf/util/evlist.c+1 -10 replies
4/10perf record: Filter out POLLHUP'ed file descriptorstools/perf/builtin-record.c+3 -00 replies
5/10perf trace: Filter out POLLHUP'ed file descriptorstools/perf/builtin-trace.c+2 -10 replies
6/10perf evlist: Allow growing pollfd on add methodtools/perf/util/evlist.c tools/perf/util/evlist.h+38 -73 replies
7/10perf tests: Add pollfd growing testtools/perf/tests/builtin-test.c tools/perf/tests/evlist.c tools/perf/tests/tests.h+116 -00 replies
8/10perf kvm stat live: Use perf_evlist__add_pollfd() instead of local equivalenttools/perf/builtin-kvm.c+9 -131 reply
9/10perf evlist: Introduce poll method for common code idiomtools/perf/builtin-record.c tools/perf/builtin-top.c tools/perf/builtin-trace.c +6 more+15 -80 replies
10/10tools lib api: Adopt fdarray class from perf's evlisttools/lib/api/Makefile tools/lib/api/fd/poll.c tools/lib/api/fd/poll.h +5 more+191 -842 replies

Reviews trailers per patch

1 of 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJiri OlsaDavid Ahern
SeriesA-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10R-b
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 00/10] perf pollfd series

Hi,

This is an alternative series to the one Jiri Olsa posted to use the
fixes he made to the kernel side to allow tooling to notice that a thread had exited by looking at the pollfd.revents looking for POLLHUP notifications.

Once all event file descriptors are removed from the evlist pollfd array,
tools can make a decision about exiting or telling the user about what happened, asking to guidance on what to do next.

The main difference in this approach is that a new class, which Jiri
called 'poller' and I called 'fdarray', grew up from what was in evlist->pollfd and associated operations, while Jiri first introduced a new class and then made tooling use it.

The details of the implementation should be clear on the changelog
comments, please let me know if you see any problems, and if I can have your acked-by/tested-by/whatever-else tags to get this moving forward.

Ah, there is still one missing thing which is to make the hists browser
in live mode be notified that all monitored events are POLLHUP'ed, will get to that in followup patches.

The kernel bits were sent together with my latest pull req to Ingo,
this series is on top of that branch and is available at:

git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/pollfd

- Arnaldo

Arnaldo Carvalho de Melo (10):
perf evlist: Introduce perf_evlist__filter_pollfd method
perf tests: Add test for perf_evlist__filter_pollfd()
perf evlist: Monitor POLLERR and POLLHUP events too
perf record: Filter out POLLHUP'ed file descriptors
perf trace: Filter out POLLHUP'ed file descriptors
perf evlist: Allow growing pollfd on add method
perf tests: Add pollfd growing test
perf kvm stat live: Use perf_evlist__add_pollfd() instead of local equivalent perf evlist: Introduce poll method for common code idiom
tools lib api: Adopt fdarray class from perf's evlist