MCPcopy Create free account
hub / github.com/beefytech/Beef / prof_dump_gctx_prep

Function prof_dump_gctx_prep

BeefRT/JEMalloc/src/prof_data.c:805–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803}
804
805static void
806prof_dump_gctx_prep(tsdn_t *tsdn, prof_gctx_t *gctx, prof_gctx_tree_t *gctxs) {
807 cassert(config_prof);
808
809 malloc_mutex_lock(tsdn, gctx->lock);
810
811 /*
812 * Increment nlimbo so that gctx won't go away before dump.
813 * Additionally, link gctx into the dump list so that it is included in
814 * prof_dump()'s second pass.
815 */
816 gctx->nlimbo++;
817 gctx_tree_insert(gctxs, gctx);
818
819 memset(&gctx->cnt_summed, 0, sizeof(prof_cnt_t));
820
821 malloc_mutex_unlock(tsdn, gctx->lock);
822}
823
824typedef struct prof_gctx_merge_iter_arg_s prof_gctx_merge_iter_arg_t;
825struct prof_gctx_merge_iter_arg_s {

Callers 1

prof_dump_prepFunction · 0.85

Calls 2

malloc_mutex_lockFunction · 0.85
malloc_mutex_unlockFunction · 0.85

Tested by

no test coverage detected