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

Functions:

Attributes:

parser module-attribute ¤

parser = ArgumentParser(
    description="Prints information about the linux kernel's slab allocator SLUB."
)

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')

slab ¤

slab(
    command,
    filter_=None,
    names=None,
    verbose=False,
    addresses=None,
    cpu=None,
    node=None,
    partial_only=False,
    active_only=False,
) -> None

print_slab ¤

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

print_cpu_cache ¤

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

print_node_cache ¤

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

slab_info ¤

slab_info(
    name: str, verbose: bool, cpu: int, node: int, active: bool, partial: bool
) -> None

slab_list ¤

slab_list(filter_) -> None

slab_contains ¤

slab_contains(address: str) -> None

prints the slab_cache associated with the provided address