Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155199
b: refs/heads/master
c: 14f4654
h: refs/heads/master
i:
  155197: f4fd7db
  155195: 699853a
  155191: 6fab287
  155183: 65b2b53
  155167: 46e0391
  155135: 6dd8406
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Jul 2, 2009
1 parent 217eb4b commit 6fb4d90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 429764873cf3fc3e73142872a674bb27cda589c1
refs/heads/master: 14f4654cbd531d48651e005cf05907c14bddb193
9 changes: 6 additions & 3 deletions trunk/tools/perf/util/callchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#include "callchain.h"

#define chain_for_each_child(child, parent) \
list_for_each_entry(child, &parent->children, brothers)


static void
rb_insert_callchain(struct rb_root *root, struct callchain_node *chain)
Expand Down Expand Up @@ -46,7 +49,7 @@ void sort_chain_to_rbtree(struct rb_root *rb_root, struct callchain_node *node)
{
struct callchain_node *child;

list_for_each_entry(child, &node->children, brothers)
chain_for_each_child(child, node)
sort_chain_to_rbtree(rb_root, child);

if (node->hit)
Expand Down Expand Up @@ -77,7 +80,7 @@ create_child(struct callchain_node *parent, bool inherit_children)
list_splice(&parent->children, &new->children);
INIT_LIST_HEAD(&parent->children);

list_for_each_entry(next, &new->children, brothers)
chain_for_each_child(next, new)
next->parent = new;
}
list_add_tail(&new->brothers, &parent->children);
Expand Down Expand Up @@ -173,7 +176,7 @@ __append_chain_children(struct callchain_node *root, struct ip_callchain *chain,
struct callchain_node *rnode;

/* lookup in childrens */
list_for_each_entry(rnode, &root->children, brothers) {
chain_for_each_child(rnode, root) {
unsigned int ret = __append_chain(rnode, chain, start, syms);

if (!ret)
Expand Down

0 comments on commit 6fb4d90

Please sign in to comment.