acrn-kernel/Documentation/trace
Masami Hiramatsu (Google) 16cc222026 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:23:54 +02:00
..
coresight perf tools changes for v6.1: 1st batch 2022-10-11 15:02:25 -07:00
postprocess tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
rv rv/monitor: Add the wwnr monitor 2022-07-30 14:01:30 -04:00
boottime-trace.rst docs/trace: fix a label of boottime-trace 2021-12-10 13:58:53 -07:00
events-kmem.rst mm/lru: revise the comments of lru_lock 2020-12-15 14:48:04 -08:00
events-msr.rst
events-nmi.rst
events-power.rst
events.rst tracing: Add ustring operation to filtering string pointers 2022-01-14 03:42:24 -05:00
fprobe.rst docs: fprobe: Add fprobe description to ftrace-use.rst 2022-03-17 20:17:08 -07:00
ftrace-design.rst
ftrace-uses.rst ftrace/documentation: Fix RST C code blocks 2020-11-18 11:45:23 -05:00
ftrace.rst attr: use consistent sgid stripping checks 2023-03-03 11:52:25 +01:00
function-graph-fold.vim
hisi-ptt.rst docs: trace: Add HiSilicon PTT device driver documentation 2022-09-08 18:41:22 -06:00
histogram-design.rst
histogram.rst tracing/histogram: Update document for KEYS_MAX size 2022-10-18 15:41:56 -06:00
hwlat_detector.rst trace/hwlat: Implement the per-cpu mode 2021-06-25 18:23:22 -04:00
index.rst docs: trace: Add HiSilicon PTT device driver documentation 2022-09-08 18:41:22 -06:00
intel_th.rst
kprobes.rst kprobes: kretprobe events missing on 2-core KVM guest 2023-01-04 11:28:58 +01:00
kprobetrace.rst tracing/probes: Add symstr type for dynamic events 2023-08-03 10:23:54 +02:00
mmiotrace.rst
osnoise-tracer.rst docs: Remove duplicated words in trace/osnoise-tracer 2022-02-24 10:42:20 -07:00
ring-buffer-design.rst
stm.rst
sys-t.rst
timerlat-tracer.rst Delete duplicate words from kernel docs 2022-09-27 13:21:43 -06:00
tracepoint-analysis.rst
tracepoints.rst tracepoints: Add helper to test if tracepoint is enabled in a header 2020-09-25 18:01:35 -04:00
uprobetracer.rst tracing: Auto generate event name when creating a group of events 2022-07-24 19:11:17 -04:00
user_events.rst tracing/user_events: Update ABI documentation to align to bits vs bytes 2022-09-29 10:17:37 -04:00