Lines Matching refs:lbr_stitch

2343 	struct lbr_stitch *lbr_stitch = thread->lbr_stitch;  in save_lbr_cursor_node()  local
2345 if (!lbr_stitch) in save_lbr_cursor_node()
2349 lbr_stitch->prev_lbr_cursor[idx].valid = false; in save_lbr_cursor_node()
2357 memcpy(&lbr_stitch->prev_lbr_cursor[idx], cursor->curr, in save_lbr_cursor_node()
2360 lbr_stitch->prev_lbr_cursor[idx].valid = true; in save_lbr_cursor_node()
2385 if (thread->lbr_stitch) { in lbr_callchain_add_lbr_ip()
2413 if (thread->lbr_stitch && (cursor->pos != cursor->nr)) { in lbr_callchain_add_lbr_ip()
2466 struct lbr_stitch *lbr_stitch = thread->lbr_stitch; in lbr_callchain_add_stitched_lbr_ip() local
2471 list_for_each_entry(stitch_node, &lbr_stitch->lists, node) { in lbr_callchain_add_stitched_lbr_ip()
2490 struct lbr_stitch *lbr_stitch = thread->lbr_stitch; in get_stitch_node() local
2493 if (!list_empty(&lbr_stitch->free_lists)) { in get_stitch_node()
2494 stitch_node = list_first_entry(&lbr_stitch->free_lists, in get_stitch_node()
2514 struct lbr_stitch *lbr_stitch = thread->lbr_stitch; in has_stitched_lbr() local
2557 if (!lbr_stitch->prev_lbr_cursor[i].valid) in has_stitched_lbr()
2564 memcpy(&stitch_node->cursor, &lbr_stitch->prev_lbr_cursor[i], in has_stitched_lbr()
2568 list_add(&stitch_node->node, &lbr_stitch->lists); in has_stitched_lbr()
2570 list_add_tail(&stitch_node->node, &lbr_stitch->lists); in has_stitched_lbr()
2578 if (thread->lbr_stitch) in alloc_lbr_stitch()
2581 thread->lbr_stitch = zalloc(sizeof(*thread->lbr_stitch)); in alloc_lbr_stitch()
2582 if (!thread->lbr_stitch) in alloc_lbr_stitch()
2585 thread->lbr_stitch->prev_lbr_cursor = calloc(max_lbr + 1, sizeof(struct callchain_cursor_node)); in alloc_lbr_stitch()
2586 if (!thread->lbr_stitch->prev_lbr_cursor) in alloc_lbr_stitch()
2589 INIT_LIST_HEAD(&thread->lbr_stitch->lists); in alloc_lbr_stitch()
2590 INIT_LIST_HEAD(&thread->lbr_stitch->free_lists); in alloc_lbr_stitch()
2595 zfree(&thread->lbr_stitch); in alloc_lbr_stitch()
2620 struct lbr_stitch *lbr_stitch; in resolve_lbr_callchain_sample() local
2636 lbr_stitch = thread->lbr_stitch; in resolve_lbr_callchain_sample()
2639 &lbr_stitch->prev_sample, in resolve_lbr_callchain_sample()
2642 if (!stitched_lbr && !list_empty(&lbr_stitch->lists)) { in resolve_lbr_callchain_sample()
2643 list_replace_init(&lbr_stitch->lists, in resolve_lbr_callchain_sample()
2644 &lbr_stitch->free_lists); in resolve_lbr_callchain_sample()
2646 memcpy(&lbr_stitch->prev_sample, sample, sizeof(*sample)); in resolve_lbr_callchain_sample()