Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751902AbdIJWV1 (ORCPT ); Sun, 10 Sep 2017 18:21:27 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:47076 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751770AbdIJWVZ (ORCPT ); Sun, 10 Sep 2017 18:21:25 -0400 X-Google-Smtp-Source: ADKCNb52X+SloZtppWZJOKhRejDQWuXTAVK/MCjH8u+IcgkrOiSxwrOnymqHiKj6f007/RTnFOvzc3e6iqHn/AS1c34= MIME-Version: 1.0 In-Reply-To: <20170910050622.60e5c96d@vmware.local.home> References: <20170907001752.27015-1-joelaf@google.com> <20170907001752.27015-2-joelaf@google.com> <20170910050622.60e5c96d@vmware.local.home> From: Joel Fernandes Date: Sun, 10 Sep 2017 15:21:23 -0700 Message-ID: Subject: Re: [PATCH RFC v4 1/3] tracing/irqsoff: Prepare to add preempt and irq trace events To: Steven Rostedt Cc: LKML , Peter Zijlstra , kernel-team@android.com, Ingo Molnar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1109 Lines: 34 Hi Steven, On Sun, Sep 10, 2017 at 2:06 AM, Steven Rostedt wrote: > 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. Sure, I'll make use of static inline in the next version. thanks! -Joel