linux/tools/tracing/rtla
Costa Shulyupin 6ea8a20610 rtla: Fix parse_cpu_set() bug introduced by strtoi()
The patch 'Replace atoi() with a robust strtoi()' introduced a bug
in parse_cpu_set(), which relies on partial parsing of the input string.

The function parses CPU specifications like '0-3,5' by incrementing
a pointer through the string. strtoi() rejects strings with trailing
characters, causing parse_cpu_set() to fail on any CPU list with
multiple entries.

Restore the original use of atoi() in parse_cpu_set().

Fixes: 7e9dfccf8f ("rtla: Replace atoi() with a robust strtoi()")
Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20260112192642.212848-2-costa.shul@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-01-13 08:32:52 +01:00
..
example rtla/timerlat: Add example for BPF action program 2026-01-07 15:57:16 +01:00
src rtla: Fix parse_cpu_set() bug introduced by strtoi() 2026-01-13 08:32:52 +01:00
tests rtla/tests: Run Test::Harness in verbose mode 2026-01-07 15:57:16 +01:00
.gitignore rtla: Add generated output files to gitignore 2026-01-07 15:57:55 +01:00
Build tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
Makefile rtla/tests: Run Test::Harness in verbose mode 2026-01-07 15:57:16 +01:00
Makefile.config rtla: Check pkg-config install 2025-08-19 20:32:54 -04:00
Makefile.rtla tools/rtla: Fix unassigned nr_cpus 2025-11-20 13:15:54 +01:00
Makefile.standalone tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
README.txt Documentation/rtla: Include BPF sample collection 2025-04-14 10:42:55 -06:00

RTLA: Real-Time Linux Analysis tools

The rtla meta-tool includes a set of commands that aims to analyze
the real-time properties of Linux. Instead of testing Linux as a black box,
rtla leverages kernel tracing capabilities to provide precise information
about the properties and root causes of unexpected results.

Installing RTLA

RTLA depends on the following libraries and tools:

 - libtracefs
 - libtraceevent
 - libcpupower (optional, for --deepest-idle-state)

For BPF sample collection support, the following extra dependencies are
required:

 - libbpf 1.0.0 or later
 - bpftool with skeleton support
 - clang with BPF CO-RE support

It also depends on python3-docutils to compile man pages.

For development, we suggest the following steps for compiling rtla:

  $ git clone git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
  $ cd libtraceevent/
  $ make
  $ sudo make install
  $ cd ..
  $ git clone git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git
  $ cd libtracefs/
  $ make
  $ sudo make install
  $ cd ..
  $ cd $libcpupower_src
  $ make
  $ sudo make install
  $ cd $rtla_src
  $ make
  $ sudo make install

For further information, please refer to the rtla man page.