diff mbox

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

Message ID 20140109144123.21800.45879.stgit@fimbulvetr.bsc.es
State New
Headers show

Commit Message

Lluís Vilanova Jan. 9, 2014, 2:41 p.m. UTC
The header is not necessary, given that the simple backend does not define any
inlined tracing routines.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
--
Cc: Stefan Hajnoczi <stefanha@gmail.com>
---
 scripts/tracetool/backend/simple.py |    3 ---
 trace/simple.c                      |    2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Stefan Hajnoczi Jan. 14, 2014, 1:36 p.m. UTC | #1
On Thu, Jan 09, 2014 at 03:41:23PM +0100, Lluís Vilanova wrote:
> diff --git a/trace/simple.c b/trace/simple.c
> index 1e3f691..8b59760 100644
> --- a/trace/simple.c
> +++ b/trace/simple.c
> @@ -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.
diff mbox

Patch

diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py
index 37ef599..30faac9 100644
--- a/scripts/tracetool/backend/simple.py
+++ b/scripts/tracetool/backend/simple.py
@@ -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,
diff --git a/trace/simple.c b/trace/simple.c
index 1e3f691..8b59760 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -8,6 +8,8 @@ 
  *
  */
 
+#include "trace/simple.h"
+
 #include <stdlib.h>
 #include <stdint.h>
 #include <stdio.h>