Copy the prof data from mutex for processing. */
| 247 | |
| 248 | /* Copy the prof data from mutex for processing. */ |
| 249 | static inline void |
| 250 | malloc_mutex_prof_read(tsdn_t *tsdn, mutex_prof_data_t *data, |
| 251 | malloc_mutex_t *mutex) { |
| 252 | mutex_prof_data_t *source = &mutex->prof_data; |
| 253 | /* Can only read holding the mutex. */ |
| 254 | malloc_mutex_assert_owner(tsdn, mutex); |
| 255 | |
| 256 | /* |
| 257 | * Not *really* allowed (we shouldn't be doing non-atomic loads of |
| 258 | * atomic data), but the mutex protection makes this safe, and writing |
| 259 | * a member-for-member copy is tedious for this situation. |
| 260 | */ |
| 261 | *data = *source; |
| 262 | /* n_wait_thds is not reported (modified w/o locking). */ |
| 263 | atomic_store_u32(&data->n_waiting_thds, 0, ATOMIC_RELAXED); |
| 264 | } |
| 265 | |
| 266 | static inline void |
| 267 | malloc_mutex_prof_accum(tsdn_t *tsdn, mutex_prof_data_t *data, |
no test coverage detected