Lines Matching +full:root +full:- +full:node

1 /* SPDX-License-Identifier: GPL-2.0 */
22 #define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace):\n\n"
79 struct callchain_node node;
150 /* Indicate valid cursor node for LBR stitch */
162 struct list_head node;
174 static inline void callchain_init(struct callchain_root *root)
176 INIT_LIST_HEAD(&root->node.val);
177 INIT_LIST_HEAD(&root->node.parent_val);
179 root->node.parent = NULL;
180 root->node.hit = 0;
181 root->node.children_hit = 0;
182 root->node.rb_root_in = RB_ROOT;
183 root->max_depth = 0;
186 static inline u64 callchain_cumul_hits(struct callchain_node *node)
188 return node->hit + node->children_hit;
191 static inline unsigned callchain_cumul_counts(struct callchain_node *node)
193 return node->count + node->children_count;
197 int callchain_append(struct callchain_root *root,
217 cursor->curr = cursor->first;
218 cursor->pos = 0;
225 if (cursor == NULL || cursor->pos == cursor->nr)
228 return cursor->curr;
233 cursor->curr = cursor->curr->next;
234 cursor->pos++;
251 int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node,
266 dest->first = src->curr;
267 dest->nr -= src->pos;
276 return -1;
284 char *callchain_node__scnprintf_value(struct callchain_node *node,
286 int callchain_node__fprintf_value(struct callchain_node *node,
292 void free_callchain(struct callchain_root *root);
293 void decay_callchain(struct callchain_root *root);
294 int callchain_node__make_parent_list(struct callchain_node *node);
296 int callchain_branch_counts(struct callchain_root *root,
309 typedef int (*callchain_iter_fn)(struct callchain_cursor_node *node, void *data);