1
0
Fork 0
alistair23-linux/Documentation
Tom Zanussi bd82631d7c tracing: Add support for dynamic strings to synthetic events
Currently, sythetic events only support static string fields such as:

  # echo 'test_latency u64 lat; char somename[32]' > /sys/kernel/debug/tracing/synthetic_events

Which is fine, but wastes a lot of space in the event.

It also prevents the most commonly-defined strings in the existing
trace events e.g. those defined using __string(), from being passed to
synthetic events via the trace() action.

With this change, synthetic events with dynamic fields can be defined:

  # echo 'test_latency u64 lat; char somename[]' > /sys/kernel/debug/tracing/synthetic_events

And the trace() action can be used to generate events using either
dynamic or static strings:

  # echo 'hist:keys=name:lat=common_timestamp.usecs-$ts0:onmatch(sys.event).test_latency($lat,name)' > /sys/kernel/debug/tracing/events

The synthetic event dynamic strings are implemented in the same way as
the existing __data_loc strings and appear as such in the format file.

[ <rostedt@goodmis.org>: added __set_synth_event_print_fmt() changes:

  I added the following to make it work with trace-cmd. Dynamic strings
  must have __get_str() for events in the print_fmt otherwise it can't be
  parsed correctly. ]

Link: https://lore.kernel.org/r/cover.1601588066.git.zanussi@kernel.org
Link: https://lkml.kernel.org/r/3ed35b6d0e390f5b94cb4a9ba1cc18f5982ab277.1601848695.git.zanussi@kernel.org

