]> Git Repo - linux.git/commitdiff
perf script: Add new parameter in kfree_skb tracepoint to the python scripts using it
authorSriram Yagnaraman <[email protected]>
Wed, 26 Apr 2023 10:41:49 +0000 (12:41 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Tue, 2 May 2023 11:36:14 +0000 (08:36 -0300)
Include reason parameter that was added in commit c504e5c2f9648a1e
("net: skb: introduce kfree_skb_reason()")

Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sriram Yagnaraman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/scripts/python/net_dropmonitor.py
tools/perf/scripts/python/netdev-times.py

index 101059971738100412f5a71c2c342e91b8a1c7d4..a97e7a6e094004c41c36e7910222161851a3f8b3 100755 (executable)
@@ -68,9 +68,9 @@ def trace_end():
        get_kallsyms_table()
        print_drop_table()
 
-# called from perf, when it finds a correspoinding event
+# called from perf, when it finds a corresponding event
 def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
-                  skbaddr, location, protocol):
+                  skbaddr, location, protocol, reason):
        slocation = str(location)
        try:
                drop_log[slocation] = drop_log[slocation] + 1
index a0cfc7fe5908fe871b150bca58c67de54afd213b..00552eeb717821ed0fc43692314f66387c7b7627 100644 (file)
@@ -288,9 +288,9 @@ def net__net_dev_xmit(name, context, cpu, sec, nsec, pid, comm, callchain,
        all_event_list.append(event_info)
 
 def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
-                       skbaddr, protocol, location):
+                       skbaddr, location, protocol, reason):
        event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
-                       skbaddr, protocol, location)
+                       skbaddr, location, protocol, reason)
        all_event_list.append(event_info)
 
 def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr):
@@ -430,7 +430,7 @@ def handle_net_dev_xmit(event_info):
 
 def handle_kfree_skb(event_info):
        (name, context, cpu, time, pid, comm,
-               skbaddr, protocol, location) = event_info
+               skbaddr, location, protocol, reason) = event_info
        for i in range(len(tx_queue_list)):
                skb = tx_queue_list[i]
                if skb['skbaddr'] == skbaddr:
This page took 0.075076 seconds and 4 git commands to generate.