tracing: Auto generate event name when creating a group of events
authorLinyu Yuan <quic_linyyuan@quicinc.com>
Mon, 27 Jun 2022 02:19:07 +0000 (10:19 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 24 Jul 2022 23:11:17 +0000 (19:11 -0400)
commit95c104c378dc7d4cb3fb9f289dc5354bfc285fe0
tree0d2657d250a3e22ab08e4250f34db9adc2d50650
parentf360ea5641dc9473ad485e882c8ac3b1aa2672ff
tracing: Auto generate event name when creating a group of events

Currently when creating a specific group of trace events,
take kprobe event as example, the user must use the following format:
p:GRP/EVENT [MOD:]KSYM[+OFFS]|KADDR [FETCHARGS],
which means user must enter EVENT name, one example is:

  echo 'p:usb_gadget/config_usb_cfg_link config_usb_cfg_link $arg1' >> kprobe_events

It is not simple if there are too many entries because the event name is
the same as symbol name.

This change allows user to specify no EVENT name, format changed as:

   p:GRP/ [MOD:]KSYM[+OFFS]|KADDR [FETCHARGS]

It will generate event name automatically and one example is:

  echo 'p:usb_gadget/ config_usb_cfg_link $arg1' >> kprobe_events.

Link: https://lore.kernel.org/all/1656296348-16111-4-git-send-email-quic_linyyuan@quicinc.com/
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Documentation/trace/kprobetrace.rst
Documentation/trace/uprobetracer.rst
kernel/trace/trace.c
kernel/trace/trace_dynevent.c
kernel/trace/trace_eprobe.c
kernel/trace/trace_kprobe.c
kernel/trace/trace_probe.c
kernel/trace/trace_uprobe.c