Tested-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2020-10-05 19:32:18 -04:00
..
ABI powerpc/perf/hv-24x7: Move cpumask file to top folder of hv-24x7 driver 2020-08-21 23:35:27 +10:00
PCI pci-v5.9-changes 2020-08-07 18:48:15 -07:00
RCU docs: Fix function name trailing double-()s 2020-08-24 17:19:07 -06:00
accounting
admin-guide Char / Misc driver fixes for 5.9-rc5 2020-09-13 08:52:21 -07:00
arm ARM development for 5.9-rc1: 2020-08-06 10:17:00 -07:00
arm64 IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
block for-5.9/drivers-20200803 2020-08-05 10:51:40 -07:00
bpf doc: Add link to bpf helpers man page 2020-08-13 22:48:06 +02:00
cdrom A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
core-api A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
cpu-freq
crypto It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
dev-tools A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
devicetree ARM: SoC fixes 2020-09-13 14:54:40 -07:00
doc-guide A handful of late-arriving docs fixes, along with a patch changing a lot of 2020-06-10 14:12:15 -07:00
driver-api drm-misc-fixes for v5.9-rc5: 2020-09-11 09:49:23 +10:00
fault-injection nvme: rename and document nvme_end_request 2020-08-21 17:14:28 -06:00
fb drm next for 5.9-rc1 2020-08-05 19:50:06 -07:00
features A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
filesystems affs: fix basic permission bits to actually work 2020-08-31 12:20:31 +02:00
firmware-guide ACPI: Replace HTTP links with HTTPS ones 2020-07-27 14:47:08 +02:00
firmware_class
fpga Char/Misc driver patches for 5.9-rc1 2020-08-05 11:43:47 -07:00
gpu - Core Frameworks 2020-08-11 13:48:02 -07:00
hid docs: hid: Convert link to https 2020-07-13 11:26:37 -06:00
hwmon Documentation: fix typo for abituguru documentation 2020-08-24 17:19:07 -06:00
i2c Merge branch 'i2c/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2020-08-13 18:41:00 -07:00
ia64 docs: ia64: correct typo 2020-07-31 11:09:09 -06:00
ide
iio
infiniband RDMA/core: Remove FMR device ops 2020-06-02 20:32:54 -03:00
input Input: uinput - fix typo in function name documentation 2020-07-28 18:24:11 -07:00
isdn
kbuild kbuild: Documentation: clean up makefiles.rst 2020-09-03 12:21:22 +09:00
kernel-hacking
leds LEDs changes for 5.9-rc1. 2020-08-05 19:24:27 -07:00
litmus-tests Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test 2020-06-29 12:05:18 -07:00
livepatch
locking Documentation/locking/locktypes: fix local_locks documentation 2020-08-24 17:18:51 -06:00
m68k
maintainer Documentation: add riscv entry in list of existing profiles 2020-08-24 17:19:07 -06:00
mhi
mips It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
misc-devices Documentation: misc/xilinx_sdfec: eliminate duplicated word 2020-07-13 09:44:07 -06:00
netlabel
networking doc: net: dsa: Fix typo in config code sample 2020-09-03 10:38:22 -07:00
nios2
nvdimm
openrisc docs: openrisc: Replace HTTP links with HTTPS ones 2020-07-13 11:34:09 -06:00
parisc
pcmcia
power Merge branches 'pm-sleep', 'pm-domains', 'powercap' and 'pm-tools' 2020-08-03 13:12:44 +02:00
powerpc Documentation/powerpc: fix malformed table in syscall64-abi 2020-08-27 17:40:55 +10:00
process docs: Fix function name trailing double-()s 2020-08-24 17:19:07 -06:00
riscv
s390 It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
scheduler sched/doc: Factorize bits between sched-energy.rst & sched-capacity.rst 2020-08-01 09:19:43 +02:00
scsi scsi: advansys: docs: Eliminate duplicated word 2020-07-08 01:32:11 -04:00
security Documentation: security/keys: eliminate duplicated word 2020-07-13 09:45:03 -06:00
sh docs: sh: convert register-banks.txt to ReST 2020-06-19 14:10:13 -06:00
sound ALSA: hda: use consistent HDAudio spelling in comments/docs 2020-09-02 19:31:32 +02:00
sparc
sphinx Replace HTTP links with HTTPS ones: Documentation/sphinx/parse-headers.pl 2020-06-26 10:57:33 -06:00
sphinx-static
spi SPI SUBSYSTEM: Replace HTTP links with HTTPS ones 2020-07-09 22:41:11 +01:00
staging remoteproc updates for v5.9 2020-08-11 11:17:45 -07:00
target doc: don't use deprecated "---help---" markers in target docs 2020-06-13 13:32:40 -07:00
timers docs: timers: drop documentation about LB_BIAS 2020-07-23 14:32:44 -06:00
trace tracing: Add support for dynamic strings to synthetic events 2020-10-05 19:32:18 -04:00
translations docs: Fix function name trailing double-()s 2020-08-24 17:19:07 -06:00
usb USB: Replace HTTP links with HTTPS ones 2020-07-21 13:41:57 +02:00
userspace-api remoteproc updates for v5.9 2020-08-11 11:17:45 -07:00
virt arm64/x86: KVM: Introduce steal-time cap 2020-08-21 14:05:19 +01:00
vm mm/vmstat: add events for THP migration without split 2020-08-12 10:57:57 -07:00
w1
watchdog watchdog: add support for adjusting last known HW keepalive time 2020-08-05 18:43:02 +02:00
x86 It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
xtensa
.gitignore
COPYING-logo Replace HTTP links with HTTPS ones: documentation 2020-06-08 09:30:19 -06:00
Changes
CodingStyle
Kconfig
Makefile media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
SubmittingPatches
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt Documentation/litmus-tests/atomic: Add a test for smp_mb__after_atomic() 2020-06-29 12:05:18 -07:00
conf.py Replace HTTP links with HTTPS ones: documentation 2020-06-08 09:30:19 -06:00
docutils.conf
dontdiff Documentation: dontdiff: Add zstd compressed files 2020-07-31 11:51:10 +02:00
index.rst docs: index.rst: Add watch_queue 2020-07-23 14:13:23 -06:00
logo.gif
memory-barriers.txt powerpc updates for 5.9 2020-08-07 10:33:50 -07:00
watch_queue.rst