| 157 | } |
| 158 | |
| 159 | static void |
| 160 | prof_leave(tsd_t *tsd, prof_tdata_t *tdata) { |
| 161 | cassert(config_prof); |
| 162 | assert(tdata == prof_tdata_get(tsd, false)); |
| 163 | |
| 164 | malloc_mutex_unlock(tsd_tsdn(tsd), &bt2gctx_mtx); |
| 165 | |
| 166 | if (tdata != NULL) { |
| 167 | bool idump, gdump; |
| 168 | |
| 169 | assert(tdata->enq); |
| 170 | tdata->enq = false; |
| 171 | idump = tdata->enq_idump; |
| 172 | tdata->enq_idump = false; |
| 173 | gdump = tdata->enq_gdump; |
| 174 | tdata->enq_gdump = false; |
| 175 | |
| 176 | if (idump) { |
| 177 | prof_idump(tsd_tsdn(tsd)); |
| 178 | } |
| 179 | if (gdump) { |
| 180 | prof_gdump(tsd_tsdn(tsd)); |
| 181 | } |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | static prof_gctx_t * |
| 186 | prof_gctx_create(tsdn_t *tsdn, prof_bt_t *bt) { |
no test coverage detected