From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752648AbcFZK6g (ORCPT ); Sun, 26 Jun 2016 06:58:36 -0400 Received: from terminus.zytor.com ([198.137.202.10]:51356 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752164AbcFZK6f (ORCPT ); Sun, 26 Jun 2016 06:58:35 -0400 Date: Sun, 26 Jun 2016 03:58:19 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: jolsa@kernel.org, acme@redhat.com, namhyung@kernel.org, dsahern@gmail.com, hpa@zytor.com, milian.wolff@kdab.com, mingo@kernel.org, wangnan0@huawei.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, treeze.taeung@gmail.com, tglx@linutronix.de Reply-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, treeze.taeung@gmail.com, mingo@kernel.org, wangnan0@huawei.com, adrian.hunter@intel.com, milian.wolff@kdab.com, dsahern@gmail.com, hpa@zytor.com, namhyung@kernel.org, acme@redhat.com, jolsa@kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf rb_resort: Rename for_each() macros to for_each_entry() Git-Commit-ID: 98a91837dd1751e730f8265129b376450f41dcfd X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 98a91837dd1751e730f8265129b376450f41dcfd Gitweb: http://git.kernel.org/tip/98a91837dd1751e730f8265129b376450f41dcfd Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 23 Jun 2016 11:34:10 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 23 Jun 2016 11:35:07 -0300 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 Cc: David Ahern Cc: Jiri Olsa Cc: Milian Wolff Cc: Namhyung Kim Cc: Taeung Song Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-iaxuq2yu43mtb504j96q0axs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-trace.c | 4 ++-- 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 1ba1341..cf90de8 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, printed += fprintf(fp, " (msec) (msec) (msec) (msec) (%%)\n"); printed += fprintf(fp, " --------------- -------- --------- --------- --------- --------- ------\n"); - resort_rb__for_each(nd, syscall_stats) { + resort_rb__for_each_entry(nd, syscall_stats) { struct stats *stats = syscall_stats_entry->stats; if (stats) { double min = (double)(stats->min) / NSEC_PER_MSEC; @@ -2627,7 +2627,7 @@ static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp) return 0; } - resort_rb__for_each(nd, threads) + resort_rb__for_each_entry(nd, threads) printed += trace__fprintf_thread(fp, threads_entry->thread, trace); resort_rb__delete(threads); diff --git a/tools/perf/util/rb_resort.h b/tools/perf/util/rb_resort.h index abc76e3..808cc45 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, struct rb_node *nd; - resort_rb__for_each(nd, threads) { + resort_rb__for_each_entry(nd, threads) { struct thread *t = threads_entry; printf("%s: %d\n", t->shortname, t->tid); } @@ -123,7 +123,7 @@ static void __name##_sorted__init_entry(struct rb_node *nd, \ struct __name##_sorted_entry *__name##_entry; \ struct __name##_sorted *__name = __name##_sorted__new -#define resort_rb__for_each(__nd, __name) \ +#define resort_rb__for_each_entry(__nd, __name) \ for (__nd = rb_first(&__name->entries); \ __name##_entry = rb_entry(__nd, struct __name##_sorted_entry, \ rb_node), __nd; \