MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / prof_dump_gctx_prep

Function prof_dump_gctx_prep

deps/jemalloc/src/prof.c:1449–1466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1447}
1448
1449static void
1450prof_dump_gctx_prep(tsdn_t *tsdn, prof_gctx_t *gctx, prof_gctx_tree_t *gctxs) {
1451 cassert(config_prof);
1452
1453 malloc_mutex_lock(tsdn, gctx->lock);
1454
1455 /*
1456 * Increment nlimbo so that gctx won't go away before dump.
1457 * Additionally, link gctx into the dump list so that it is included in
1458 * prof_dump()'s second pass.
1459 */
1460 gctx->nlimbo++;
1461 gctx_tree_insert(gctxs, gctx);
1462
1463 memset(&gctx->cnt_summed, 0, sizeof(prof_cnt_t));
1464
1465 malloc_mutex_unlock(tsdn, gctx->lock);
1466}
1467
1468struct prof_gctx_merge_iter_arg_s {
1469 tsdn_t *tsdn;

Callers 1

prof_dump_prepFunction · 0.70

Calls 2

malloc_mutex_lockFunction · 0.50
malloc_mutex_unlockFunction · 0.50

Tested by

no test coverage detected