lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] tracepoints: Add helper to test if tracepoint is enabled in a header
----- On Sep 24, 2020, at 4:13 PM, rostedt rostedt@goodmis.org wrote:

> On Thu, 24 Sep 2020 16:05:35 -0400 (EDT)
> Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
>
>> If headers which happens to be included by include/trace/events/ headers are
>> the issue, and they happen to only be needed by CREATE_TRACE_PROBES, then we
>> should consider wrapping those #include with #ifdef CREATE_TRACE_PROBES guards.
>
> Well, we are at a point you can't even use preempt_disable().
>
> Whatever wants to use this tracepoint_enabled() macro, is going to have
> to include something that doesn't include tracepoint.h.

I'd be a bit more specific: so far, the msr.h use-case requires to include
directly tracepoint-defs.h and use a tracepoint_enabled() macro defined there.

Other less "core" header use-cases could still include tracepoint.h, as long as
there is no circular dependency.

Thanks,

Mathieu


--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

\
 
 \ /
  Last update: 2020-09-24 22:28    [W:0.038 / U:1.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site