Skip to content

tracing: resolve enum names for function arguments via BTF

Donglin Peng bpf linux-trace-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btf: Add for_each_enum and for_each_enum64 helper macrosinclude/linux/btf.h kernel/bpf/btf.c+38 -381 reply
2/2tracing: resolve enum names for function arguments via BTFkernel/trace/trace_output.c+10 -119 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMasami Hiramatsu (Google)
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

From: Donglin Peng <[email protected]>

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(-)
Signature · 1 line
2.34.1