linux-stable/Documentation/trace
Masami Hiramatsu (Google) 3a1a229712 tracing/probes: Add symstr type for dynamic events
[ Upstream commit b26a124cbf ]

Add 'symstr' type for storing the kernel symbol as a string data
instead of the symbol address. This allows us to filter the
events by wildcard symbol name.

e.g.
  # echo 'e:wqfunc workqueue.workqueue_execute_start symname=$function:symstr' >> dynamic_events
  # cat events/eprobes/wqfunc/format
  name: wqfunc
  ID: 2110
  format:
  	field:unsigned short common_type;	offset:0;	size:2;	signed:0;
  	field:unsigned char common_flags;	offset:2;	size:1;	signed:0;
  	field:unsigned char common_preempt_count;	offset:3;	size:1;	signed:0;
  	field:int common_pid;	offset:4;	size:4;	signed:1;

  	field:__data_loc char[] symname;	offset:8;	size:4;	signed:1;

  print fmt: " symname=\"%s\"", __get_str(symname)

Note that there is already 'symbol' type which just change the
print format (so it still stores the symbol address in the tracing
ring buffer.) On the other hand, 'symstr' type stores the actual
"symbol+offset/size" data as a string.

Link: https://lore.kernel.org/all/166679930847.1528100.4124308529180235965.stgit@devnote3/

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Stable-dep-of: 66bcf65d6c ("tracing/probes: Fix to avoid double count of the string length on the array")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-03 10:22:30 +02:00
..
coresight Documentation: coresight: Fix documentation issue 2022-01-27 11:05:20 +01:00
postprocess
boottime-trace.rst Documentation: tracing: Add histogram syntax to boot-time tracing 2021-08-16 11:37:21 -04:00
events-kmem.rst
events-msr.rst
events-nmi.rst
events-power.rst
events.rst tracing: Add ustring operation to filtering string pointers 2022-03-08 19:12:33 +01:00
ftrace-design.rst
ftrace-uses.rst
ftrace.rst attr: use consistent sgid stripping checks 2023-03-17 08:49:01 +01:00
function-graph-fold.vim
histogram-design.rst
histogram.rst tracing/histogram: Update document for KEYS_MAX size 2022-11-10 18:15:38 +01:00
hwlat_detector.rst trace/hwlat: Implement the per-cpu mode 2021-06-25 18:23:22 -04:00
index.rst trace: Add timerlat tracer 2021-06-25 19:57:24 -04:00
intel_th.rst
kprobes.rst kprobes: Remove kprobe::fault_handler 2021-06-01 16:00:08 +02:00
kprobetrace.rst tracing/probes: Add symstr type for dynamic events 2023-08-03 10:22:30 +02:00
mmiotrace.rst
osnoise-tracer.rst Documentation: Fix a typo on trace/osnoise-tracer 2021-06-28 14:12:27 -04:00
ring-buffer-design.rst
stm.rst
sys-t.rst
timerlat-tracer.rst trace: Add timerlat tracer 2021-06-25 19:57:24 -04:00
tracepoint-analysis.rst
tracepoints.rst
uprobetracer.rst