| 803 | } |
| 804 | |
| 805 | static void |
| 806 | prof_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 | |
| 824 | typedef struct prof_gctx_merge_iter_arg_s prof_gctx_merge_iter_arg_t; |
| 825 | struct prof_gctx_merge_iter_arg_s { |
no test coverage detected