Lines Matching refs:bt
115 prof_bt_t bt; member
278 unsigned a_len = a->bt.len; in rb_gen()
279 unsigned b_len = b->bt.len; in rb_gen()
281 int ret = memcmp(a->bt.vec, b->bt.vec, comp_len * sizeof(void *)); in rb_gen()
365 prof_log_bt_index(tsd_t *tsd, prof_bt_t *bt) { in prof_log_bt_index() argument
370 dummy_node.bt = *bt; in prof_log_bt_index()
377 (bt->len * sizeof(void *)); in prof_log_bt_index()
395 new_node->bt.len = bt->len; in prof_log_bt_index()
396 memcpy(new_node->vec, bt->vec, bt->len * sizeof(void *)); in prof_log_bt_index()
397 new_node->bt.vec = new_node->vec; in prof_log_bt_index()
488 prof_bt_t bt; in prof_try_log() local
490 bt_init(&bt, cons_tdata->vec); in prof_try_log()
491 prof_backtrace(&bt); in prof_try_log()
492 prof_bt_t *cons_bt = &bt; in prof_try_log()
495 prof_bt_t *prod_bt = &tctx->gctx->bt; in prof_try_log()
540 bt_init(prof_bt_t *bt, void **vec) { in bt_init() argument
543 bt->vec = vec; in bt_init()
544 bt->len = 0; in bt_init()
588 prof_backtrace(prof_bt_t *bt) { in prof_backtrace() argument
592 assert(bt->len == 0); in prof_backtrace()
593 assert(bt->vec != NULL); in prof_backtrace()
595 nframes = unw_backtrace(bt->vec, PROF_BT_MAX); in prof_backtrace()
599 bt->len = nframes; in prof_backtrace()
620 data->bt->vec[data->bt->len] = ip; in prof_unwind_callback()
621 data->bt->len++; in prof_unwind_callback()
622 if (data->bt->len == data->max) { in prof_unwind_callback()
630 prof_backtrace(prof_bt_t *bt) { in prof_backtrace() argument
631 prof_unwind_data_t data = {bt, PROF_BT_MAX}; in prof_backtrace()
639 prof_backtrace(prof_bt_t *bt) { in prof_backtrace() argument
650 bt->vec[(i)] = p; \ in prof_backtrace()
651 bt->len = (i) + 1; \ in prof_backtrace()
802 prof_backtrace(prof_bt_t *bt) { in prof_backtrace() argument
821 prof_gctx_create(tsdn_t *tsdn, prof_bt_t *bt) { in prof_gctx_create() argument
825 size_t size = offsetof(prof_gctx_t, vec) + (bt->len * sizeof(void *)); in prof_gctx_create()
840 memcpy(gctx->vec, bt->vec, bt->len * sizeof(void *)); in prof_gctx_create()
841 gctx->bt.vec = gctx->vec; in prof_gctx_create()
842 gctx->bt.len = bt->len; in prof_gctx_create()
863 if (ckh_remove(tsd, &bt2gctx, &gctx->bt, NULL, NULL)) { in prof_gctx_try_destroy()
925 ckh_remove(tsd, &tdata->bt2tctx, &gctx->bt, NULL, NULL); in prof_tctx_destroy()
988 prof_lookup_global(tsd_t *tsd, prof_bt_t *bt, prof_tdata_t *tdata, in prof_lookup_global() argument
1001 if (ckh_search(&bt2gctx, bt, &btkey.v, &gctx.v)) { in prof_lookup_global()
1004 tgctx.p = prof_gctx_create(tsd_tsdn(tsd), bt); in prof_lookup_global()
1009 if (ckh_search(&bt2gctx, bt, &btkey.v, &gctx.v)) { in prof_lookup_global()
1011 btkey.p = &gctx.p->bt; in prof_lookup_global()
1053 prof_lookup(tsd_t *tsd, prof_bt_t *bt) { in prof_lookup() argument
1069 not_found = ckh_search(&tdata->bt2tctx, bt, NULL, &ret.v); in prof_lookup()
1083 if (prof_lookup_global(tsd, bt, tdata, &btkey, &gctx, in prof_lookup()
1619 const prof_bt_t *bt, prof_gctx_tree_t *gctxs) { in prof_dump_gctx() argument
1642 for (i = 0; i < bt->len; i++) { in prof_dump_gctx()
1644 (uintptr_t)bt->vec[i])) { in prof_dump_gctx()
1810 if (prof_dump_gctx(arg->tsdn, arg->propagate_err, gctx, &gctx->bt, in prof_gctx_dump_iter()
2141 prof_bt_t *bt = (prof_bt_t *)key; in prof_bt_hash() local
2145 hash(bt->vec, bt->len * sizeof(void *), 0x94122f33U, r_hash); in prof_bt_hash()
2164 prof_bt_hash((void *)(&bt_node->bt), r_hash); in prof_bt_node_hash()
2171 return prof_bt_keycomp((void *)(&bt_node1->bt), in prof_bt_node_keycomp()
2172 (void *)(&bt_node2->bt)); in prof_bt_node_keycomp()
2618 for (i = 0; i < bt_node->bt.len; i++) { in prof_log_emit_traces()
2619 malloc_snprintf(buf, buf_sz, "%p", bt_node->bt.vec[i]); in prof_log_emit_traces()