Skip to content

slab ¤

Commands for dealing with Linux kernel slab allocator. Currently, only SLUB is supported.

Some of the code here was inspired from NeatMonster/slabdbg Some of the code here was inspired from osandov/drgn

Classes:

Functions:

Attributes:

parser module-attribute ¤

parser = ArgumentParser(
    description="Prints information about the slab allocator"
)

subparsers module-attribute ¤

subparsers = add_subparsers(dest='command')

parser_list module-attribute ¤

parser_list = add_parser('list', prog='slab list')

parser_info module-attribute ¤

parser_info = add_parser('info', prog='slab info')

parser_contains module-attribute ¤

parser_contains = add_parser('contains', prog='slab contains')

IndentContextManager ¤

IndentContextManager()

Methods:

Attributes:

indent instance-attribute ¤

indent = 0

__enter__ ¤

__enter__() -> None

__exit__ ¤

__exit__(
    exc_type: type[BaseException] | None,
    exc_value: BaseException | None,
    exc_tb: TracebackType | None,
) -> None

print ¤

print(*a, **kw) -> None

slab ¤

slab(command, filter_=None, names=None, verbose=False, addresses=None) -> None

print_slab ¤

print_slab(slab: Slab, indent, verbose: bool) -> None

print_cpu_cache ¤

print_cpu_cache(cpu_cache: CpuCache, verbose: bool, indent) -> None

print_node_cache ¤

print_node_cache(node_cache: NodeCache, verbose: bool, indent) -> None

slab_info ¤

slab_info(name: str, verbose: bool) -> None

slab_list ¤

slab_list(filter_) -> None

slab_contains ¤

slab_contains(address: str) -> None

prints the slab_cache associated with the provided address