| 1205 | } |
| 1206 | |
| 1207 | size_t |
| 1208 | prof_bt_count(void) { |
| 1209 | size_t bt_count; |
| 1210 | tsd_t *tsd; |
| 1211 | prof_tdata_t *tdata; |
| 1212 | |
| 1213 | tsd = tsd_fetch(); |
| 1214 | tdata = prof_tdata_get(tsd, false); |
| 1215 | if (tdata == NULL) { |
| 1216 | return 0; |
| 1217 | } |
| 1218 | |
| 1219 | malloc_mutex_lock(tsd_tsdn(tsd), &bt2gctx_mtx); |
| 1220 | bt_count = ckh_count(&bt2gctx); |
| 1221 | malloc_mutex_unlock(tsd_tsdn(tsd), &bt2gctx_mtx); |
| 1222 | |
| 1223 | return bt_count; |
| 1224 | } |
| 1225 | #endif |
| 1226 | |
| 1227 | static int |