This series extends fprobe dynamic events to accept a comma-separated list of symbols and explicit/suffixes.
Currently, fprobe only supports a single symbol (or wildcard) per event. This series allow users to specify a comma-separated list of symbols, including exclusions, and to select entry/exit explicitly using / Examples: - f:[GRP/][EVENT] func1,func2,func3 - f:[GRP/][EVENT] func1,!func2,func3 (exclude with '!') Logic changes: - Refactor parsing logic into parse_fprobe_spec() - Support comma-separated lists and '!' exclusions - Add / suffixes for explicit entry/exit selection - Preserve legacy single-symbol behavior (single symbols still accept %return) - Disable BTF-based signature lookup when list/wildcard is used, since one function signature cannot apply to multiple functions - Reject mixed legacy/new syntax where applicable (e.g. list + %return) - Update tracefs/README and fprobe documentation - Add ftrace selftests covering accepted list syntax cases *Patch order is adjusted: code first, then docs, then selftest Changes in v5: - Reordered patches (code->docs->selftests) as suggested - Addressed review feedback on README help text to show both legacy and list syntaxes - Added missing traceprobe error IDs used by the new validation and fixed parsing/bracing issues found by automated builds - Removed the dedicated list_mode field and infer list behavior from presence of filter/nofilter and keep struct trace_probe as the last member - Link to v4: https://lore.kernel.org/linux-trace-kernel/[email protected]/ I am not fully confident the runtime testing coverage that I did is sufficient across configs/architectures, so additional verification would be appreciated. Best regards, Ryan Chung Seokwoo Chung (Ryan) (3): tracing/fprobe: Support comma-separated symbols and :entry/:exit docs: tracing/fprobe: Document list filters and :entry/:exit selftests/ftrace: Add accept cases for fprobe list syntax Documentation/trace/fprobetrace.rst | 18 +++++-- kernel/trace/trace.c | 4 +- kernel/trace/trace_fprobe.c | 49 ++++++++++--------- kernel/trace/trace_probe.h | 2 + .../ftrace/test.d/dynevent/fprobe_list.tc | 2 +- 5 files changed, 47 insertions(+), 28 deletions(-) base-commit: f0c13b210e4366e03bd9e8967347b06b227e20a4 -- 2.43.0
