Lines Matching full:cursor
203 fill_node(struct callchain_node *node, struct callchain_cursor *cursor)
207 node->val_nr = cursor->nr - cursor->pos;
211 cursor_node = callchain_cursor_current(cursor);
226 callchain_cursor_advance(cursor);
227 cursor_node = callchain_cursor_current(cursor);
233 struct callchain_cursor *cursor,
239 fill_node(new, cursor);
252 struct callchain_cursor *cursor,
279 if (idx_total < cursor->nr) {
281 add_child(parent, cursor, period);
290 struct callchain_cursor *cursor,
295 struct callchain_cursor *cursor,
302 unsigned int ret = append_chain(rnode, cursor, period);
308 add_child(root, cursor, period);
316 struct callchain_cursor *cursor,
319 struct callchain_cursor_node *curr_snap = cursor->curr;
321 u64 start = cursor->pos;
334 node = callchain_cursor_current(cursor);
349 callchain_cursor_advance(cursor);
354 cursor->curr = curr_snap;
355 cursor->pos = start;
359 matches = cursor->pos - start;
363 split_add_child(root, cursor, cnode, start, matches, period);
368 if (matches == root->val_nr && cursor->pos == cursor->nr) {
374 append_chain_children(root, cursor, period);
380 struct callchain_cursor *cursor,
383 if (!cursor->nr)
386 callchain_cursor_commit(cursor);
388 append_chain_children(&root->node, cursor, period);
390 if (cursor->nr > root->max_depth)
391 root->max_depth = cursor->nr;
397 merge_chain_branch(struct callchain_cursor *cursor,
400 struct callchain_cursor_node **old_last = cursor->last;
403 int old_pos = cursor->nr;
407 callchain_cursor_append(cursor, list->ip,
414 callchain_cursor_commit(cursor);
415 append_chain_children(dst, cursor, src->hit);
419 err = merge_chain_branch(cursor, dst, child);
427 cursor->nr = old_pos;
428 cursor->last = old_last;
433 int callchain_merge(struct callchain_cursor *cursor,
436 return merge_chain_branch(cursor, &dst->node, &src->node);
439 int callchain_cursor_append(struct callchain_cursor *cursor,
442 struct callchain_cursor_node *node = *cursor->last;
449 *cursor->last = node;
456 cursor->nr++;
458 cursor->last = &node->next;