diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-09-26 11:12:46 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-09-26 11:12:46 +0200 |
| commit | cf8102f64c8d23f0bd4af0659bbd94d0c1d8d1c7 (patch) | |
| tree | c525d62d2f0c0c399d92782add5760dd126a62e4 /tools/perf/util/python.c | |
| parent | perf/x86/intel/uncore: Update support for client uncore IMC PMU (diff) | |
| parent | perf trace: Filter out POLLHUP'ed file descriptors (diff) | |
| download | linux-cf8102f64c8d23f0bd4af0659bbd94d0c1d8d1c7.tar.gz linux-cf8102f64c8d23f0bd4af0659bbd94d0c1d8d1c7.zip | |
Merge tag 'perf-fdarray-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf tooling updates from Arnaldo Carvalho de Melo.
Infrastructure changes:
* We were not handling POLLHUP notifications for event file descriptors.
Fix it by filtering entries in the events file descriptor array after
poll() returns, refcounting mmaps so that when the last fd pointing to
a perf mmap goes away we do the unmap. (Arnaldo Carvalho de Melo)
User visible changes:
* Now 'record' and 'trace' properly exit when a target thread exits.
(Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/python.c')
| -rw-r--r-- | tools/perf/util/python.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 12aa9b0d0ba1..3dda85ca50c1 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -736,7 +736,7 @@ static PyObject *pyrf_evlist__poll(struct pyrf_evlist *pevlist, if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwlist, &timeout)) return NULL; - n = poll(evlist->pollfd, evlist->nr_fds, timeout); + n = perf_evlist__poll(evlist, timeout); if (n < 0) { PyErr_SetFromErrno(PyExc_OSError); return NULL; @@ -753,9 +753,9 @@ static PyObject *pyrf_evlist__get_pollfd(struct pyrf_evlist *pevlist, PyObject *list = PyList_New(0); int i; - for (i = 0; i < evlist->nr_fds; ++i) { + for (i = 0; i < evlist->pollfd.nr; ++i) { PyObject *file; - FILE *fp = fdopen(evlist->pollfd[i].fd, "r"); + FILE *fp = fdopen(evlist->pollfd.entries[i].fd, "r"); if (fp == NULL) goto free_list; |
