linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/4] tracing: improve symbolic printing
@ 2024-03-26 19:15 Johannes Berg
  2024-03-26 19:15 ` [RFC PATCH v2 1/4] tracing: add __print_sym() to replace __print_symbolic() Johannes Berg
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Johannes Berg @ 2024-03-26 19:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-trace-kernel, netdev, linux-wireless

As I mentioned before, it's annoying to see this in dropreason tracing
with trace-cmd:

 irq/65-iwlwifi:-401   [000]    22.790000: kfree_skb:            skbaddr=0x6a89b000 protocol=0 location=ieee80211_rx_handlers_result+0x21a reason: 0x20000

and much nicer to see

 irq/65-iwlwifi:-401   [000]    22.790000: kfree_skb:            skbaddr=0x69142000 protocol=0 location=ieee80211_rx_handlers_result+0x21a reason: RX_DROP_MONITOR

The reason for this is that the __print_symbolic() string in tracing
for trace-cmd to parse it is created at build-time, from the long list
of _core_ drop reasons, but the drop reasons are now more dynamic.

So I came up with __print_sym() which is similar, except it doesn't
build the big list of numbers at build time but rather at runtime,
which is actually a big memory saving too. But building it then, at
the time userspace is recording it, lets us include all the known
reasons.

v2:
 - rebased on 6.9-rc1
 - always search for __print_sym() and get rid of the DYNPRINT flag
   and associated code; I think ideally we'll just remove the older
   __print_symbolic() entirely
 - use ':' as the separator instead of "//" since that makes searching
   for it much easier and it's still not a valid char in an identifier
 - fix RCU

johannes


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-27 21:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-26 19:15 [RFC PATCH v2 0/4] tracing: improve symbolic printing Johannes Berg
2024-03-26 19:15 ` [RFC PATCH v2 1/4] tracing: add __print_sym() to replace __print_symbolic() Johannes Berg
2024-03-27 21:11   ` Simon Horman
2024-03-27 21:24     ` Johannes Berg
2024-03-26 19:15 ` [RFC PATCH v2 2/4] net: dropreason: use new __print_sym() in tracing Johannes Berg
2024-03-26 19:15 ` [RFC PATCH v2 3/4] net: drop_monitor: use drop_reason_lookup() Johannes Berg
2024-03-26 19:15 ` [RFC PATCH v2 4/4] tracing/timer: use __print_sym() Johannes Berg

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).