| 1447 | } |
| 1448 | |
| 1449 | static void |
| 1450 | prof_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 | |
| 1468 | struct prof_gctx_merge_iter_arg_s { |
| 1469 | tsdn_t *tsdn; |
no test coverage detected