| 5409 | } |
| 5410 | |
| 5411 | static bool |
| 5412 | uma_dbg_kskip(uma_keg_t keg, void *mem) |
| 5413 | { |
| 5414 | uintptr_t idx; |
| 5415 | |
| 5416 | if (dbg_divisor == 0) |
| 5417 | return (true); |
| 5418 | |
| 5419 | if (dbg_divisor == 1) |
| 5420 | return (false); |
| 5421 | |
| 5422 | idx = (uintptr_t)mem >> PAGE_SHIFT; |
| 5423 | if (keg->uk_ipers > 1) { |
| 5424 | idx *= keg->uk_ipers; |
| 5425 | idx += ((uintptr_t)mem & PAGE_MASK) / keg->uk_rsize; |
| 5426 | } |
| 5427 | |
| 5428 | if ((idx / dbg_divisor) * dbg_divisor != idx) { |
| 5429 | counter_u64_add(uma_skip_cnt, 1); |
| 5430 | return (true); |
| 5431 | } |
| 5432 | counter_u64_add(uma_dbg_cnt, 1); |
| 5433 | |
| 5434 | return (false); |
| 5435 | } |
| 5436 | |
| 5437 | /* |
| 5438 | * Set up the slab's freei data such that uma_dbg_free can function. |
no test coverage detected