Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: add percpu allocator tracing to memleak
Add an ability to trace percpu allocations using the memleak tool. Example: ./memleak.py --percpu Attaching to kernel allocators, Ctrl+C to quit. [14:15:46] Top 10 stacks with outstanding allocations: 8 bytes in 1 allocations from stack pcpu_alloc+0x3d8 [kernel] pcpu_alloc+0x3d8 [kernel] perf_trace_event_init+0xc9 [kernel] perf_trace_init+0x69 [kernel] perf_tp_event_init+0x1b [kernel] perf_try_init_event+0x42 [kernel] perf_event_alloc+0x620 [kernel] __do_sys_perf_event_open+0x188 [kernel] do_syscall_64+0x48 [kernel] entry_SYSCALL_64_after_hwframe+0x44 [kernel] 16 bytes in 1 allocations from stack pcpu_alloc+0x3d8 [kernel] pcpu_alloc+0x3d8 [kernel] bpf_prog_alloc+0x33 [kernel] bpf_prog_load+0xf5 [kernel] perf_event_for_each_child+0x34 [kernel] _perf_ioctl+0x1d7 [kernel] alloc_file_pseudo+0xa7 [kernel] __do_sys_bpf+0x953 [kernel] perf_ioctl+0x40 [kernel] do_vfs_ioctl+0xa5 [kernel] do_syscall_64+0x48 [kernel] entry_SYSCALL_64_after_hwframe+0x44 [kernel]
- Loading branch information