<html><body><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 <mohamad.gebai@gmail.com> 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><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 href="mailto:mohamad.gebai@gmail.com" target="_blank">mohamad.gebai@gmail.com</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><br data-mce-bogus="1"></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"><p><br> ctf_integer(__u64, rip, vcpu->arch.emulate_ctxt.fetch.start)<br> ctf_integer(__u32, csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))<br> ctf_integer(__u8, len, vcpu->arch.emulate_ctxt._eip<br>-- <br>2.1.1<br></p></div><br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote></div><div><br></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>