diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-23 10:34:10 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-23 10:35:07 -0400 |
commit | 98a91837dd1751e730f8265129b376450f41dcfd (patch) | |
tree | 52447e9ba430c88b6e6a89176f5dd1d9f8e4d5a1 | |
parent | 602a1f4daa5d107e890fd4f5f558dedf6a0874f3 (diff) |
perf rb_resort: Rename for_each() macros to for_each_entry()
To match the semantics for list.h in the kernel, that are the
interface we use in them.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-iaxuq2yu43mtb504j96q0axs@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-trace.c | 4 | ||||
-rw-r--r-- | tools/perf/util/rb_resort.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 1ba134192d74..cf90de811523 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -2550,7 +2550,7 @@ static size_t thread__dump_stats(struct thread_trace *ttrace, | |||
2550 | printed += fprintf(fp, " (msec) (msec) (msec) (msec) (%%)\n"); | 2550 | printed += fprintf(fp, " (msec) (msec) (msec) (msec) (%%)\n"); |
2551 | printed += fprintf(fp, " --------------- -------- --------- --------- --------- --------- ------\n"); | 2551 | printed += fprintf(fp, " --------------- -------- --------- --------- --------- --------- ------\n"); |
2552 | 2552 | ||
2553 | resort_rb__for_each(nd, syscall_stats) { | 2553 | resort_rb__for_each_entry(nd, syscall_stats) { |
2554 | struct stats *stats = syscall_stats_entry->stats; | 2554 | struct stats *stats = syscall_stats_entry->stats; |
2555 | if (stats) { | 2555 | if (stats) { |
2556 | double min = (double)(stats->min) / NSEC_PER_MSEC; | 2556 | double min = (double)(stats->min) / NSEC_PER_MSEC; |
@@ -2627,7 +2627,7 @@ static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp) | |||
2627 | return 0; | 2627 | return 0; |
2628 | } | 2628 | } |
2629 | 2629 | ||
2630 | resort_rb__for_each(nd, threads) | 2630 | resort_rb__for_each_entry(nd, threads) |
2631 | printed += trace__fprintf_thread(fp, threads_entry->thread, trace); | 2631 | printed += trace__fprintf_thread(fp, threads_entry->thread, trace); |
2632 | 2632 | ||
2633 | resort_rb__delete(threads); | 2633 | resort_rb__delete(threads); |
diff --git a/tools/perf/util/rb_resort.h b/tools/perf/util/rb_resort.h index abc76e3d3098..808cc45611fe 100644 --- a/tools/perf/util/rb_resort.h +++ b/tools/perf/util/rb_resort.h | |||
@@ -35,7 +35,7 @@ DEFINE_RB_RESORT_RB(threads, strcmp(a->thread->shortname, | |||
35 | 35 | ||
36 | struct rb_node *nd; | 36 | struct rb_node *nd; |
37 | 37 | ||
38 | resort_rb__for_each(nd, threads) { | 38 | resort_rb__for_each_entry(nd, threads) { |
39 | struct thread *t = threads_entry; | 39 | struct thread *t = threads_entry; |
40 | printf("%s: %d\n", t->shortname, t->tid); | 40 | printf("%s: %d\n", t->shortname, t->tid); |
41 | } | 41 | } |
@@ -123,7 +123,7 @@ static void __name##_sorted__init_entry(struct rb_node *nd, \ | |||
123 | struct __name##_sorted_entry *__name##_entry; \ | 123 | struct __name##_sorted_entry *__name##_entry; \ |
124 | struct __name##_sorted *__name = __name##_sorted__new | 124 | struct __name##_sorted *__name = __name##_sorted__new |
125 | 125 | ||
126 | #define resort_rb__for_each(__nd, __name) \ | 126 | #define resort_rb__for_each_entry(__nd, __name) \ |
127 | for (__nd = rb_first(&__name->entries); \ | 127 | for (__nd = rb_first(&__name->entries); \ |
128 | __name##_entry = rb_entry(__nd, struct __name##_sorted_entry, \ | 128 | __name##_entry = rb_entry(__nd, struct __name##_sorted_entry, \ |
129 | rb_node), __nd; \ | 129 | rb_node), __nd; \ |