crash.types.slab module

class crash.types.slab.KmemCache(name: str, gdb_obj: gdb.Value)[source]

Bases: object

alien_cache_type_exists = False
static all_find_obj(addr: int) → Optional[Tuple[bool, int, Optional[Dict[str, Union[int, str]]]]][source]
buffer_size_name = None
check_all() → None[source]
check_array_caches() → None[source]
classmethod check_kmem_cache_type(gdbtype: gdb.Type) → None[source]
get_allocated_objects() → Iterable[int][source]
get_array_caches() → Dict[int, Dict[str, Union[int, str]]][source]
get_slabs_of_type(node: gdb.Value, slabtype: int, reverse: bool = False, exact_cycles: bool = False) → Iterable[crash.types.slab.Slab][source]
head_name = 'list'
nodelists_name = None
percpu_cache = None
percpu_name = None
classmethod setup_alien_cache_type(gdbtype: gdb.Type) → None[source]
exception crash.types.slab.KmemCacheNotFound[source]

Bases: RuntimeError

The specified kmem_cache could not be found.

class crash.types.slab.Slab(gdb_obj: gdb.Value, kmem_cache: crash.types.slab.KmemCache, error: bool = False)[source]

Bases: object

check(slabtype: int, nid: int) → int[source]
classmethod check_bufctl_type(gdbtype: gdb.Type) → None[source]
classmethod check_page_type(gdbtype: gdb.Type) → None[source]
classmethod check_slab_type(gdbtype: gdb.Type) → None[source]
contains_obj(addr: int) → Tuple[bool, int, Optional[Dict[str, Union[int, str]]]][source]
find_obj(addr: int) → Optional[int][source]
classmethod from_addr(slab_addr: int, kmem_cache: Union[int, KmemCache]) → crash.types.slab.Slab[source]
classmethod from_list_head(list_head: gdb.Value, kmem_cache: crash.types.slab.KmemCache) → crash.types.slab.Slab[source]
classmethod from_page(page: crash.types.page.Page) → crash.types.slab.Slab[source]
get_allocated_objects() → Iterable[int][source]
get_objects() → Iterable[int][source]
page_slab = False
slab_list_head = 'list'
crash.types.slab.col_bold(msg: str) → str[source]
crash.types.slab.col_error(msg: str) → str[source]
crash.types.slab.kmem_cache_from_addr(addr: int) → crash.types.slab.KmemCache[source]
crash.types.slab.kmem_cache_from_name(name: str) → crash.types.slab.KmemCache[source]
crash.types.slab.kmem_cache_get_all() → ValuesView[crash.types.slab.KmemCache][source]
crash.types.slab.setup_slab_caches(slab_caches: gdb.Symbol) → None[source]
crash.types.slab.slab_from_obj_addr(addr: int) → Optional[crash.types.slab.Slab][source]