linux/Documentation/tools/rtla
Linus Torvalds 9e1e9d6602 RTLA patches for v7.1:
- Simplify option parsing
 
   Auto-generate getopt_long() optstring for short options from long options
   array, avoiding the need to specify it manually and reducing the surface for
   mistakes.
 
 - Add unit tests
 
   Implement unit tests (make unit-tests) using libcheck, next to existing
   runtime tests (make check). Currently, three functions from utils.c are
   tested.
 
 - Add --stack-format option
 
   In addition to stopping stack pointer decoding (with -s/--stack option)
   on first unresolvable pointer, allow also skipping unresolvable pointers
   and displaying everything, configurable with a new option.
 
 - Unify number of CPUs into one global variable
 
   Use one global variable, nr_cpus, to store the number of CPUs instead of
   retrieving it and passing it at multiple places.
 
 - Fix behavior in various corner cases
 
   Make RTLA behave correctly in several corner cases: memory allocation
   failure, invalid value read from kernel side, thread creation failure,
   malformed time value input, and read/write failure or interruption by
   signal.
 
 - Improve string handling
 
   Simplify several places in the code that handle strings, including
   parsing of action arguments. A few new helper functions and variables
   are added for that purpose.
 
 - Get rid of magic numbers
 
   Few places handling paths use a magic number of 1024. Replace it with
   MAX_PATH and ARRAY_SIZE() macro.
 
 - Unify threshold handling
 
   Code that handles response to latency threshold is duplicated between
   tools, which has led to bugs in the past. Unify it into a new helper
   as much as possible.
 
 - Fix segfault on SIGINT during cleanup
 
   The SIGINT handler touches dynamically allocated memory. Detach it
   before freeing it during cleanup to prevent segmentation fault and
   discarding of output buffers. Also, properly document SIGINT handling
   while at it.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCad4njhQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qoKkAP0bYgkuqvyBsplZf1Mqil7IRM3tTFni
 XJdkFFr6E6jS/gEAynaf7oq4gz7isvMvZZTOVcl1VflQAjLuY9ezO5LQzw0=
 =mR69
 -----END PGP SIGNATURE-----

Merge tag 'trace-rtla-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull RTLA updates from Steven Rostedt:

 - Simplify option parsing

   Auto-generate getopt_long() optstring for short options from long
   options array, avoiding the need to specify it manually and reducing
   the surface for mistakes.

 - Add unit tests

   Implement unit tests (make unit-tests) using libcheck, next to
   existing runtime tests (make check). Currently, three functions from
   utils.c are tested.

 - Add --stack-format option

   In addition to stopping stack pointer decoding (with -s/--stack
   option) on first unresolvable pointer, allow also skipping
   unresolvable pointers and displaying everything, configurable with a
   new option.

 - Unify number of CPUs into one global variable

   Use one global variable, nr_cpus, to store the number of CPUs instead
   of retrieving it and passing it at multiple places.

 - Fix behavior in various corner cases

   Make RTLA behave correctly in several corner cases: memory allocation
   failure, invalid value read from kernel side, thread creation
   failure, malformed time value input, and read/write failure or
   interruption by signal.

 - Improve string handling

   Simplify several places in the code that handle strings, including
   parsing of action arguments. A few new helper functions and variables
   are added for that purpose.

 - Get rid of magic numbers

   Few places handling paths use a magic number of 1024. Replace it with
   MAX_PATH and ARRAY_SIZE() macro.

 - Unify threshold handling

   Code that handles response to latency threshold is duplicated between
   tools, which has led to bugs in the past. Unify it into a new helper
   as much as possible.

 - Fix segfault on SIGINT during cleanup

   The SIGINT handler touches dynamically allocated memory. Detach it
   before freeing it during cleanup to prevent segmentation fault and
   discarding of output buffers. Also, properly document SIGINT handling
   while at it.

* tag 'trace-rtla-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (28 commits)
  Documentation/rtla: Document SIGINT behavior
  rtla: Fix segfault on multiple SIGINTs
  rtla/utils: Fix loop condition in PID validation
  rtla/utils: Fix resource leak in set_comm_sched_attr()
  rtla/trace: Fix I/O handling in save_trace_to_file()
  rtla/trace: Fix write loop in trace_event_save_hist()
  rtla/timerlat: Simplify RTLA_NO_BPF environment variable check
  rtla: Use str_has_prefix() for option prefix check
  rtla: Enforce exact match for time unit suffixes
  rtla: Use str_has_prefix() for prefix checks
  rtla: Add str_has_prefix() helper function
  rtla: Handle pthread_create() failure properly
  rtla/timerlat: Add bounds check for softirq vector
  rtla: Simplify code by caching string lengths
  rtla: Replace magic number with MAX_PATH
  rtla: Introduce common_threshold_handler() helper
  rtla/actions: Simplify argument parsing
  rtla: Use strdup() to simplify code
  rtla: Exit on memory allocation failures during initialization
  tools/rtla: Remove unneeded nr_cpus from for_each_monitored_cpu
  ...
2026-04-15 17:48:24 -07:00
..
Makefile
common_appendix.txt
common_hist_options.txt
common_options.txt
common_osnoise_description.txt
common_osnoise_options.txt
common_timerlat_aa.txt
common_timerlat_description.txt
common_timerlat_options.txt
common_top_options.txt
index.rst
rtla-hwnoise.rst
rtla-osnoise-hist.rst
rtla-osnoise-top.rst
rtla-osnoise.rst
rtla-timerlat-hist.rst
rtla-timerlat-top.rst
rtla-timerlat.rst
rtla.rst