Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf script: Add new parameter in kfree_skb tracepoint to the python scripts using it

Include reason parameter that was added in commit c504e5c2f9648a1e
("net: skb: introduce kfree_skb_reason()")

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Link: https://lore.kernel.org/r/20230426104149.14089-1-sriram.yagnaraman@est.tech
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Sriram Yagnaraman and committed by
Arnaldo Carvalho de Melo
69b0e112 0e20f431

+5 -5
+2 -2
tools/perf/scripts/python/net_dropmonitor.py
··· 68 68 get_kallsyms_table() 69 69 print_drop_table() 70 70 71 - # called from perf, when it finds a correspoinding event 71 + # called from perf, when it finds a corresponding event 72 72 def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain, 73 - skbaddr, location, protocol): 73 + skbaddr, location, protocol, reason): 74 74 slocation = str(location) 75 75 try: 76 76 drop_log[slocation] = drop_log[slocation] + 1
+3 -3
tools/perf/scripts/python/netdev-times.py
··· 288 288 all_event_list.append(event_info) 289 289 290 290 def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain, 291 - skbaddr, protocol, location): 291 + skbaddr, location, protocol, reason): 292 292 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 293 - skbaddr, protocol, location) 293 + skbaddr, location, protocol, reason) 294 294 all_event_list.append(event_info) 295 295 296 296 def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr): ··· 430 430 431 431 def handle_kfree_skb(event_info): 432 432 (name, context, cpu, time, pid, comm, 433 - skbaddr, protocol, location) = event_info 433 + skbaddr, location, protocol, reason) = event_info 434 434 for i in range(len(tx_queue_list)): 435 435 skb = tx_queue_list[i] 436 436 if skb['skbaddr'] == skbaddr: