[PATCH 0/2] tracing: resolve enum names for function arguments via BTF

Donglin Peng posted 2 patches 4 days, 22 hours ago
include/linux/btf.h         | 10 ++++++
kernel/bpf/btf.c            | 66 ++++++++++++++++---------------------
kernel/trace/trace_output.c | 11 ++++++-
3 files changed, 48 insertions(+), 39 deletions(-)
[PATCH 0/2] tracing: resolve enum names for function arguments via BTF
Posted by Donglin Peng 4 days, 22 hours ago
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