alistair23-linux/tools/perf/util
Frederic Weisbecker 14f4654cbd perf_counter tools: Create new chain_for_each_child() iterator
Iterating through children of a node in the callchain tree
shows something that may be quite confusing at a first glance.
The head is the children field of the parent and the list nodes
are in the brothers field of the children.

This is because the childs are linked to the parent as a list
of "brothers" using the "children" list of the parent as a
head:

  ---------------
 | Parent (head) |-------------------------------------
  ---------------                                      |
     |                                                 |
  children                                             |
     |                                                 |
  -----------               -----------                |
 | 1st child |---brother---| 2nd child |---brother-----
  -----------               -----------

This makes the following strange pattern often occuring:

 list_for_each_entry(child, &parent->children, brothers) {
        // do something with children
 }

Abstract it to chain_for_each_child() to factorize and simplify
this pattern.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1246550301-8954-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-07-02 20:47:14 +02:00
..
include perf_counter tools: Share list.h with the kernel 2009-07-01 22:37:23 +02:00
abspath.c
alias.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
cache.h perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
callchain.c perf_counter tools: Create new chain_for_each_child() iterator 2009-07-02 20:47:14 +02:00
callchain.h perf_counter tools: Share list.h with the kernel 2009-07-01 22:37:23 +02:00
color.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
color.h
config.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
ctype.c perf_counter tools: Add and use isprint() 2009-06-18 09:46:00 +02:00
environment.c
exec_cmd.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
exec_cmd.h
generate-cmdlist.sh
header.c perf_counter tools: Rework the file format 2009-06-25 21:39:04 +02:00
header.h perf_counter tools: Rework the file format 2009-06-25 21:39:04 +02:00
help.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
help.h perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
levenshtein.c
levenshtein.h
module.c perf_counter tools: Add infrastructure to support loading of kernel module symbols 2009-07-02 08:42:20 +02:00
module.h perf_counter tools: Add infrastructure to support loading of kernel module symbols 2009-07-02 08:42:20 +02:00
pager.c perf_counter tools: Remove dead code 2009-06-27 06:06:39 +02:00
parse-events.c perf list: Add cache events 2009-07-01 15:25:03 +02:00
parse-events.h
parse-options.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
parse-options.h perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
path.c
PERF-VERSION-GEN
quote.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
quote.h perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
run-command.c perf_counter tools: Remove dead code 2009-06-27 06:06:39 +02:00
run-command.h perf_counter tools: Remove dead code 2009-06-27 06:06:39 +02:00
sigchain.c
sigchain.h
strbuf.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
strbuf.h perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
string.c perf_counter tools: Define and use our own u64, s64 etc. definitions 2009-06-19 18:25:47 +02:00
string.h perf_counter tools: Rework the file format 2009-06-25 21:39:04 +02:00
strlist.c perf report: Add --dsos parameter 2009-07-01 00:07:09 +02:00
strlist.h perf_counter tools: Share rbtree.with the kernel 2009-07-01 22:37:22 +02:00
symbol.c perf_counter tools: Connect module support infrastructure to symbol loading infrastructure 2009-07-02 08:42:21 +02:00
symbol.h perf_counter tools: Connect module support infrastructure to symbol loading infrastructure 2009-07-02 08:42:21 +02:00
types.h perf_counter tools: Rework the file format 2009-06-25 21:39:04 +02:00
usage.c perf top: Fall back to cpu-clock-tick hrtimer sampling if no cycle counter available 2009-06-07 17:31:52 +02:00
util.h perf_counter tools: Remove dead code 2009-06-27 06:06:39 +02:00
wrapper.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00