From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6174D3E0C7A for ; Tue, 14 Apr 2026 11:43:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776167019; cv=none; b=P/ix/lkmGWFfCtSLOBCod+m5GGB5odb6goVtz1DyWTk0ZXT+6utz+J2VxJ+AVVE60U2cbvkzhwwFuyw99i2xfR2+wJQaiPxOA05qRE/mobe1vai4Ae3QvaOWxz4RhXlWcUhvAylBxK85LCMx28S+snrmSFr7ksBKrqea1E19ajs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776167019; c=relaxed/simple; bh=50tPLPab9w4i1TDJ0IAxmGp9OuuYqhO9lscf6Quoswc=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=DdTdrgBvPce/b4lw/j844regSM3q2DFm4vHt/4NQM1tTN6P/DK1Ob5XfvqAKw+7dhy19yMwbklvuCPWiZ7XcP6gBCRF23J0pDHP5e5MPldamu6W7J+gJS8JfzadbI/ehg1UTD0EnToHFoZiMYdPylgbMoC9DFOXAXH+taJCbH1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; arc=none smtp.client-ip=216.40.44.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Received: from omf17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0C33813B05E; Tue, 14 Apr 2026 11:43:36 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf17.hostedemail.com (Postfix) with ESMTPA id C227019; Tue, 14 Apr 2026 11:43:33 +0000 (UTC) Date: Tue, 14 Apr 2026 07:43:31 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Costa Shulyupin , Tomas Glozar , Wander Lairson Costa , John Kacur Subject: [GIT PULL] RTLA: Updates for v7.1 Message-ID: <20260414074331.235cfd51@robin> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: cmuj8tpwqjd7chibhz56t9ikwpaxqf39 X-Rspamd-Server: rspamout08 X-Rspamd-Queue-Id: C227019 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX1+yz0V/k3svgm5CjRymzYDapjd0riSgZUQ= X-HE-Tag: 1776167013-892818 X-HE-Meta: U2FsdGVkX19PVr0Bn87FAgkSG8oXOKM/DCVjZTmLbWGEH/cDoWD2SMz8A6URwpYNkwzl1edWCjPCCOYUDXvNGZ6GR/YkluLtVzRXR5FC9AYEx5/Q0Bl/fTfEkBObj8I1ba7EafJ10BrAuh6CQfX+SGL5wJPywruFyM98By2SAHAKAT3f/NxQO14STpHMCEQJqjKQy0VPIIdUauWdCpQBtZzjm9bGMk68onCkBEBaTBcpmMnRWy1APnifjcZ7xTWvi5+zGwDcg1bLo1VBnMaFTCPOp5P50Tvn+PZU8CG62P6vq06fH34R3ymKnS5PyRtwd92ostmH298NlLvpUpFTpJXI1gKTvYcQ Linus, 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. Please pull the latest trace-rtla-v7.1 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-rtla-v7.1 Tag SHA1: 343e92fa8fbda2301fa960efa535267358acc650 Head SHA1: 82374995b63d2de21414163828a32d52610dcaf2 Costa Shulyupin (7): tools/rtla: Generate optstring from long options tools/build: Add feature test for libcheck tools/rtla: Add unit tests for utils.c tools/rtla: Consolidate nr_cpus usage across all tools tools/rtla: Remove unneeded nr_cpus arguments tools/rtla: Remove unneeded nr_cpus members tools/rtla: Remove unneeded nr_cpus from for_each_monitored_cpu Tomas Glozar (4): rtla/timerlat: Add --stack-format option Documentation/rtla: Document --stack-format option rtla: Fix segfault on multiple SIGINTs Documentation/rtla: Document SIGINT behavior Wander Lairson Costa (17): rtla: Exit on memory allocation failures during initialization rtla: Use strdup() to simplify code rtla/actions: Simplify argument parsing rtla: Introduce common_threshold_handler() helper rtla: Replace magic number with MAX_PATH rtla: Simplify code by caching string lengths rtla/timerlat: Add bounds check for softirq vector rtla: Handle pthread_create() failure properly rtla: Add str_has_prefix() helper function rtla: Use str_has_prefix() for prefix checks rtla: Enforce exact match for time unit suffixes rtla: Use str_has_prefix() for option prefix check rtla/timerlat: Simplify RTLA_NO_BPF environment variable check rtla/trace: Fix write loop in trace_event_save_hist() rtla/trace: Fix I/O handling in save_trace_to_file() rtla/utils: Fix resource leak in set_comm_sched_attr() rtla/utils: Fix loop condition in PID validation ---- Documentation/tools/rtla/common_appendix.txt | 21 ++++ .../tools/rtla/common_timerlat_options.txt | 12 +++ tools/build/Makefile.feature | 3 + tools/build/feature/Makefile | 4 + tools/build/feature/test-libcheck.c | 8 ++ tools/tracing/rtla/Build | 1 + tools/tracing/rtla/Makefile | 5 + tools/tracing/rtla/Makefile.config | 8 ++ tools/tracing/rtla/README.txt | 1 + tools/tracing/rtla/src/actions.c | 103 +++++++++++------- tools/tracing/rtla/src/actions.h | 8 +- tools/tracing/rtla/src/common.c | 120 +++++++++++++++++---- tools/tracing/rtla/src/common.h | 24 ++++- tools/tracing/rtla/src/osnoise.c | 26 ++--- tools/tracing/rtla/src/osnoise_hist.c | 51 ++++----- tools/tracing/rtla/src/osnoise_top.c | 41 ++----- tools/tracing/rtla/src/timerlat.c | 16 ++- tools/tracing/rtla/src/timerlat.h | 1 + tools/tracing/rtla/src/timerlat_aa.c | 51 ++++++--- tools/tracing/rtla/src/timerlat_aa.h | 2 +- tools/tracing/rtla/src/timerlat_bpf.c | 19 ++-- tools/tracing/rtla/src/timerlat_bpf.h | 12 +-- tools/tracing/rtla/src/timerlat_hist.c | 116 +++++++++----------- tools/tracing/rtla/src/timerlat_top.c | 114 +++++++++----------- tools/tracing/rtla/src/timerlat_u.c | 13 ++- tools/tracing/rtla/src/timerlat_u.h | 1 + tools/tracing/rtla/src/trace.c | 102 ++++++++++-------- tools/tracing/rtla/src/trace.h | 4 +- tools/tracing/rtla/src/utils.c | 113 ++++++++++++++----- tools/tracing/rtla/src/utils.h | 33 ++++++ tools/tracing/rtla/tests/unit/Build | 2 + tools/tracing/rtla/tests/unit/Makefile.unit | 17 +++ tools/tracing/rtla/tests/unit/unit_tests.c | 119 ++++++++++++++++++++ 33 files changed, 769 insertions(+), 402 deletions(-) create mode 100644 tools/build/feature/test-libcheck.c create mode 100644 tools/tracing/rtla/tests/unit/Build create mode 100644 tools/tracing/rtla/tests/unit/Makefile.unit create mode 100644 tools/tracing/rtla/tests/unit/unit_tests.c ---------------------------