perf evlist: Introduce evlist__for_each() & friends
[linux-2.6-block.git] / tools / perf / tests / hists_link.c
index 173bf42cc03e73e8291e4a6a7cf99f5d8d6d3107..2b6519e0e36f09bdbdeac4865fed851f82a3a1ac 100644 (file)
@@ -208,7 +208,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
         * However the second evsel also has a collapsed entry for
         * "bash [libc] malloc" so total 9 entries will be in the tree.
         */
-       list_for_each_entry(evsel, &evlist->entries, node) {
+       evlist__for_each(evlist, evsel) {
                for (k = 0; k < ARRAY_SIZE(fake_common_samples); k++) {
                        const union perf_event event = {
                                .header = {
@@ -466,7 +466,7 @@ int test__hists_link(void)
        if (err < 0)
                goto out;
 
-       list_for_each_entry(evsel, &evlist->entries, node) {
+       evlist__for_each(evlist, evsel) {
                hists__collapse_resort(&evsel->hists, NULL);
 
                if (verbose > 2)