Skip to content

tracing: Have bpf and perf reuse the tracefs TRACE_EVENT macros

Steven Rostedt bpf linux-trace-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2perf/tracing: Use stage6 of tracing to not duplicate macrosinclude/trace/perf.h include/trace/stages/stage6_event_callback.h+4 -451 reply
2/2bpf/tracing: Use stage6 of tracing to not duplicate macrosinclude/trace/bpf_probe.h+1 -441 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAlexei StarovoitovPeter Zijlstra (Intel)
1/2A-b
2/2A-b

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: Have bpf and perf reuse the tracefs TRACE_EVENT macros

When reviewing Linyu Yuan patches[1] where the change was to move most the macros from perf and bpf into stages, I realized that the macros that makes up perf and bpf events are duplicated from the tracefs macros that were moved into the stages directory. One reason to move them into that directory was to remove duplicate code.

Remove the macros that are duplicated in the bpf and perf code and use stage 6, which is the macros used to build the data needed to record the TRACE_EVENT() TP_fast_assign() into the trace. This will mean they will pick up bug fixes, as well as any enhacements that are added.

[1] https://lore.kernel.org/lkml/[email protected]/

Steven Rostedt (Google) (2):
perf/tracing: Use stage6 of tracing to not duplicate macros bpf/tracing: Use stage6 of tracing to not duplicate macros

----

 include/trace/bpf_probe.h                    | 45 +--------------------------
 include/trace/perf.h                         | 46 +---------------------------
 include/trace/stages/stage6_event_callback.h |  3 ++
 3 files changed, 5 insertions(+), 89 deletions(-)