Lines Matching refs:lbr_stitch

2452 	struct lbr_stitch *lbr_stitch = thread->lbr_stitch;  in save_lbr_cursor_node()  local
2454 if (!lbr_stitch) in save_lbr_cursor_node()
2458 lbr_stitch->prev_lbr_cursor[idx].valid = false; in save_lbr_cursor_node()
2466 memcpy(&lbr_stitch->prev_lbr_cursor[idx], cursor->curr, in save_lbr_cursor_node()
2469 lbr_stitch->prev_lbr_cursor[idx].valid = true; in save_lbr_cursor_node()
2494 if (thread->lbr_stitch) { in lbr_callchain_add_lbr_ip()
2522 if (thread->lbr_stitch && (cursor->pos != cursor->nr)) { in lbr_callchain_add_lbr_ip()
2575 struct lbr_stitch *lbr_stitch = thread->lbr_stitch; in lbr_callchain_add_stitched_lbr_ip() local
2580 list_for_each_entry(stitch_node, &lbr_stitch->lists, node) { in lbr_callchain_add_stitched_lbr_ip()
2599 struct lbr_stitch *lbr_stitch = thread->lbr_stitch; in get_stitch_node() local
2602 if (!list_empty(&lbr_stitch->free_lists)) { in get_stitch_node()
2603 stitch_node = list_first_entry(&lbr_stitch->free_lists, in get_stitch_node()
2623 struct lbr_stitch *lbr_stitch = thread->lbr_stitch; in has_stitched_lbr() local
2666 if (!lbr_stitch->prev_lbr_cursor[i].valid) in has_stitched_lbr()
2673 memcpy(&stitch_node->cursor, &lbr_stitch->prev_lbr_cursor[i], in has_stitched_lbr()
2677 list_add(&stitch_node->node, &lbr_stitch->lists); in has_stitched_lbr()
2679 list_add_tail(&stitch_node->node, &lbr_stitch->lists); in has_stitched_lbr()
2687 if (thread->lbr_stitch) in alloc_lbr_stitch()
2690 thread->lbr_stitch = zalloc(sizeof(*thread->lbr_stitch)); in alloc_lbr_stitch()
2691 if (!thread->lbr_stitch) in alloc_lbr_stitch()
2694 thread->lbr_stitch->prev_lbr_cursor = calloc(max_lbr + 1, sizeof(struct callchain_cursor_node)); in alloc_lbr_stitch()
2695 if (!thread->lbr_stitch->prev_lbr_cursor) in alloc_lbr_stitch()
2698 INIT_LIST_HEAD(&thread->lbr_stitch->lists); in alloc_lbr_stitch()
2699 INIT_LIST_HEAD(&thread->lbr_stitch->free_lists); in alloc_lbr_stitch()
2704 zfree(&thread->lbr_stitch); in alloc_lbr_stitch()
2729 struct lbr_stitch *lbr_stitch; in resolve_lbr_callchain_sample() local
2745 lbr_stitch = thread->lbr_stitch; in resolve_lbr_callchain_sample()
2748 &lbr_stitch->prev_sample, in resolve_lbr_callchain_sample()
2751 if (!stitched_lbr && !list_empty(&lbr_stitch->lists)) { in resolve_lbr_callchain_sample()
2752 list_replace_init(&lbr_stitch->lists, in resolve_lbr_callchain_sample()
2753 &lbr_stitch->free_lists); in resolve_lbr_callchain_sample()
2755 memcpy(&lbr_stitch->prev_sample, sample, sizeof(*sample)); in resolve_lbr_callchain_sample()