提交 cba9b847 编写于 作者: A Arnaldo Carvalho de Melo

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.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 3c659eed
...@@ -413,7 +413,7 @@ int perf_evlist__alloc_pollfd(struct perf_evlist *evlist) ...@@ -413,7 +413,7 @@ int perf_evlist__alloc_pollfd(struct perf_evlist *evlist)
int nfds = 0; int nfds = 0;
struct perf_evsel *evsel; struct perf_evsel *evsel;
list_for_each_entry(evsel, &evlist->entries, node) { evlist__for_each(evlist, evsel) {
if (evsel->system_wide) if (evsel->system_wide)
nfds += nr_cpus; nfds += nr_cpus;
else else
......
...@@ -1662,7 +1662,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool, ...@@ -1662,7 +1662,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool,
max_nr = (UINT16_MAX - sizeof(struct id_index_event)) / max_nr = (UINT16_MAX - sizeof(struct id_index_event)) /
sizeof(struct id_index_entry); sizeof(struct id_index_entry);
list_for_each_entry(evsel, &evlist->entries, node) evlist__for_each(evlist, evsel)
nr += evsel->ids; nr += evsel->ids;
n = nr > max_nr ? max_nr : nr; n = nr > max_nr ? max_nr : nr;
...@@ -1675,7 +1675,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool, ...@@ -1675,7 +1675,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool,
ev->id_index.header.size = sz; ev->id_index.header.size = sz;
ev->id_index.nr = n; ev->id_index.nr = n;
list_for_each_entry(evsel, &evlist->entries, node) { evlist__for_each(evlist, evsel) {
u32 j; u32 j;
for (j = 0; j < evsel->ids; j++) { for (j = 0; j < evsel->ids; j++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册