From nobody Mon Oct 6 13:35:28 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D1971246765 for ; Mon, 21 Jul 2025 23:11:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753139512; cv=none; b=b8DFE+O7ms+/YeOf1H3c8X16NyvMyH+CQ2u4emCuZk+z+I6sny5fgtl2YMtSqMh2Pqr2ryRi+Yr3V+kzgplqRL5RQyN03FQeRzR8nRMxLHUWg/7FEld/y/mh80XkHylnAcgJCdCIcfoT1uH1N3Lms16XDTKB9Pemc4SGRGEGkJw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753139512; c=relaxed/simple; bh=2pvlYDJEhHosA2vowv9pF0qgZPub8/fruDvRAfVsBDc=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=hDqq2u4sHlxbEPXgRLhWj/Ii3uguwgxODnnftSJ7cc6/b/VDbarZiMd4pfFWCoSYvXQvUGZB7/brotiIg2MSqWis4zMNHMU65dff1bxjG/VAO9oW2vHRvdB7TqANvWgGwpSFKJSCK/6U1gEsKICbxLovlzegbNmMMXvpjj9kwqE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MDR3vlsF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MDR3vlsF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E938C4CEED; Mon, 21 Jul 2025 23:11:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753139512; bh=2pvlYDJEhHosA2vowv9pF0qgZPub8/fruDvRAfVsBDc=; h=Date:From:To:Cc:Subject:References:From; b=MDR3vlsFKBdMMFkYGCXVF6viTh44M5mKLAt9tckSdYc6NGFFSxH+XD1vtgh/4TBXy MPrLLsduKAQeum7P6psXqaT5q9eAaN5U4TuN09dB9eLsL8WNO++s0f6RdcnGYAiNYs 93Aiz1+HhZEU8znQBfdNDFoe8OKPpORIuNJyxg1wAcXpG9wxuaVgH574rPzPtommqO 8cA7U18HTUrbXMR1MUalV33/ALoXmw9N7Dg46gQMYM1d231/ly5RP/5EekfO1kqkfr HPKtQeGw//mdC3KKvOtTtLoCrrFWx58bSnRoEVwc4ePLQuJTQfkTPY/hvVt5CYYYol 6WvZS58b3ELWQ== Received: from rostedt by gandalf with local (Exim 4.98.2) (envelope-from ) id 1udzgF-00000009vLK-3H9c; Mon, 21 Jul 2025 19:12:23 -0400 Message-ID: <20250721231223.629654352@kernel.org> User-Agent: quilt/0.68 Date: Mon, 21 Jul 2025 19:12:13 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Tomas Glozar , John Kacur , Luis Goncalves , Arnaldo Carvalho de Melo , Chang Yin , Costa Shulyupin , Crystal Wood , Gabriele Monaco Subject: [for-next][PATCH 9/9] Documentation/rtla: Add actions feature References: <20250721231204.100737734@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Tomas Glozar Document both --on-threshold and --on-end, with examples. Cc: John Kacur Cc: Luis Goncalves Cc: Arnaldo Carvalho de Melo Cc: Chang Yin Cc: Costa Shulyupin Cc: Crystal Wood Cc: Gabriele Monaco Link: https://lore.kernel.org/20250626123405.1496931-10-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) --- .../tools/rtla/common_timerlat_options.rst | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/Documentation/tools/rtla/common_timerlat_options.rst b/Documen= tation/tools/rtla/common_timerlat_options.rst index 10dc802f8d65..7854368f1827 100644 --- a/Documentation/tools/rtla/common_timerlat_options.rst +++ b/Documentation/tools/rtla/common_timerlat_options.rst @@ -55,3 +55,67 @@ Set timerlat to run without workload, waiting for the user to disp= atch a per-cpu task that waits for a new period on the tracing/osnoise/per_cpu/cp= u$ID/timerlat_fd. See linux/tools/rtla/sample/timerlat_load.py for an example of use= r-load code. + +**--on-threshold** *action* + + Defines an action to be executed when tracing is stopped on a late= ncy threshold + specified by **-i/--irq** or **-T/--thread**. + + Multiple --on-threshold actions may be specified, and they will be= executed in + the order they are provided. If any action fails, subsequent actio= ns in the list + will not be executed. + + Supported actions are: + + - *trace[,file=3D]* + + Saves trace output, optionally taking a filename. Alternative to= -t/--trace. + Note that nlike -t/--trace, specifying this multiple times will = result in + the trace being saved multiple times. + + - *signal,num=3D,pid=3D* + + Sends signal to process. "parent" might be specified in place of= pid to target + the parent process of rtla. + + - *shell,command=3D* + + Execute shell command. + + - *continue* + + Continue tracing after actions are executed instead of stopping. + + Example: + + $ rtla timerlat -T 20 --on-threshold trace + --on-threshold shell,command=3D"grep ipi_send timerlat_trace.txt" + --on-threshold signal,num=3D2,pid=3Dparent + + This will save a trace with the default filename "timerlat_trace.t= xt", print its + lines that contain the text "ipi_send" on standard output, and sen= d signal 2 + (SIGINT) to the parent process. + + Performance Considerations: + + For time-sensitive actions, it is recommended to run **rtla timerl= at** with BPF + support and RT priority. Note that due to implementational limitat= ions, actions + might be delayed up to one second after tracing is stopped if BPF = mode is not + available or disabled. + +**--on-end** *action* + + Defines an action to be executed at the end of **rtla timerlat** t= racing. + + Multiple --on-end actions can be specified, and they will be execu= ted in the order + they are provided. If any action fails, subsequent actions in the = list will not be + executed. + + See the documentation for **--on-threshold** for the list of suppo= rted actions, with + the exception that *continue* has no effect. + + Example: + + $ rtla timerlat -d 5s --on-end trace + + This runs rtla timerlat with default options and save trace output= at the end. --=20 2.47.2