linux/Documentation/trace
Linus Torvalds d579c468d7 tracing updates for 6.4:
- User events are finally ready!
   After lots of collaboration between various parties, we finally locked
   down on a stable interface for user events that can also work with user
   space only tracing. This is implemented by telling the kernel (or user
   space library, but that part is user space only and not part of this
   patch set), where the variable is that the application uses to know if
   something is listening to the trace. There's also an interface to tell
   the kernel about these events, which will show up in the
   /sys/kernel/tracing/events/user_events/ directory, where it can be
    enabled. When it's enabled, the kernel will update the variable, to tell
   the application to start writing to the kernel.
   See https://lwn.net/Articles/927595/
 
 - Cleaned up the direct trampolines code to simplify arm64 addition of
   direct trampolines. Direct trampolines use the ftrace interface but
   instead of jumping to the ftrace trampoline, applications (mostly BPF)
   can register their own trampoline for performance reasons.
 
 - Some updates to the fprobe infrastructure. fprobes are more efficient than
   kprobes, as it does not need to save all the registers that kprobes on
   ftrace do. More work needs to be done before the fprobes will be exposed
   as dynamic events.
 
 - More updates to references to the obsolete path of
   /sys/kernel/debug/tracing for the new /sys/kernel/tracing path.
 
 - Add a seq_buf_do_printk() helper to seq_bufs, to print a large buffer line
   by line instead of all at once. There's users in production kernels that
   have a large data dump that originally used printk() directly, but the
   data dump was larger than what printk() allowed as a single print.
   Using seq_buf() to do the printing fixes that.
 
 - Add /sys/kernel/tracing/touched_functions that shows all functions that
   was every traced by ftrace or a direct trampoline. This is used for
   debugging issues where a traced function could have caused a crash by
   a bpf program or live patching.
 
 - Add a "fields" option that is similar to "raw" but outputs the fields of
   the events. It's easier to read by humans.
 
 - Some minor fixes and clean ups.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCZEr36xQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6quZHAQCzuqnn2S8DsPd3Sy1vKIYaj0uajW5D
 Kz1oUJH4F0H7kgEA8XwXkdtfKpOXWc/ZH4LWfL7Orx2wJZJQMV9dVqEPDAE=
 =w0Z1
 -----END PGP SIGNATURE-----

Merge tag 'trace-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing updates from Steven Rostedt:

 - User events are finally ready!

   After lots of collaboration between various parties, we finally
   locked down on a stable interface for user events that can also work
   with user space only tracing.

   This is implemented by telling the kernel (or user space library, but
   that part is user space only and not part of this patch set), where
   the variable is that the application uses to know if something is
   listening to the trace.

   There's also an interface to tell the kernel about these events,
   which will show up in the /sys/kernel/tracing/events/user_events/
   directory, where it can be enabled.

   When it's enabled, the kernel will update the variable, to tell the
   application to start writing to the kernel.

   See https://lwn.net/Articles/927595/

 - Cleaned up the direct trampolines code to simplify arm64 addition of
   direct trampolines.

   Direct trampolines use the ftrace interface but instead of jumping to
   the ftrace trampoline, applications (mostly BPF) can register their
   own trampoline for performance reasons.

 - Some updates to the fprobe infrastructure. fprobes are more efficient
   than kprobes, as it does not need to save all the registers that
   kprobes on ftrace do. More work needs to be done before the fprobes
   will be exposed as dynamic events.

 - More updates to references to the obsolete path of
   /sys/kernel/debug/tracing for the new /sys/kernel/tracing path.

 - Add a seq_buf_do_printk() helper to seq_bufs, to print a large buffer
   line by line instead of all at once.

   There are users in production kernels that have a large data dump
   that originally used printk() directly, but the data dump was larger
   than what printk() allowed as a single print.

   Using seq_buf() to do the printing fixes that.

 - Add /sys/kernel/tracing/touched_functions that shows all functions
   that was every traced by ftrace or a direct trampoline. This is used
   for debugging issues where a traced function could have caused a
   crash by a bpf program or live patching.

 - Add a "fields" option that is similar to "raw" but outputs the fields
   of the events. It's easier to read by humans.

 - Some minor fixes and clean ups.

* tag 'trace-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (41 commits)
  ring-buffer: Sync IRQ works before buffer destruction
  tracing: Add missing spaces in trace_print_hex_seq()
  ring-buffer: Ensure proper resetting of atomic variables in ring_buffer_reset_online_cpus
  recordmcount: Fix memory leaks in the uwrite function
  tracing/user_events: Limit max fault-in attempts
  tracing/user_events: Prevent same address and bit per process
  tracing/user_events: Ensure bit is cleared on unregister
  tracing/user_events: Ensure write index cannot be negative
  seq_buf: Add seq_buf_do_printk() helper
  tracing: Fix print_fields() for __dyn_loc/__rel_loc
  tracing/user_events: Set event filter_type from type
  ring-buffer: Clearly check null ptr returned by rb_set_head_page()
  tracing: Unbreak user events
  tracing/user_events: Use print_format_fields() for trace output
  tracing/user_events: Align structs with tabs for readability
  tracing/user_events: Limit global user_event count
  tracing/user_events: Charge event allocs to cgroups
  tracing/user_events: Update documentation for ABI
  tracing/user_events: Use write ABI in example
  tracing/user_events: Add ABI self-test
  ...
2023-04-28 15:57:53 -07:00
..
coresight Documentation: coresight: tpdm: Add dummy comment after sysfs list 2023-01-23 11:59:57 +00:00
postprocess docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07: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 docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
events-nmi.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
events-power.rst PM: QoS: Simplify definitions of CPU latency QoS trace events 2020-02-13 11:26:39 +01:00
events.rst tracing updates for 6.3: 2023-02-23 10:20:49 -08:00
fprobe.rst docs: tracing: Update fprobe documentation 2023-03-28 18:52:23 -04:00
ftrace-design.rst sh/ftrace: Move arch_ftrace_nmi_{enter,exit} into nmi exception 2020-05-19 15:51:18 +02:00
ftrace-uses.rst ftrace/documentation: Fix RST C code blocks 2020-11-18 11:45:23 -05:00
ftrace.rst tracing updates for 6.4: 2023-04-28 15:57:53 -07: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 docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
histogram.rst tracing updates for 6.3: 2023-02-23 10:20:49 -08: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 docs: trace: fix a typo 2020-08-11 10:22:15 -06:00
kprobes.rst kprobes: kretprobe events missing on 2-core KVM guest 2022-12-15 08:48:40 +09:00
kprobetrace.rst probes updates for 6.3: 2023-02-23 13:03:08 -08:00
mmiotrace.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
osnoise-tracer.rst Documentation/osnoise: Add osnoise/options documentation 2022-12-10 13:36:05 -05:00
ring-buffer-design.rst docs: trace: ring-buffer-design.rst: use the new SPDX tag 2020-09-24 11:07:44 -06:00
stm.rst Documentation: trace/stm: drop doubled words 2020-07-05 14:40:55 -06:00
sys-t.rst stm class: Document the MIPI SyS-T protocol usage 2018-10-11 12:12:55 +02:00
timerlat-tracer.rst Delete duplicate words from kernel docs 2022-09-27 13:21:43 -06:00
tracepoint-analysis.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
tracepoints.rst tracepoints: Add helper to test if tracepoint is enabled in a header 2020-09-25 18:01:35 -04:00
uprobetracer.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
user_events.rst tracing/user_events: Update documentation for ABI 2023-03-29 06:52:09 -04:00