Lines Matching defs:node
75 __sort_chain_flat(struct rb_root *rb_root, struct callchain_node *node,
80 chain_for_each_child(child, node)
83 if (node->hit && node->hit >= min_hit)
84 rb_insert_callchain(rb_root, node, CHAIN_FLAT);
95 __sort_chain_flat(rb_root, &root->node, min_hit);
98 static void __sort_chain_graph_abs(struct callchain_node *node,
103 node->rb_root = RB_ROOT;
105 chain_for_each_child(child, node) {
108 rb_insert_callchain(&node->rb_root, child,
117 __sort_chain_graph_abs(&chain_root->node, min_hit);
118 rb_root->rb_node = chain_root->node.rb_root.rb_node;
121 static void __sort_chain_graph_rel(struct callchain_node *node,
127 node->rb_root = RB_ROOT;
128 min_hit = ceil(node->children_hit * min_percent);
130 chain_for_each_child(child, node) {
133 rb_insert_callchain(&node->rb_root, child,
142 __sort_chain_graph_rel(&chain_root->node, param->min_percent / 100.0);
143 rb_root->rb_node = chain_root->node.rb_root.rb_node;
199 * Fill the node with callchain values
202 fill_node(struct callchain_node *node, struct callchain_cursor *cursor)
206 node->val_nr = cursor->nr - cursor->pos;
207 if (!node->val_nr)
208 pr_warning("Warning: empty node in callchain tree\n");
223 list_add_tail(&call->list, &node->val);
306 /* nothing in children, add to the current node */
325 * Lookup in the current node
331 struct callchain_cursor_node *node;
334 node = callchain_cursor_current(cursor);
335 if (!node)
338 sym = node->sym;
344 } else if (cnode->ip != node->ip)
362 /* we match only a part of the node. Split it and add the new chain */
374 /* We match the node and still have a part remaining */
389 append_chain_children(&root->node, cursor, period);
437 return merge_chain_branch(cursor, &dst->node, &src->node);
443 struct callchain_cursor_node *node = *cursor->last;
445 if (!node) {
446 node = calloc(1, sizeof(*node));
447 if (!node)
450 *cursor->last = node;
453 node->ip = ip;
454 node->map = map;
455 node->sym = sym;
459 cursor->last = &node->next;