Skip to contentSkip to conversation

trace: [simple] Do not include "trace/simple.h" in generated tracer headers

PATCH Superseded Lluís Vilanova 2 participants 2 messages Jan 9, 2014 – Jan 14, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace: [simple] Do not include "trace/simple.h" in generated tracer headers

The header is not necessary, given that the simple backend does not define any inlined tracing routines.

--
Cc: Stefan Hajnoczi <[email protected]>

---
 scripts/tracetool/backend/simple.py |    3 ---
 trace/simple.c                      |    2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)
scripts/tracetool/backend/simple.py +0 -3
index 37ef599..30faac9 100644
@@ -93,9 +93,6 @@ def c(events):
 
 
 def h(events):
-    out('#include "trace/simple.h"',
-        '')
-
     for event in events:
         out('void trace_%(name)s(%(args)s);',
             name = event.name,
trace/simple.c +2 -0
index 1e3f691..8b59760 100644
@@ -8,6 +8,8 @@
  *
  */
 
+#include "trace/simple.h"
+
 #include <stdlib.h>
 #include <stdint.h>
 #include <stdio.h>
#1 lore raw

trace/simple.c line 15

Quoted 13 lines · Lluís Vilanova
trace/simple.c +2 -0
index 1e3f691..8b59760 100644
@@ -8,6 +8,8 @@
  *
  */
 
+#include "trace/simple.h"
+
 #include <stdlib.h>
 #include <stdint.h>
 #include <stdio.h>

Please put user-defined header #includes (<>) below system header #includes (""). This ensures we don't define macros that affect system headers.