1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/Documentation/trace
Linus Torvalds e8744fbc83 tracing updates for v6.14:
- Cleanup with guard() and free() helpers
 
   There were several places in the code that had a lot of "goto out" in the
   error paths to either unlock a lock or free some memory that was
   allocated. But this is error prone. Convert the code over to use the
   guard() and free() helpers that let the compiler unlock locks or free
   memory when the function exits.
 
 - Update the Rust tracepoint code to use the C code too
 
   There was some duplication of the tracepoint code for Rust that did the
   same logic as the C code. Add a helper that makes it possible for both
   algorithms to use the same logic in one place.
 
 - Add poll to trace event hist files
 
   It is useful to know when an event is triggered, or even with some
   filtering. Since hist files of events get updated when active and the
   event is triggered, allow applications to poll the hist file and wake up
   when an event is triggered. This will let the application know that the
   event it is waiting for happened.
 
 - Add :mod: command to enable events for current or future modules
 
   The function tracer already has a way to enable functions to be traced in
   modules by writing ":mod:<module>" into set_ftrace_filter. That will
   enable either all the functions for the module if it is loaded, or if it
   is not, it will cache that command, and when the module is loaded that
   matches <module>, its functions will be enabled. This also allows init
   functions to be traced. But currently events do not have that feature.
 
   Add the command where if ':mod:<module>' is written into set_event, then
   either all the modules events are enabled if it is loaded, or cache it so
   that the module's events are enabled when it is loaded. This also works
   from the kernel command line, where "trace_event=:mod:<module>", when the
   module is loaded at boot up, its events will be enabled then.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCZ5EbMxQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qkZsAP9Amgx9frSbR1pn1t0I3wVnQx7khgOu
 s/b8Ro+vjTx1/QD/RN2AA7f+HK4F27w3Aqfrs0nKXAPtXWsJ9Epp8raG5w8=
 =Pg+4
 -----END PGP SIGNATURE-----

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

Pull tracing updates from Steven Rostedt:

 - Cleanup with guard() and free() helpers

   There were several places in the code that had a lot of "goto out" in
   the error paths to either unlock a lock or free some memory that was
   allocated. But this is error prone. Convert the code over to use the
   guard() and free() helpers that let the compiler unlock locks or free
   memory when the function exits.

 - Update the Rust tracepoint code to use the C code too

   There was some duplication of the tracepoint code for Rust that did
   the same logic as the C code. Add a helper that makes it possible for
   both algorithms to use the same logic in one place.

 - Add poll to trace event hist files

   It is useful to know when an event is triggered, or even with some
   filtering. Since hist files of events get updated when active and the
   event is triggered, allow applications to poll the hist file and wake
   up when an event is triggered. This will let the application know
   that the event it is waiting for happened.

 - Add :mod: command to enable events for current or future modules

   The function tracer already has a way to enable functions to be
   traced in modules by writing ":mod:<module>" into set_ftrace_filter.
   That will enable either all the functions for the module if it is
   loaded, or if it is not, it will cache that command, and when the
   module is loaded that matches <module>, its functions will be
   enabled. This also allows init functions to be traced. But currently
   events do not have that feature.

   Add the command where if ':mod:<module>' is written into set_event,
   then either all the modules events are enabled if it is loaded, or
   cache it so that the module's events are enabled when it is loaded.
   This also works from the kernel command line, where
   "trace_event=:mod:<module>", when the module is loaded at boot up,
   its events will be enabled then.

* tag 'trace-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (26 commits)
  tracing: Fix output of set_event for some cached module events
  tracing: Fix allocation of printing set_event file content
  tracing: Rename update_cache() to update_mod_cache()
  tracing: Fix #if CONFIG_MODULES to #ifdef CONFIG_MODULES
  selftests/ftrace: Add test that tests event :mod: commands
  tracing: Cache ":mod:" events for modules not loaded yet
  tracing: Add :mod: command to enabled module events
  selftests/tracing: Add hist poll() support test
  tracing/hist: Support POLLPRI event for poll on histogram
  tracing/hist: Add poll(POLLIN) support on hist file
  tracing: Fix using ret variable in tracing_set_tracer()
  tracepoint: Reduce duplication of __DO_TRACE_CALL
  tracing/string: Create and use __free(argv_free) in trace_dynevent.c
  tracing: Switch trace_stat.c code over to use guard()
  tracing: Switch trace_stack.c code over to use guard()
  tracing: Switch trace_osnoise.c code over to use guard() and __free()
  tracing: Switch trace_events_synth.c code over to use guard()
  tracing: Switch trace_events_filter.c code over to use guard()
  tracing: Switch trace_events_trigger.c code over to use guard()
  tracing: Switch trace_events_hist.c code over to use guard()
  ...
2025-01-23 17:51:16 -08:00
..
coresight Documentation: coresight: Add cc_threshold tunable 2023-11-16 11:35:09 +00:00
postprocess mm, vmscan: remove ISOLATE_UNMAPPED 2023-10-04 10:32:29 -07:00
rv Documentation/rv: Fix typos 2024-12-13 08:42:23 -07:00
boottime-trace.rst docs/trace: fix a label of boottime-trace 2021-12-10 13:58:53 -07:00
debugging.rst tracing/Documentation: Start a document on how to debug with tracing 2024-08-26 13:54:08 -04: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: Cache ":mod:" events for modules not loaded yet 2025-01-16 09:41:08 -05:00
fprobe.rst Documentation: probes: Update fprobe on function-graph tracer 2024-12-26 10:50:06 -05:00
fprobetrace.rst Documentation: tracing: Fix spelling mistakes 2024-05-07 08:00:25 -06:00
ftrace-design.rst function_graph: Everyone uses HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, remove it 2024-06-11 11:18:24 -04:00
ftrace-uses.rst Documentation/trace: Fixed typos in the ftrace FLAGS section 2024-01-03 14:15:53 -07:00
ftrace.rst ftrace: Document that multiple function_graph tracing may have different times 2025-01-14 10:45:24 -05:00
function-graph-fold.vim tracing: Add vim script to enable folding for function_graph traces 2009-08-26 00:32:04 -04:00
hisi-ptt.rst Documentation: ABI + trace: hisi_ptt: update paths to bus/event_source 2024-05-02 11:36:11 +01:00
histogram-design.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
histogram.rst tracing: doc: Fix typo in ftrace histogram 2024-10-07 11:50:54 -06:00
hwlat_detector.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
index.rst docs: fix WARNING document not included in any toctree 2024-10-07 11:50:54 -06:00
intel_th.rst docs: trace: fix a typo 2020-08-11 10:22:15 -06:00
kprobes.rst docs, kprobes: Add riscv as supported architecture 2024-05-02 10:05:25 -06:00
kprobetrace.rst Probes updates for v6.10: 2024-05-17 18:29:30 -07:00
mmiotrace.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
osnoise-tracer.rst rtla/osnoise: set the default threshold to 1us 2024-07-01 18:54:31 -04:00
ring-buffer-design.rst docs: trace: ring-buffer-design.rst: use the new SPDX tag 2020-09-24 11:07:44 -06:00
ring-buffer-map.rst Documentation: tracing: Add ring-buffer mapping 2024-05-13 18:09:56 -04: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 tracing/timerlat: Add user-space interface 2023-06-22 10:39:56 -04:00
tracepoint-analysis.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
tracepoints.rst trace doc: Minor grammatical correction 2024-04-02 10:07:51 -06:00
uprobetracer.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
user_events.rst tracing/user_events: Document multi-format flag 2024-03-18 10:13:16 -04:00