aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-10-29 09:31:54 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-10-29 09:31:54 -0400
commitcba9b847f649af350809d8ff4119e84b0466c1d9 (patch)
tree9df75724f38b7f04a0cc455b5a5fee3f921697af
parent3c659eedada2fbf909c5818848753a6647a56426 (diff)
perf tools: Use evlist__for_each in a few remaining places
Where direct use of the longer form using list_for_entry() was being used. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-v4fw80flg25nkl8jgeod3ot9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/evlist.c2
-rw-r--r--tools/perf/util/session.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 0babd390963c..7e23dae54f1d 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -413,7 +413,7 @@ int perf_evlist__alloc_pollfd(struct perf_evlist *evlist)
413 int nfds = 0; 413 int nfds = 0;
414 struct perf_evsel *evsel; 414 struct perf_evsel *evsel;
415 415
416 list_for_each_entry(evsel, &evlist->entries, node) { 416 evlist__for_each(evlist, evsel) {
417 if (evsel->system_wide) 417 if (evsel->system_wide)
418 nfds += nr_cpus; 418 nfds += nr_cpus;
419 else 419 else
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 27a0049118b5..58dd5ceb8bef 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1662,7 +1662,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool,
1662 max_nr = (UINT16_MAX - sizeof(struct id_index_event)) / 1662 max_nr = (UINT16_MAX - sizeof(struct id_index_event)) /
1663 sizeof(struct id_index_entry); 1663 sizeof(struct id_index_entry);
1664 1664
1665 list_for_each_entry(evsel, &evlist->entries, node) 1665 evlist__for_each(evlist, evsel)
1666 nr += evsel->ids; 1666 nr += evsel->ids;
1667 1667
1668 n = nr > max_nr ? max_nr : nr; 1668 n = nr > max_nr ? max_nr : nr;
@@ -1675,7 +1675,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool,
1675 ev->id_index.header.size = sz; 1675 ev->id_index.header.size = sz;
1676 ev->id_index.nr = n; 1676 ev->id_index.nr = n;
1677 1677
1678 list_for_each_entry(evsel, &evlist->entries, node) { 1678 evlist__for_each(evlist, evsel) {
1679 u32 j; 1679 u32 j;
1680 1680
1681 for (j = 0; j < evsel->ids; j++) { 1681 for (j = 0; j < evsel->ids; j++) {