| 1103 | } |
| 1104 | |
| 1105 | void |
| 1106 | prof_dump_impl(tsd_t *tsd, write_cb_t *prof_dump_write, void *cbopaque, |
| 1107 | prof_tdata_t *tdata, bool leakcheck) { |
| 1108 | malloc_mutex_assert_owner(tsd_tsdn(tsd), &prof_dump_mtx); |
| 1109 | prof_cnt_t cnt_all; |
| 1110 | size_t leak_ngctx; |
| 1111 | prof_gctx_tree_t gctxs; |
| 1112 | prof_dump_prep(tsd, tdata, &cnt_all, &leak_ngctx, &gctxs); |
| 1113 | prof_dump_iter_arg_t prof_dump_iter_arg = {tsd_tsdn(tsd), |
| 1114 | prof_dump_write, cbopaque}; |
| 1115 | prof_dump_header(&prof_dump_iter_arg, &cnt_all); |
| 1116 | gctx_tree_iter(&gctxs, NULL, prof_gctx_dump_iter, &prof_dump_iter_arg); |
| 1117 | prof_gctx_finish(tsd, &gctxs); |
| 1118 | if (leakcheck) { |
| 1119 | prof_leakcheck(&cnt_all, leak_ngctx); |
| 1120 | } |
| 1121 | } |
| 1122 | |
| 1123 | /* Used in unit tests. */ |
| 1124 | void |
no test coverage detected