diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2014-01-10 13:37:27 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2014-01-13 13:06:25 +0000 |
| commit | 0050f7aa182e3e8ed34dd6cc4318e52b3df6347a (patch) | |
| tree | 472540f557462f51a73b7cd44c27792edd48e4d8 /tools/perf/util/python.c | |
| parent | perf report: Move histogram entries collapsing to separate function (diff) | |
| download | kernel-0050f7aa182e3e8ed34dd6cc4318e52b3df6347a.tar.gz kernel-0050f7aa182e3e8ed34dd6cc4318e52b3df6347a.zip | |
perf evlist: Introduce evlist__for_each() & friends
For the common evsel list traversal, so that it becomes more compact.
Use the opportunity to start ditching the 'perf_' from 'perf_evlist__',
as discussed, as the whole conversion touches a lot of places, lets do
it piecemeal when we have the chance due to other work, like in this
case.
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[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/perf/util/python.c')
| -rw-r--r-- | tools/perf/util/python.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 4bf8ace7f511..122669c18ff4 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -908,9 +908,10 @@ static PyObject *pyrf_evlist__item(PyObject *obj, Py_ssize_t i) if (i >= pevlist->evlist.nr_entries) return NULL; - list_for_each_entry(pos, &pevlist->evlist.entries, node) + evlist__for_each(&pevlist->evlist, pos) { if (i-- == 0) break; + } return Py_BuildValue("O", container_of(pos, struct pyrf_evsel, evsel)); } |
