* [PATCH] perf script: Align kfree_skb tracepoint parameters
@ 2023-04-26 10:41 Sriram Yagnaraman
2023-04-29 1:50 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Sriram Yagnaraman @ 2023-04-26 10:41 UTC (permalink / raw)
To: linux-perf-users, linux-kernel
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter, Sriram Yagnaraman
Not sure if the scripts changed in this patch are used, but nevertheless
here is a patch with a minor bug fix.
---
Include reason parameter that was added in
commit c504e5c2f964 ("net: skb: introduce kfree_skb_reason()")
Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
---
tools/perf/scripts/python/net_dropmonitor.py | 4 ++--
tools/perf/scripts/python/netdev-times.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py
index 101059971738..a97e7a6e0940 100755
--- a/tools/perf/scripts/python/net_dropmonitor.py
+++ b/tools/perf/scripts/python/net_dropmonitor.py
@@ -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
diff --git a/tools/perf/scripts/python/netdev-times.py b/tools/perf/scripts/python/netdev-times.py
index a0cfc7fe5908..00552eeb7178 100644
--- a/tools/perf/scripts/python/netdev-times.py
+++ b/tools/perf/scripts/python/netdev-times.py
@@ -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:
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf script: Align kfree_skb tracepoint parameters
2023-04-26 10:41 [PATCH] perf script: Align kfree_skb tracepoint parameters Sriram Yagnaraman
@ 2023-04-29 1:50 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-04-29 1:50 UTC (permalink / raw)
To: Sriram Yagnaraman
Cc: linux-perf-users, linux-kernel, Peter Zijlstra, Ingo Molnar,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter
Em Wed, Apr 26, 2023 at 12:41:49PM +0200, Sriram Yagnaraman escreveu:
> Not sure if the scripts changed in this patch are used, but nevertheless
> here is a patch with a minor bug fix.
> ---
>
> Include reason parameter that was added in
> commit c504e5c2f964 ("net: skb: introduce kfree_skb_reason()")
Thanks, applied.
- Arnaldo
> Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> ---
> tools/perf/scripts/python/net_dropmonitor.py | 4 ++--
> tools/perf/scripts/python/netdev-times.py | 6 +++---
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py
> index 101059971738..a97e7a6e0940 100755
> --- a/tools/perf/scripts/python/net_dropmonitor.py
> +++ b/tools/perf/scripts/python/net_dropmonitor.py
> @@ -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
> diff --git a/tools/perf/scripts/python/netdev-times.py b/tools/perf/scripts/python/netdev-times.py
> index a0cfc7fe5908..00552eeb7178 100644
> --- a/tools/perf/scripts/python/netdev-times.py
> +++ b/tools/perf/scripts/python/netdev-times.py
> @@ -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:
> --
> 2.34.1
>
--
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-29 1:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-26 10:41 [PATCH] perf script: Align kfree_skb tracepoint parameters Sriram Yagnaraman
2023-04-29 1:50 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).