mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/4] tracing: improve symbolic printing
@ 2026-09-21 10:06 Johannes Berg
  2026-09-21 10:06 ` [PATCH v6 1/4] tracing: add __print_sym() to replace __print_symbolic() Johannes Berg
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Johannes Berg @ 2026-09-21 10:06 UTC (permalink / raw)
  To: linux-trace-kernel, linux-kernel, netdev
  Cc: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers

Hi,

Alright, this took forever, it never quite made it to the top of
my list ... Two years ago Steven reported a crash in v5, and now
I finally really looked into it and realized it was because of
section placement.


v2 was:
 - 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

v3:
 - fix #undef issues
 - fix drop_monitor default
 - rebase on linux-trace/for-next (there were no conflicts)
 - move net patches to 3/4
 - clarify symbol name matching logic (and remove ")" from it)

v4:
 - fix non-module build and possibly dynamic event handling

v5: (https://lore.kernel.org/all/20240614081956.19832-6-johannes@sipsolutions.net/)
 - fix build warning in non-module build

v6: (this version)
 - rebase
 - fix nit from Paolo (I hope, I don't remember changing it
   but it looks fixed!)
 - fix crash due to wrong data placement


To recap, it's annoying to have

 irq/65-iwlwifi:-401   [000]    22.790000: kfree_skb:  ...  reason: 0x20000

and much nicer to see

 irq/65-iwlwifi:-401   [000]    22.790000: kfree_skb:  ...  reason: RX_DROP_MONITOR

but this doesn't work now because __print_symbolic() can only
deal with a hard-coded list (which is actually really big.)

So here's __print_sym() which doesn't build the list into the
kernel image, but creates it at runtime. For userspace, it
will look the same as __print_symbolic() (it literally shows
__print_symbolic() to userspace) so no changes are needed,
but the actual list of values exposed to userspace in there
is built dynamically. For SKB drop reasons, this then has all
the reasons known when userspace queries the trace format.

I guess patches 3/4 should go through net-next, so not sure
how to handle this patch series. Or perhaps, as this will likely
not cause conflicts (in fact I've been rebasing it for years now),
go through tracing anyway with an Ack from netdev? But I can
also just wait for the trace patch(es) to land and resubmit the
net patches after. Assuming this looks good at all :-)

Thanks,
johannes

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

end of thread, other threads:[~2026-09-22 15:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 10:06 [PATCH v6 0/4] tracing: improve symbolic printing Johannes Berg
2026-09-21 10:06 ` [PATCH v6 1/4] tracing: add __print_sym() to replace __print_symbolic() Johannes Berg
2026-09-21 10:06 ` [PATCH v6 2/4] tracing/timer: use __print_sym() Johannes Berg
2026-09-21 10:06 ` [PATCH v6 3/4] net: dropreason: use new __print_sym() in tracing Johannes Berg
2026-09-21 22:03   ` Matthieu Baerts
2026-09-21 22:23     ` Ilya Maximets
2026-09-21 22:36       ` Johannes Berg
2026-09-21 23:20         ` Johannes Berg
2026-09-22  9:01           ` Ilya Maximets
2026-09-22  9:03             ` Johannes Berg
2026-09-22 14:36             ` Adrián Moreno
2026-09-22 15:34             ` Aaron Conole
2026-09-22  7:18       ` Antoine Tenart
2026-09-22  8:48         ` Ilya Maximets
2026-09-22 14:35       ` Adrián Moreno
2026-09-22 14:59         ` Johannes Berg
2026-09-21 10:06 ` [PATCH v6 4/4] net: drop_monitor: use drop_reason_lookup() Johannes Berg
2026-09-21 21:59 ` [PATCH v6 0/4] tracing: improve symbolic printing Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®