From nobody Tue Feb 10 22:15:45 2026 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 97CA31862A for ; Sat, 8 Mar 2025 03:26:11 +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=1741404371; cv=none; b=Kcue6JpRvk5+iLKYw2E0/b1F+nJHbxtEkwGjg/DkXzA19LT3MQZbD2sC1ECu8s8ZgZDdR+8yQdSnxG0FGclwNOlDR40YoixQ5mbBaZBe5Y1NziUVcNmNDa76Qo8BlxDCcF7sSeUchfliD6bq6wkegkCzdL5MBbSAhBLdzk1UavY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741404371; c=relaxed/simple; bh=e9U30m3LgCgpQUYidMqGakXlegNdQafEexM2bRXOWMA=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=pda20ASDbWFHWGkAG2a2uItwJ6GO+w9hMiA7lBGVAYeYlEhv6oZsu60FveSX+yuZalUkeD5vDSId2CMEZvTh/dcaV4vnYh+WiYrJg/gn5ZBbhA2T10eh32io8KjtpXDO0Eq+Xh5JaTJRvTZlGTZhmba8UxEMzrLf6zLSPfRhOqA= 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 3F6FAC4CEE8; Sat, 8 Mar 2025 03:26:11 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1tqkpJ-00000000UlL-1Mt9; Fri, 07 Mar 2025 22:26:13 -0500 Message-ID: <20250308032613.178673641@goodmis.org> User-Agent: quilt/0.68 Date: Fri, 07 Mar 2025 22:24:34 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Frederic Weisbecker , Ingo Molnar , Peter Zijlstra , Juri Lelli , Gabriele Monaco Subject: [for-next][PATCH 2/3] tracing: Fix DECLARE_TRACE_CONDITION References: <20250308032432.109115966@goodmis.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: Gabriele Monaco Commit 287050d39026 ("tracing: Add TRACE_EVENT_CONDITIONAL()") adds macros to define conditional trace events (TRACE_EVENT_CONDITIONAL) and tracepoints (DECLARE_TRACE_CONDITION), but sets up functionality for direct use only for the former. Add preprocessor bits in define_trace.h to allow usage of DECLARE_TRACE_CONDITION just like DECLARE_TRACE. Cc: Mathieu Desnoyers Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Link: https://lore.kernel.org/20250218123121.253551-2-gmonaco@redhat.com Fixes: 287050d39026 ("tracing: Add TRACE_EVENT_CONDITIONAL()") Link: https://lore.kernel.org/linux-trace-kernel/20250128111926.303093-1-gm= onaco@redhat.com Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Gabriele Monaco Signed-off-by: Steven Rostedt (Google) --- include/trace/define_trace.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h index e1c1079f8c8d..ed52d0506c69 100644 --- a/include/trace/define_trace.h +++ b/include/trace/define_trace.h @@ -76,6 +76,10 @@ #define DECLARE_TRACE(name, proto, args) \ DEFINE_TRACE(name, PARAMS(proto), PARAMS(args)) =20 +#undef DECLARE_TRACE_CONDITION +#define DECLARE_TRACE_CONDITION(name, proto, args, cond) \ + DEFINE_TRACE(name, PARAMS(proto), PARAMS(args)) + /* If requested, create helpers for calling these tracepoints from Rust. */ #ifdef CREATE_RUST_TRACE_POINTS #undef DEFINE_RUST_DO_TRACE @@ -108,6 +112,8 @@ /* Make all open coded DECLARE_TRACE nops */ #undef DECLARE_TRACE #define DECLARE_TRACE(name, proto, args) +#undef DECLARE_TRACE_CONDITION +#define DECLARE_TRACE_CONDITION(name, proto, args, cond) =20 #ifdef TRACEPOINTS_ENABLED #include @@ -129,6 +135,7 @@ #undef DEFINE_EVENT_CONDITION #undef TRACE_HEADER_MULTI_READ #undef DECLARE_TRACE +#undef DECLARE_TRACE_CONDITION =20 /* Only undef what we defined in this file */ #ifdef UNDEF_TRACE_INCLUDE_FILE --=20 2.47.2