Lines Matching refs:bt
162 unsigned a_len = a->bt.len; in rb_gen()
163 unsigned b_len = b->bt.len; in rb_gen()
165 int ret = memcmp(a->bt.vec, b->bt.vec, comp_len * sizeof(void *)); in rb_gen()
259 bt_init(prof_bt_t *bt, void **vec) in bt_init() argument
264 bt->vec = vec; in bt_init()
265 bt->len = 0; in bt_init()
311 prof_backtrace(prof_bt_t *bt) in prof_backtrace() argument
316 assert(bt->len == 0); in prof_backtrace()
317 assert(bt->vec != NULL); in prof_backtrace()
319 nframes = unw_backtrace(bt->vec, PROF_BT_MAX); in prof_backtrace()
322 bt->len = nframes; in prof_backtrace()
345 data->bt->vec[data->bt->len] = ip; in prof_unwind_callback()
346 data->bt->len++; in prof_unwind_callback()
347 if (data->bt->len == data->max) in prof_unwind_callback()
354 prof_backtrace(prof_bt_t *bt) in prof_backtrace() argument
356 prof_unwind_data_t data = {bt, PROF_BT_MAX}; in prof_backtrace()
364 prof_backtrace(prof_bt_t *bt) in prof_backtrace() argument
374 bt->vec[(i)] = p; \ in prof_backtrace()
375 bt->len = (i) + 1; \ in prof_backtrace()
525 prof_backtrace(prof_bt_t *bt) in prof_backtrace() argument
549 prof_gctx_create(tsd_t *tsd, prof_bt_t *bt) in prof_gctx_create() argument
555 vec) + (bt->len * sizeof(void *)), false, tcache_get(tsd, true), in prof_gctx_create()
567 memcpy(gctx->vec, bt->vec, bt->len * sizeof(void *)); in prof_gctx_create()
568 gctx->bt.vec = gctx->vec; in prof_gctx_create()
569 gctx->bt.len = bt->len; in prof_gctx_create()
592 if (ckh_remove(tsd, &bt2gctx, &gctx->bt, NULL, NULL)) in prof_gctx_try_destroy()
650 ckh_remove(tsd, &tdata->bt2tctx, &gctx->bt, NULL, NULL); in prof_tctx_destroy()
708 prof_lookup_global(tsd_t *tsd, prof_bt_t *bt, prof_tdata_t *tdata, in prof_lookup_global() argument
722 if (ckh_search(&bt2gctx, bt, &btkey.v, &gctx.v)) { in prof_lookup_global()
724 gctx.p = prof_gctx_create(tsd, bt); in prof_lookup_global()
729 btkey.p = &gctx.p->bt; in prof_lookup_global()
756 prof_lookup(tsd_t *tsd, prof_bt_t *bt) in prof_lookup() argument
772 not_found = ckh_search(&tdata->bt2tctx, bt, NULL, &ret.v); in prof_lookup()
786 if (prof_lookup_global(tsd, bt, tdata, &btkey, &gctx, in prof_lookup()
1310 prof_dump_gctx(bool propagate_err, prof_gctx_t *gctx, const prof_bt_t *bt, in prof_dump_gctx() argument
1333 for (i = 0; i < bt->len; i++) { in prof_dump_gctx()
1335 (uintptr_t)bt->vec[i])) { in prof_dump_gctx()
1454 if (prof_dump_gctx(propagate_err, gctx, &gctx->bt, gctxs)) { in prof_gctx_dump_iter()
1673 prof_bt_t *bt = (prof_bt_t *)key; in prof_bt_hash() local
1677 hash(bt->vec, bt->len * sizeof(void *), 0x94122f33U, r_hash); in prof_bt_hash()