Lines Matching refs:bt
162 unsigned a_len = a->bt.len;
163 unsigned b_len = b->bt.len;
165 int ret = memcmp(a->bt.vec, b->bt.vec, comp_len * sizeof(void *));
258 bt_init(prof_bt_t *bt, void **vec)
262 bt->vec = vec;
263 bt->len = 0;
307 prof_backtrace(prof_bt_t *bt)
312 assert(bt->len == 0);
313 assert(bt->vec != NULL);
315 nframes = unw_backtrace(bt->vec, PROF_BT_MAX);
318 bt->len = nframes;
340 data->bt->vec[data->bt->len] = ip;
341 data->bt->len++;
342 if (data->bt->len == data->max)
349 prof_backtrace(prof_bt_t *bt)
351 prof_unwind_data_t data = {bt, PROF_BT_MAX};
359 prof_backtrace(prof_bt_t *bt)
369 bt->vec[(i)] = p; \
370 bt->len = (i) + 1; \
520 prof_backtrace(prof_bt_t *bt)
542 prof_gctx_create(tsdn_t *tsdn, prof_bt_t *bt)
545 * Create a single allocation that has space for vec of length bt->len.
547 size_t size = offsetof(prof_gctx_t, vec) + (bt->len * sizeof(void *));
560 /* Duplicate bt. */
561 memcpy(gctx->vec, bt->vec, bt->len * sizeof(void *));
562 gctx->bt.vec = gctx->vec;
563 gctx->bt.len = bt->len;
585 if (ckh_remove(tsd, &bt2gctx, &gctx->bt, NULL, NULL))
644 ckh_remove(tsd, &tdata->bt2tctx, &gctx->bt, NULL, NULL);
705 prof_lookup_global(tsd_t *tsd, prof_bt_t *bt, prof_tdata_t *tdata,
719 if (ckh_search(&bt2gctx, bt, &btkey.v, &gctx.v)) {
720 /* bt has never been seen before. Insert it. */
721 gctx.p = prof_gctx_create(tsd_tsdn(tsd), bt);
726 btkey.p = &gctx.p->bt;
754 prof_lookup(tsd_t *tsd, prof_bt_t *bt)
770 not_found = ckh_search(&tdata->bt2tctx, bt, NULL, &ret.v);
780 * This thread's cache lacks bt. Look for it in the global
783 if (prof_lookup_global(tsd, bt, tdata, &btkey, &gctx,
1335 const prof_bt_t *bt, prof_gctx_tree_t *gctxs)
1359 for (i = 0; i < bt->len; i++) {
1361 (uintptr_t)bt->vec[i])) {
1521 if (prof_dump_gctx(arg->tsdn, arg->propagate_err, gctx, &gctx->bt,
1830 prof_bt_t *bt = (prof_bt_t *)key;
1834 hash(bt->vec, bt->len * sizeof(void *), 0x94122f33U, r_hash);