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

Function prof_tctx_dump_iter

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

Source from the content-addressed store, hash-verified

1122};
1123
1124static prof_tctx_t *
1125prof_tctx_dump_iter(prof_tctx_tree_t *tctxs, prof_tctx_t *tctx, void *opaque) {
1126 struct prof_tctx_dump_iter_arg_s *arg =
1127 (struct prof_tctx_dump_iter_arg_s *)opaque;
1128
1129 malloc_mutex_assert_owner(arg->tsdn, tctx->gctx->lock);
1130
1131 switch (tctx->state) {
1132 case prof_tctx_state_initializing:
1133 case prof_tctx_state_nominal:
1134 /* Not captured by this dump. */
1135 break;
1136 case prof_tctx_state_dumping:
1137 case prof_tctx_state_purgatory:
1138 if (prof_dump_printf(arg->propagate_err,
1139 " t%"FMTu64": %"FMTu64": %"FMTu64" [%"FMTu64": "
1140 "%"FMTu64"]\n", tctx->thr_uid, tctx->dump_cnts.curobjs,
1141 tctx->dump_cnts.curbytes, tctx->dump_cnts.accumobjs,
1142 tctx->dump_cnts.accumbytes)) {
1143 return tctx;
1144 }
1145 break;
1146 default:
1147 not_reached();
1148 }
1149 return NULL;
1150}
1151
1152static prof_tctx_t *
1153prof_tctx_finish_iter(prof_tctx_tree_t *tctxs, prof_tctx_t *tctx, void *arg) {

Callers

nothing calls this directly

Calls 2

prof_dump_printfFunction · 0.70

Tested by

no test coverage detected