Skip to contentSkip to conversation

Fix: Rename kvm TRACE_SYSTEM to avoid name clash

PATCH Mathieu Desnoyers 2 participants 2 messages Jul 16, 2015 – Jul 22, 2015 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

I cannot reproduce this issue with a kernel 4.1.1 and with lttng-modules master and stable-2.6 HEAD.

Can you double-check ?

Moreover, just changing the TRACE_SYSTEM without changing the tracepoint namespacing prefix from kvm_ to kvm_x86 in the whole file is wrong. And if we do this, we would need the _MAP flavor of the macros to map to the original kernel names.

Thanks,

Mathieu

Quoted 34 lines · ----- On Jul 14, 2015, at 2:43 PM, Francis Giraldeau…

From: Cédric Biancheri <[email protected]>

The lttng-probe-kvm and lttng-probe-kvm-x86 had the same TRACE_SYSTEM string. Because of that, both modules can't be loaded at the same time. The second module fails to load silently. This patch rename the TRACE_SYSTEM of lttng-probe-kvm-x86 to avoid the clash.

---
instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
instrumentation/events/lttng-module/arch/x86/kvm/trace.h +1 -2
index 32c4743..ddbfda7 100644
@@ -12,7 +12,7 @@
 #include <../arch/x86/kvm/kvm_cache_regs.h>
 
 #undef TRACE_SYSTEM
-#define TRACE_SYSTEM kvm
+#define TRACE_SYSTEM kvm_x86
 
 /*
 * Tracepoint for guest mode entry.
--

2.1.4

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 8 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 5 lines · Mathieu Desnoyers

I cannot reproduce this issue with a kernel 4.1.1 and with lttng-modules master and stable-2.6 HEAD.

Can you double-check ?

Thanks for this follow-up. I confirm that the bug is reproducible with lttng-modules master on linux 4.1. I opened an issue in the bug tracker for further details. I added a script to reproduce the bug easily.

https://bugs.lttng.org/issues/895

Quoted 3 lines

Moreover, just changing the TRACE_SYSTEM without changing the tracepoint namespacing prefix from kvm_ to kvm_x86 in the whole file is wrong.

I do not understand. In lttng-ust, there is a TRACEPOINT_PROVIDER string that must be repeated into each TRACEPOINT_EVENT declaration, but this is not the case for the kernel LTTNG_TRACEPOINT_EVENT macro. Can you explain what you mean by "namespace"?

Quoted 3 lines

And if we do this, we would need the _MAP
flavor of the macros to map to the original kernel names.

In fact, event names are not modified by the patch, such that backward compatibility seems preserved AFAIK. Do I miss something?

Francis

Quoted 35 lines

----- On Jul 14, 2015, at 2:43 PM, Francis Giraldeau

Quoted 3 lines · [email protected] wrote:

From: Cédric Biancheri <[email protected]>

The lttng-probe-kvm and lttng-probe-kvm-x86 had the same TRACE_SYSTEM

string.

Quoted 1 line

Because of that, both modules can't be loaded at the same time. The

second

Quoted 26 lines

module fails to load silently. This patch rename the TRACE_SYSTEM of lttng-probe-kvm-x86 to avoid the clash.

---
instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
instrumentation/events/lttng-module/arch/x86/kvm/trace.h +1 -2
index 32c4743..ddbfda7 100644
@@ -12,7 +12,7 @@
 #include <../arch/x86/kvm/kvm_cache_regs.h>
 
 #undef TRACE_SYSTEM
-#define TRACE_SYSTEM kvm
+#define TRACE_SYSTEM kvm_x86
 
 /*
 * Tracepoint for guest mode entry.
--

2.1.4

Quoted 10 lines
Quoted 4 lines

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev