Skip to content

kmem_trace ¤

Classes:

Functions:

Attributes:

parser module-attribute ¤

parser = ArgumentParser(
    description="\nTrace kernel memory (SLUB and buddy) allocations and frees.\n\nThis command will execute `next` in the debugger, and print out all (de)allocations that happen until\nthe command finishes. As such this makes most sense to call when the PC is on a function call instruction.\nOnly (de)allocations triggered by the current function are considered (rather than other threads etc).\n\nIf neither `-s` nor `-b` are passed, both allocators are traced.\n    "
)

KmemTracepointsData ¤

KmemTracepointsData(verbose, trace_all)

Methods:

Attributes:

results instance-attribute ¤

results = []

order instance-attribute ¤

order = None

mutex instance-attribute ¤

mutex = RLock()

verbose instance-attribute ¤

verbose = verbose

curr instance-attribute ¤

curr = None

add_result ¤

add_result(result: str)

format_slab_kmem_tracepoint_output ¤

format_slab_kmem_tracepoint_output(is_free: bool, objaddr: int)

format_page_kmem_tracepoint_output ¤

format_page_kmem_tracepoint_output(is_free: bool, page: int, order: int)

KmemTracepoints ¤

KmemTracepoints()

Methods:

Attributes:

kallocs instance-attribute ¤

kallocs = resolve_names(kmalloc_names)

kfrees instance-attribute ¤

kfrees = resolve_names(kfree_names)

pallocs instance-attribute ¤

pallocs = resolve_names(palloc_names)

pfrees instance-attribute ¤

pfrees = resolve_names(pfree_names)

sps instance-attribute ¤

sps = []

data instance-attribute ¤

data = None

slab_tracepoints_enabled instance-attribute ¤

slab_tracepoints_enabled = True

buddy_tracepoints_enabled instance-attribute ¤

buddy_tracepoints_enabled = True

resolve_names ¤

resolve_names(names)

kalloc_handler staticmethod ¤

kalloc_handler(sp: StopPoint) -> bool

kfree_handler staticmethod ¤

kfree_handler(sp: StopPoint) -> bool

palloc_handler staticmethod ¤

palloc_handler(sp: StopPoint) -> bool

pfree_handler staticmethod ¤

pfree_handler(sp: StopPoint) -> bool

register_breakpoints ¤

register_breakpoints(verbose, trace_all)

remove_breakpoints ¤

remove_breakpoints()

get_kmem_tracepoints ¤

get_kmem_tracepoints()

kmem_trace ¤

kmem_trace(
    trace_slab: bool, trace_buddy: bool, verbose: bool, command: str, all: bool
) -> None