linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: linux-perf-users@vger.kernel.org, kernel@pengutronix.de,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH] perf script: netdev-times: add location parameter to consume_skb
Date: Wed, 5 Jun 2024 12:14:30 -0300	[thread overview]
Message-ID: <ZmCA1kzzqXSPzG4z@x1> (raw)
In-Reply-To: <20240605144442.1985270-1-l.stach@pengutronix.de>

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
> 

  reply	other threads:[~2024-06-05 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-06-07 17:51 ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZmCA1kzzqXSPzG4z@x1 \
    --to=acme@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=patchwork-lst@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).