public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] tracing: resolve enum names for function arguments via BTF
@ 2026-02-02 11:15 Donglin Peng
  2026-02-02 11:15 ` [PATCH 1/2] btf: Add for_each_enum and for_each_enum64 helper macros Donglin Peng
  2026-02-02 11:15 ` [PATCH 2/2] tracing: resolve enum names for function arguments via BTF Donglin Peng
  0 siblings, 2 replies; 23+ messages in thread
From: Donglin Peng @ 2026-02-02 11:15 UTC (permalink / raw)
  To: rostedt, ast; +Cc: mhiramat, andrii.nakryiko, linux-kernel, Donglin Peng

From: Donglin Peng <pengdonglin@xiaomi.com>

The print_function_args() function, used for function tracer output,
currently prints values of enum parameters in decimal format, which
reduces readability.

Utilize the BTF information to resolve enum type parameters and print
their symbolic names where possible. This enhances the trace log
readability by displaying meaningful identifiers instead of raw numbers.

Before:
count_memcg_events(memcg=0xffff888005740980, idx=20, count=0x1) {

After:
count_memcg_events(memcg=0xffff888005740980, idx=20 [PGFAULT], count=0x1) {

Donglin Peng (2):
  btf: Add for_each_enum and for_each_enum64 helper macros
  tracing: resolve enum names for function arguments via BTF

 include/linux/btf.h         | 10 ++++++
 kernel/bpf/btf.c            | 66 ++++++++++++++++---------------------
 kernel/trace/trace_output.c | 11 ++++++-
 3 files changed, 48 insertions(+), 39 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-02-08 16:48 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 11:15 [PATCH 0/2] tracing: resolve enum names for function arguments via BTF Donglin Peng
2026-02-02 11:15 ` [PATCH 1/2] btf: Add for_each_enum and for_each_enum64 helper macros Donglin Peng
2026-02-06  0:29   ` Masami Hiramatsu
2026-02-02 11:15 ` [PATCH 2/2] tracing: resolve enum names for function arguments via BTF Donglin Peng
2026-02-02 16:12   ` Steven Rostedt
2026-02-03  2:17     ` Donglin Peng
2026-02-03 13:50       ` Donglin Peng
2026-02-03 15:17         ` Steven Rostedt
2026-02-03 16:00           ` Alexei Starovoitov
2026-02-04 14:52             ` Donglin Peng
2026-02-05  9:21               ` Donglin Peng
2026-02-05 15:56                 ` Alexei Starovoitov
2026-02-06  4:09                   ` Donglin Peng
2026-02-06 16:04                     ` Alexei Starovoitov
2026-02-08 13:08                       ` Donglin Peng
2026-02-05 18:04               ` Steven Rostedt
2026-02-06  4:04                 ` Donglin Peng
2026-02-08 13:07                 ` Donglin Peng
2026-02-08 15:27                   ` Steven Rostedt
2026-02-08 15:42                     ` Donglin Peng
2026-02-08 16:47                       ` Steven Rostedt
2026-02-04 14:16           ` Donglin Peng
2026-02-06  0:12   ` Masami Hiramatsu

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