MCPcopy Create free account
hub / github.com/F-Stack/f-stack / uma_dbg_kskip

Function uma_dbg_kskip

freebsd/vm/uma_core.c:5411–5435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5409}
5410
5411static bool
5412uma_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.

Callers 2

keg_free_slabFunction · 0.85
uma_dbg_zskipFunction · 0.85

Calls 1

counter_u64_addFunction · 0.50

Tested by

no test coverage detected