From nobody Tue Dec 2 02:05:04 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 46DF2302160 for ; Thu, 20 Nov 2025 23:26:35 +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=1763681195; cv=none; b=hmxrQyArHidDLnaRqXKIZtvARCap8taghkc8cpo42A8QeQU6qdJr+XSLkfs3UWKlOYphEsa6iXrZRZDvnXiBsudUIlDEF/xxyWbTr6deDFT01clacefg5FNCz1bSyaVw6ti8hvfkwyHvHnHN6R89OVlgLWGe1Cb9GC1lYh0P7jM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763681195; c=relaxed/simple; bh=pR/gGxXkX1Y2Do+LfR8TC6bX7B5ryL/CeDuNbLKj0tI=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=ADEJcWYEITk/i9PQJ1kbPNg9gJtHvagDckjN/enhjd9MxeVWU0ypBUgwOR+DoRix9b0lmAjNqU3T+lkT5kCYv5KFWR0Km2O+qd6M0oXl/CjkqV52OpNTHgSfLWVXzQ8R+jxUah9JlM1HuFtFiRGCvdgRLSrEtD1NNZ1dzT6dW7w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dY4kGmDN; 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="dY4kGmDN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBD1CC4CEF1; Thu, 20 Nov 2025 23:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763681195; bh=pR/gGxXkX1Y2Do+LfR8TC6bX7B5ryL/CeDuNbLKj0tI=; h=Date:From:To:Cc:Subject:References:From; b=dY4kGmDNsAxGaoNsEQWY7Zn6yKTFN6Le5ylesj/uM2ZWNRonY4qXUL6IL7tuhDQtE spmW1tsAKup7sWb9T6D7LYy+Xj9+7S8+oKsE0w74eF4/nWmOKx1i1cp1Aj9GBwvi52 VybG8S2MYQGSJb1hhJjn67LsnM1VziSZuvYxITIN3cwtatw7RySMRTYIYT7zjse9Bb vIqWHTKar2P5CR1xZT2Cr7pr5O7clhZt8XoFy7B7jcKR3pNFoxeltV83mNHUMkTTbt EdRAvlQhCDS/6sO0wl5ToMq+E9fkWOmc7DO2Cp7ZfkEp2z+x/vhnP+Z0LDTh85xk/z BQxJXnK7VG4og== Received: from rostedt by gandalf with local (Exim 4.98.2) (envelope-from ) id 1vME3P-000000041ri-3t26; Thu, 20 Nov 2025 18:27:07 -0500 Message-ID: <20251120232707.785326891@kernel.org> User-Agent: quilt/0.68 Date: Thu, 20 Nov 2025 18:23:26 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Tomas Glozar , John Kacur , Costa Shulyupin Subject: [for-next][PATCH 03/16] tools/rtla: Fix unassigned nr_cpus References: <20251120232323.271532418@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: Costa Shulyupin In recently introduced timerlat_free(), the variable 'nr_cpus' is not assigned. Assign it with sysconf(_SC_NPROCESSORS_CONF) as done elsewhere. Remove the culprit: -Wno-maybe-uninitialized. The rest of the code is clean. Signed-off-by: Costa Shulyupin Reviewed-by: Tomas Glozar Fixes: 2f3172f9dd58 ("tools/rtla: Consolidate code between osnoise/timerlat= and hist/top") Link: https://lore.kernel.org/r/20251002170846.437888-1-costa.shul@redhat.c= om Signed-off-by: Tomas Glozar --- tools/tracing/rtla/Makefile.rtla | 2 +- tools/tracing/rtla/src/timerlat.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tracing/rtla/Makefile.rtla b/tools/tracing/rtla/Makefile= .rtla index 08c1b40883d3..1743d91829d4 100644 --- a/tools/tracing/rtla/Makefile.rtla +++ b/tools/tracing/rtla/Makefile.rtla @@ -18,7 +18,7 @@ export CC AR STRIP PKG_CONFIG LD_SO_CONF_PATH LDCONFIG FOPTS :=3D -flto=3Dauto -ffat-lto-objects -fexceptions -fstack-protector-= strong \ -fasynchronous-unwind-tables -fstack-clash-protection WOPTS :=3D -O -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 \ - -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized + -Wp,-D_GLIBCXX_ASSERTIONS =20 ifeq ($(CC),clang) FOPTS :=3D $(filter-out -flto=3Dauto -ffat-lto-objects, $(FOPTS)) diff --git a/tools/tracing/rtla/src/timerlat.c b/tools/tracing/rtla/src/tim= erlat.c index 28ea4f6710c1..df4f9bfe3433 100644 --- a/tools/tracing/rtla/src/timerlat.c +++ b/tools/tracing/rtla/src/timerlat.c @@ -213,7 +213,8 @@ void timerlat_analyze(struct osnoise_tool *tool, bool s= topped) void timerlat_free(struct osnoise_tool *tool) { struct timerlat_params *params =3D to_timerlat_params(tool->params); - int nr_cpus, i; + int nr_cpus =3D sysconf(_SC_NPROCESSORS_CONF); + int i; =20 timerlat_aa_destroy(); if (dma_latency_fd >=3D 0) --=20 2.51.0