<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body smarttemplateinserted="true" bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><br>
On 06/27/2016 12:13 PM, Mathieu Desnoyers wrote:<br>
</div>
<blockquote
cite="mid:1451271429.49557.1467044037388.JavaMail.zimbra@efficios.com"
type="cite">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div><br>
</div>
<div><span id="zwchr" data-marker="__DIVIDER__">----- On Jun 27,
2016, at 11:26 AM, mo geb <a class="moz-txt-link-rfc2396E"
href="mailto:mohamad.gebai@gmail.com"><mohamad.gebai@gmail.com></a>
wrote:<br>
</span></div>
<div data-marker="__QUOTED_TEXT__">
<div><br>
</div>
<div>Please use [PATCH lttng-modules] in the subject.<br
data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
Got it.<br>
<blockquote
cite="mid:1451271429.49557.1467044037388.JavaMail.zimbra@efficios.com"
type="cite">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div data-marker="__QUOTED_TEXT__">
<div> </div>
<blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<div dir="ltr">
<div>Signed-off-by: Mohamad Gebai <<a
class="moz-txt-link-abbreviated"
href="mailto:mohamad.gebai@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:mohamad.gebai@gmail.com">mohamad.gebai@gmail.com</a></a>><br>
---<br>
instrumentation/events/lttng-module/arch/x86/kvm/trace.h
| 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)</div>
<p>diff --git
a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h<br>
index 1282bea..ef3d8aa 100644<br>
---
a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h<br>
+++
b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h<br>
@@ -429,7 +429,8 @@
LTTNG_TRACEPOINT_EVENT(kvm_emulate_insn,<br>
ctf_integer(__u8, len,
vcpu->arch.emulate_ctxt.decode.eip<br>
-
vcpu->arch.emulate_ctxt.decode.fetch.start)<br>
ctf_array(__u8, insn,
vcpu->arch.emulate_ctxt.decode.fetch.data, 15)<br>
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))<br>
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) \<br>
+ && !LTTNG_RHEL_KERNEL_RANGE(3,10,0,7,2,
3,11,0,0,0))</p>
</div>
</blockquote>
<div><br>
</div>
<div>We don't use negation "!" in kernel version range tests.
We also don't use<br data-mce-bogus="1">
</div>
<div>"&&" typically, to make the code easier to
maintain.<br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<div>Instead, we might want to swap the order in which ifdefs
are done, and put<br data-mce-bogus="1">
</div>
<div>newer versions at the top, e.g.:<br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<div>#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) \<br
data-mce-bogus="1">
</div>
<div> || LTTNG_RHEL_KERNEL_RANGE(3,10,0,7,2, 3,11,0,0,0))<br
data-mce-bogus="1">
</div>
<div>...<br data-mce-bogus="1">
</div>
<div>#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))<br
data-mce-bogus="1">
</div>
<div>...<br data-mce-bogus="1">
</div>
<div>#else<br data-mce-bogus="1">
</div>
<div>...<br data-mce-bogus="1">
</div>
<div>#endif<br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<div>Thanks,<br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<div>Mathieu<br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
<br>
Thanks for the comments, I'll make those changes and resubmit. I
just want to point out that I used a check similar to what's in
wrapper/trace-clock.h:<br>
<br>
#if ((LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) &&
!LTTNG_RHEL_KERNEL_RANGE(3,10,0,7,0, 3,10,14,0,0)) \<br>
|| LTTNG_KERNEL_RANGE(3,11,0, 3,11,3))<br>
#error "Linux kernels 3.10 and 3.11 introduce a deadlock in the
timekeeping subsystem. Fixed by commit
7bd36014460f793c19e7d6c94dab67b0afcfcb7f \"timekeeping: Fix HRTICK
related deadlock from ntp lock changes\" in Linux."<br>
#endif<br>
<br>
Mohamad<br>
<br>
</body>
</html>