| 1176 | } |
| 1177 | |
| 1178 | static void |
| 1179 | prof_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 | |
| 1197 | struct prof_gctx_merge_iter_arg_s { |
| 1198 | tsdn_t *tsdn; |
no test coverage detected