summaryrefslogtreecommitdiff
path: root/tools/perf/python/net_dropmonitor.py
AgeCommit message (Collapse)Author
2026-09-26perf python: Port net_dropmonitor to perf moduleIan Rogers
Port net_dropmonitor.py from tools/perf/scripts/python/ to a standalone script in tools/perf/python/: - Refactor the script into a DropMonitor class with full type annotations to encapsulate state. - Use perf.session for skb:kfree_skb event processing and add argparse CLI support (-i/--input and -k/--kallsyms). - Resolve kernel drop addresses via perf.session symbols/callchains and binary search over /proc/kallsyms, ignoring zeroed kptr_restrict addresses with graceful fallback when kallsyms is unavailable. - Remove Python 2 compatibility code. Add a shell test (test_net_dropmonitor_python.sh) to verify the standalone script. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>