mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
tracing/events: Move TRACE_SYSTEM outside of include guard
If TRACE_INCLDUE_FILE is defined, <trace/events/TRACE_INCLUDE_FILE.h>
will be included and compiled, otherwise it will be
<trace/events/TRACE_SYSTEM.h>
So TRACE_SYSTEM should be defined outside of #if proctection,
just like TRACE_INCLUDE_FILE.
Imaging this scenario:
#include <trace/events/foo.h>
-> TRACE_SYSTEM == foo
...
#include <trace/events/bar.h>
-> TRACE_SYSTEM == bar
...
#define CREATE_TRACE_POINTS
#include <trace/events/foo.h>
-> TRACE_SYSTEM == bar !!!
and then bar.h will be included and compiled.
Signed-off-by: Li Zefan <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
7638d5322b
commit
d0b6e04a4c
11 changed files with 51 additions and 48 deletions
|
|
@ -1,12 +1,11 @@
|
|||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM gfs2
|
||||
|
||||
#if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_GFS2_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM gfs2
|
||||
#define TRACE_INCLUDE_FILE trace_gfs2
|
||||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/dlmconstants.h>
|
||||
|
|
@ -403,5 +402,6 @@ TRACE_EVENT(gfs2_block_alloc,
|
|||
/* This part must be outside protection */
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace_gfs2
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue