Skip to contentSkip to conversation

tracing: Multi definition of TRACE_INCLUDE_FILE

DISCUSSION Wenji Huang 2 participants 3 messages Jan 6, 2010 – Jan 14, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

There are multi definition of TRACE_INCLUDE_FILE on include/trace/events/{syscalls, kvm}.h
It will result in compilation error when some out-of-tree tools like Systemtap processes kernel tracepoints in a way to put header files into module.

Regards,
Wenji

maintainer
#1 lore raw
Quoted 8 lines · Wenji Huang

Hi,

There are multi definition of TRACE_INCLUDE_FILE on include/trace/events/{syscalls, kvm}.h
It will result in compilation error when some out-of-tree tools like Systemtap processes kernel tracepoints in a way to put header files into module.

Does the following patch fix your issues?

-- Steve

include/trace/events/kvm.h +1 -0
index dbe1084..532d658 100644
@@ -4,6 +4,7 @@
 #include <linux/tracepoint.h>
 
 #undef TRACE_SYSTEM
+#undef TRACE_INCLUDE_FILE
 #define TRACE_SYSTEM kvm
 #define TRACE_INCLUDE_FILE kvm
 
include/trace/events/syscalls.h +1 -0
index fb726ac..52290bb 100644
@@ -1,4 +1,5 @@
 #undef TRACE_SYSTEM
+#undef TRACE_INCLUDE_FILE
 #define TRACE_SYSTEM raw_syscalls
 #define TRACE_INCLUDE_FILE syscalls
 
#2 lore raw

Hi Steven,

Quoted 12 lines · Steven Rostedt
Quoted 8 lines · Wenji Huang

Hi,

There are multi definition of TRACE_INCLUDE_FILE on include/trace/events/{syscalls, kvm}.h
It will result in compilation error when some out-of-tree tools like Systemtap processes kernel tracepoints in a way to put header files into module.

Does the following patch fix your issues?

Yes, that could be.

Thanks,
wenji

Quoted 25 lines

-- Steve

include/trace/events/kvm.h +1 -0
index dbe1084..532d658 100644
@@ -4,6 +4,7 @@
 #include <linux/tracepoint.h>
 
 #undef TRACE_SYSTEM
+#undef TRACE_INCLUDE_FILE
 #define TRACE_SYSTEM kvm
 #define TRACE_INCLUDE_FILE kvm
 
include/trace/events/syscalls.h +1 -0
index fb726ac..52290bb 100644
@@ -1,4 +1,5 @@
 #undef TRACE_SYSTEM
+#undef TRACE_INCLUDE_FILE
 #define TRACE_SYSTEM raw_syscalls
 #define TRACE_INCLUDE_FILE syscalls