Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751363AbdIJJQ0 (ORCPT ); Sun, 10 Sep 2017 05:16:26 -0400 Received: from smtprelay0153.hostedemail.com ([216.40.44.153]:60434 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751219AbdIJJQZ (ORCPT ); Sun, 10 Sep 2017 05:16:25 -0400 X-Greylist: delayed 599 seconds by postgrey-1.27 at vger.kernel.org; Sun, 10 Sep 2017 05:16:24 EDT X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3874:5007:6120:6261:7875:7901:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12294:12438:12740:12760:12895:13069:13255:13311:13357:13439:14096:14097:14181:14659:14721:21080:21434:21451:21627:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: music40_37ee2701bf358 X-Filterd-Recvd-Size: 1909 Date: Sun, 10 Sep 2017 05:06:22 -0400 From: Steven Rostedt To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , kernel-team@android.com, Ingo Molnar Subject: Re: [PATCH RFC v4 1/3] tracing/irqsoff: Prepare to add preempt and irq trace events Message-ID: <20170910050622.60e5c96d@vmware.local.home> In-Reply-To: <20170907001752.27015-2-joelaf@google.com> References: <20170907001752.27015-1-joelaf@google.com> <20170907001752.27015-2-joelaf@google.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 923 Lines: 29 On Wed, 6 Sep 2017 17:17:50 -0700 Joel Fernandes wrote: > +#else /* IRQSOFF_TRACER || PREEMPTOFF_TRACER */ > + > +#define start_critical_timings_tracer() do { } while (0) > +#define stop_critical_timings_tracer() do { } while (0) > + > +#endif > + > +#ifndef CONFIG_IRQSOFF_TRACER > +#define tracer_hardirqs_on() do { } while (0) > +#define tracer_hardirqs_off() do { } while (0) > +#define tracer_hardirqs_on_caller(x) do { } while (0) > +#define tracer_hardirqs_off_caller(x) do { } while (0) > +#endif > + > +#ifndef CONFIG_PREEMPT_TRACER > +#define tracer_preempt_on(x, y) do { } while (0) > +#define tracer_preempt_off(x, y) do { } while (0) > +#endif Is there a reason the above is #define and not static inline? The preferred method is static inline as that allows the compiler to check types. #define is used if one of the parameters has a struct or something that is not defined. -- Steve