Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4391354img; Tue, 26 Mar 2019 08:31:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqx359siH7EX2jR/W1YTq1cV9U0TLsWd/1flZ5Be5/66jcjklTxrX/8VJQE6znNSYFDYJCva X-Received: by 2002:a62:7049:: with SMTP id l70mr30452541pfc.78.1553614278229; Tue, 26 Mar 2019 08:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553614278; cv=none; d=google.com; s=arc-20160816; b=Z16eDY9fqQSVP81pmUF74opD8WXcP9HyFfJVTqLKTfe7tnCVe/TwZhwv/CRGMgbdNN G5HmbQlDG0DYQXTIIpUT2RxhZqpmIPJf8znKo0gyHiZqsotm1Zg4MbMvB1LWKSLOEvUG NaFDgoodmc2jDcNIz0K7eXqQIrLho9/2XwUuxxm+aUOo6hI4FyeZciVxi3cb35v7MVPF CfXvqvhNkRfBNZKUeiPf2UF6sAMp/AgpJAYioXOyjBUIDk/wBKFcfNCe8Ks478WBxW7v s1kG4H0aeM++kjh0ymmpIR2inGot800YdZLKj54HDjk4RbEp2E6Kw6IJkYCYG/V+bW2N qDzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=kxXMogaM5+qTnUzhVHZZQy2RZHRB09Zoc39VMhQKDQ8=; b=DsA4uTwTaI5ajSjbsPb7Bm3R1ZTfjBhS518rTc9/P+re7PJWeIVmOLw1UDcQzN5oPM eF4qyHUhirXjHPjq3E3n9Aq9JkZRsGtghcEQTz5U2al6uPXeWPWJWbVJYzTkW0KGGvWS rS0r/ayWDaIWqxJU1vgbEb69T/XONony+vcetRNQcVa7z3ujn6enS3+jDKQ7eqdNYTax Adxrz3+LOs0ahC0FJ5Zenz9I+45D7eDw4yiEcgK6cerMMxl/MRc30r0qWivXAiADegpH +YZQI7d7jdx91drNloSDa5AeJAh63V8Kfbz2/hiyRakyzAKSzXUpuXm1n6lSU2y6q6t+ mJ1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 17si15258753pfw.6.2019.03.26.08.31.02; Tue, 26 Mar 2019 08:31:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731996AbfCZPaD (ORCPT + 99 others); Tue, 26 Mar 2019 11:30:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:41724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbfCZPaB (ORCPT ); Tue, 26 Mar 2019 11:30:01 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7934220811; Tue, 26 Mar 2019 15:30:00 +0000 (UTC) Date: Tue, 26 Mar 2019 11:29:58 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Yafang Shao , mingo@redhat.com, peterz@infradead.org, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, joel@joelfernandes.org, linux-kernel@vger.kernel.org, shaoyafang@didiglobal.com Subject: Re: [PATCH v2 3/3] rcu: validate arguments for rcu tracepoints Message-ID: <20190326112958.2668a4a1@gandalf.local.home> In-Reply-To: <20190326151815.GI4102@linux.ibm.com> References: <1553602391-11926-1-git-send-email-laoar.shao@gmail.com> <1553602391-11926-4-git-send-email-laoar.shao@gmail.com> <20190326151815.GI4102@linux.ibm.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Mar 2019 08:18:15 -0700 "Paul E. McKenney" wrote: > On Tue, Mar 26, 2019 at 08:13:11PM +0800, Yafang Shao wrote: > > When CONFIG_RCU_TRACE is not set, all these tracepoints are defined as > > do-nothing macro. > > We'd better make those inline functions that take proper arguments. > > > > As RCU_TRACE() is defined as do-nothing marco as well when > > CONFIG_RCU_TRACE is not set, so we can clean it up. > > How about this for the commit log? > > Unless the CONFIG_RCU_TRACE kconfig option is set, almost all > of RCU's tracepoints are defined as empty macros. It would > be better if these tracepoints could instead be empty inline > functions with proper arguments and type checking. It would > also be good to get rid of the RCU_TRACE() macro, which > compiles its argument in CONFIG_RCU_TRACE=y kernels and > omits them otherwise. > > This commit therefore creates a TRACE_EVENT_RCU macro that > is defined as TRACE_EVENT in CONFIG_RCU_TRACE=y kernels and > as the new TRACE_EVENT_NOP otherwise, which allows the > empty macros and the RCU_TRACE() macro to be eliminated. > > With that: > > Reviewed-by: Paul E. McKenney Yafang, If you are OK with the above changes, I'll take this patch with the updated change log. -- Steve