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

Function prof_dump_gctx_prep

deps/memkind/src/jemalloc/src/prof.c:1178–1195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1176}
1177
1178static void
1179prof_dump_gctx_prep(tsdn_t *tsdn, prof_gctx_t *gctx, prof_gctx_tree_t *gctxs) {
1180 cassert(config_prof);
1181
1182 malloc_mutex_lock(tsdn, gctx->lock);
1183
1184 /*
1185 * Increment nlimbo so that gctx won't go away before dump.
1186 * Additionally, link gctx into the dump list so that it is included in
1187 * prof_dump()'s second pass.
1188 */
1189 gctx->nlimbo++;
1190 gctx_tree_insert(gctxs, gctx);
1191
1192 memset(&gctx->cnt_summed, 0, sizeof(prof_cnt_t));
1193
1194 malloc_mutex_unlock(tsdn, gctx->lock);
1195}
1196
1197struct prof_gctx_merge_iter_arg_s {
1198 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