History

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()")

Sriram Yagnaraman committed 3 years ago

Commit 69b0e111 parent 0e20f432 files · +5 −5Browse files

Showing the changes to tools/perf/scripts/python (2 of 2 files). Show all

Unified · Split

2 files
  1. tools/perf/scripts/python/net_dropmonitor.py +2 −2
  2. tools/perf/scripts/python/netdev-times.py +3 −3
tools/perf/scripts/python/net_dropmonitor.py+2−2
@@ -68,9 +68,9 @@ def trace_end(): · 67 unmodified lines
6868 get_kallsyms_table()
6969 print_drop_table()
7070
71−# called from perf, when it finds a correspoinding event
71+# called from perf, when it finds a corresponding event
7272 def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
73− skbaddr, location, protocol):
73+ skbaddr, location, protocol, reason):
7474 slocation = str(location)
7575 try:
7676 drop_log[slocation] = drop_log[slocation] + 1
tools/perf/scripts/python/netdev-times.py+3−3
@@ -288,9 +288,9 @@ def net__net_dev_xmit(name, context, cpu, sec, nsec, pid, comm, callchain, · 287 unmodified lines
288288 all_event_list.append(event_info)
289289
290290 def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
291− skbaddr, protocol, location):
291+ skbaddr, location, protocol, reason):
292292 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
293− skbaddr, protocol, location)
293+ skbaddr, location, protocol, reason)
294294 all_event_list.append(event_info)
295295
296296 def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr):
@@ -430,7 +430,7 @@ def handle_net_dev_xmit(event_info): · 133 unmodified lines
430430
431431 def handle_kfree_skb(event_info):
432432 (name, context, cpu, time, pid, comm,
433− skbaddr, protocol, location) = event_info
433+ skbaddr, location, protocol, reason) = event_info
434434 for i in range(len(tx_queue_list)):
435435 skb = tx_queue_list[i]
436436 if skb['skbaddr'] == skbaddr:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t