Skip to content

Commit

Permalink
net: use %pS for kfree_skb tracing event location
Browse files Browse the repository at this point in the history
For the cases where 'reason' doesn't give any clue, it's still
nice to be able to track the kfree_skb caller location. %p doesn't
help much so let's use %pS which prints the symbol+offset.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20221123040947.1015721-1-sdf@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Stanislav Fomichev authored and Paolo Abeni committed Nov 24, 2022
1 parent 170d977 commit 14e5f71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/trace/events/skb.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TRACE_EVENT(kfree_skb,
__entry->reason = reason;
),

TP_printk("skbaddr=%p protocol=%u location=%p reason: %s",
TP_printk("skbaddr=%p protocol=%u location=%pS reason: %s",
__entry->skbaddr, __entry->protocol, __entry->location,
__print_symbolic(__entry->reason,
DEFINE_DROP_REASON(FN, FNe)))
Expand Down

0 comments on commit 14e5f71

Please sign in to comment.