[for-linus,2/2] tracing: Use ring_buffer_record_is_set_on() in tracer_tracing_is_on()
Message ID | 20240213231439.765101665@goodmis.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-64519-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp862395dyb; Tue, 13 Feb 2024 15:14:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVpNngxPAtwy5FbHbt2qg0ODQ5oFx5cLXnNw2bkThFis3eBECekfg8657o+FnaxQX1NrF7FCuy/+RrkK9dRXOzoEoZasw== X-Google-Smtp-Source: AGHT+IEKx2W5rEgLFWYD+uMPkpiVlqOIBwuxqyoldbtbmV8g55fO572XX86gFVjed0DOeV0lyysS X-Received: by 2002:a17:906:5593:b0:a3c:b354:b947 with SMTP id y19-20020a170906559300b00a3cb354b947mr551932ejp.24.1707866059727; Tue, 13 Feb 2024 15:14:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707866059; cv=pass; d=google.com; s=arc-20160816; b=i0EFVmn3MQeSPpqeDeYTonNPFL/jbm+nGEoEdd6xiEAs49q5m1bha2JUlnjI06A1qZ cIarA+wh67UcJ2mDoc/a0cvruN1Jl4ks3J+xrm/qiN3atc2GPioBcH9+NbwmslynttLU E4zmLaA7vMvsELpP2do9ndlaal/04xARxbyPrhFgUVS70FtgEdmotAQIdi189LGI1a1A X0/wcp42LPUnFFD9pr1fBsdDeNHBf6OjhfAj7qWvOruBxhWyDK7WuhvNFCAIgxI1FkUl KjbKDX8kLGgTpanTQ+YP64d5oDsU42piG6/0gEhTxsUN8SncRBiyGDtHOCFH4j+f56i9 c3sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=jjxcZ+dqGZPU5dXHGAwlHHxGL4UkYm/L6dc8zYt31ew=; fh=8uLNuMGxPVM+x3gMrz3ECFvySCSxly3P1sOq4tGXuRk=; b=pDwkv9bUMVmNHCY/7s1seD1ZQu3xSJ9kddTvuh7YN0vFffz35GSkAQx8KdyD5mPaLi pJiY30Eeg7CaN3e7ISbU1ePoQC+uBClhOFc1Ex1ZHMkRfgks2cbqqMdKBJV3+bQ9F41f 6MYtl8pSsTOaQMTL6TbRYuLXa7tJwODvrtDlSsyQVPhdbIb/KL2qYdbo79Rk08IJOVmQ otbHma2KF6R4X43aBwTkwnboPhsvxRQriSLJoYPlrnGvUkuAC0bEJvjT5J66QQm1jVOR vAUiG1p2LePuz13Da+Oy73sOqY4Ji6vWK8qoE8jVD5iY3uLd+hZ7g+l3tkWM5LydimXs AvBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-64519-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64519-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWBhSNrMd9s93mzT39bcT1UyyLGSpKmQoX9pB5aLz7+hURX04S84SjqRHBdXexBPlSJkma+RXMyuHromhB6PY4YABVtcA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x15-20020a170906b08f00b00a3851c2ab09si1635071ejy.786.2024.02.13.15.14.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 15:14:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64519-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-64519-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64519-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 553BD1F24859 for <ouuuleilei@gmail.com>; Tue, 13 Feb 2024 23:14:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7689E64AA5; Tue, 13 Feb 2024 23:13:11 +0000 (UTC) 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 EC3DF6340F for <linux-kernel@vger.kernel.org>; Tue, 13 Feb 2024 23:13:09 +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=1707865990; cv=none; b=UY0tbgUNxWDzuXvRn1Gq5rwQeSrt6PfgseqeV3czCol5SiK36ul4vx+AIdVgYsdgD2lHVWibTAU/FnU3bUmnLkF+JS586fXWbxMolDANSwFvxVrsElf7hFRhw3mF/HOj/VH3eO+1n3Ldoa2Mtq8rSgacpyK2b7eh9yw5MkkVDAk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707865990; c=relaxed/simple; bh=nLoRFPBJnfn59rTSLi0Dv6V2IC37p4t5fbYO1zZOBXk=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=fFuqMULlFQA5AonNP1Hw+YP9MWg/c/6cUfPB9haOyZecNsnq5Sh51q+tK0HgGJlopFKOC0jtoUxJGlr1IcpFKthzV6G5NO7/c4baNIVDj2LkKiJd15+ibYATl6WX27sqYC9z9wgMntmjykyVC9W/scrtuYApK8V+RmMfNuMKW8I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88251C433A6; Tue, 13 Feb 2024 23:13:09 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from <rostedt@goodmis.org>) id 1ra1z5-000000009Er-3nbe; Tue, 13 Feb 2024 18:14:39 -0500 Message-ID: <20240213231439.765101665@goodmis.org> User-Agent: quilt/0.67 Date: Tue, 13 Feb 2024 18:14:15 -0500 From: Steven Rostedt <rostedt@goodmis.org> To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu <mhiramat@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Andrew Morton <akpm@linux-foundation.org>, Mete Durlu <meted@linux.ibm.com>, Sven Schnelle <svens@linux.ibm.com> Subject: [for-linus][PATCH 2/2] tracing: Use ring_buffer_record_is_set_on() in tracer_tracing_is_on() References: <20240213231413.726507543@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790827361202162028 X-GMAIL-MSGID: 1790827361202162028 |
Series |
tracing: A couple of fixes for v6.8
|
|
Commit Message
Steven Rostedt
Feb. 13, 2024, 11:14 p.m. UTC
From: Sven Schnelle <svens@linux.ibm.com> tracer_tracing_is_on() checks whether record_disabled is not zero. This checks both the record_disabled counter and the RB_BUFFER_OFF flag. Reading the source it looks like this function should only check for the RB_BUFFER_OFF flag. Therefore use ring_buffer_record_is_set_on(). This fixes spurious fails in the 'test for function traceon/off triggers' test from the ftrace testsuite when the system is under load. Link: https://lore.kernel.org/linux-trace-kernel/20240205065340.2848065-1-svens@linux.ibm.com Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Tested-By: Mete Durlu <meted@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 9ff8a439d674..aa54810e8b56 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1532,7 +1532,7 @@ void disable_trace_on_warning(void) bool tracer_tracing_is_on(struct trace_array *tr) { if (tr->array_buffer.buffer) - return ring_buffer_record_is_on(tr->array_buffer.buffer); + return ring_buffer_record_is_set_on(tr->array_buffer.buffer); return !tr->buffer_disabled; }