* [PATCH] perf script: netdev-times: add location parameter to consume_skb
@ 2024-06-05 14:44 Lucas Stach
2024-06-05 15:14 ` Arnaldo Carvalho de Melo
2024-06-07 17:51 ` Namhyung Kim
0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2024-06-05 14:44 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: linux-perf-users, kernel, patchwork-lst
dd1b527831a3 ("net: add location to trace_consume_skb()") added a new
parameter to the consume_skb tracepoint. Adapt the script to match.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
tools/perf/scripts/python/netdev-times.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/scripts/python/netdev-times.py b/tools/perf/scripts/python/netdev-times.py
index 00552eeb7178..30c4bccee5b2 100644
--- a/tools/perf/scripts/python/netdev-times.py
+++ b/tools/perf/scripts/python/netdev-times.py
@@ -293,7 +293,8 @@ def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
skbaddr, location, protocol, reason)
all_event_list.append(event_info)
-def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr):
+def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
+ skbaddr, location):
event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
skbaddr)
all_event_list.append(event_info)
--
2.45.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf script: netdev-times: add location parameter to consume_skb
2024-06-05 14:44 [PATCH] perf script: netdev-times: add location parameter to consume_skb Lucas Stach
@ 2024-06-05 15:14 ` Arnaldo Carvalho de Melo
2024-06-07 17:51 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-06-05 15:14 UTC (permalink / raw)
To: Lucas Stach; +Cc: linux-perf-users, kernel, patchwork-lst
On Wed, Jun 05, 2024 at 04:44:42PM +0200, Lucas Stach wrote:
> dd1b527831a3 ("net: add location to trace_consume_skb()") added a new
> parameter to the consume_skb tracepoint. Adapt the script to match.
From what I could see from
tools/perf/util/scripting-engines/trace-event-python.c this will work
with older kernels where this tracepoint field isn't available, but
since I haven't actually tested this with an old kernel without it:
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Thanks,
- Arnaldo
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> tools/perf/scripts/python/netdev-times.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/scripts/python/netdev-times.py b/tools/perf/scripts/python/netdev-times.py
> index 00552eeb7178..30c4bccee5b2 100644
> --- a/tools/perf/scripts/python/netdev-times.py
> +++ b/tools/perf/scripts/python/netdev-times.py
> @@ -293,7 +293,8 @@ def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
> skbaddr, location, protocol, reason)
> all_event_list.append(event_info)
>
> -def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr):
> +def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, callchain,
> + skbaddr, location):
> event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
> skbaddr)
> all_event_list.append(event_info)
> --
> 2.45.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf script: netdev-times: add location parameter to consume_skb
2024-06-05 14:44 [PATCH] perf script: netdev-times: add location parameter to consume_skb Lucas Stach
2024-06-05 15:14 ` Arnaldo Carvalho de Melo
@ 2024-06-07 17:51 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2024-06-07 17:51 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Lucas Stach
Cc: linux-perf-users, kernel, patchwork-lst
On Wed, 05 Jun 2024 16:44:42 +0200, Lucas Stach wrote:
> dd1b527831a3 ("net: add location to trace_consume_skb()") added a new
> parameter to the consume_skb tracepoint. Adapt the script to match.
>
>
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-07 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 14:44 [PATCH] perf script: netdev-times: add location parameter to consume_skb Lucas Stach
2024-06-05 15:14 ` Arnaldo Carvalho de Melo
2024-06-07 17:51 ` Namhyung Kim
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).