Fix: compile lttng_statedump_process_ns on Ubuntu
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/4 Fix block_rq_complete TP on Ubuntu kernel
Fixes #814
Signed-off-by Julien Desfossez <[email protected]>
--- instrumentation/events/lttng-module/block.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
instrumentation/events/lttng-module/block.h +2 -1
@@ -225,7 +225,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_requeue, || LTTNG_KERNEL_RANGE(3,12,21, 3,13,0) \ ||LTTNG_KERNEL_RANGE (3 ,10 ,41 ,3 ,11 ,0 ) \ ||LTTNG_KERNEL_RANGE (3 ,4 ,91 ,3 ,5 ,0 ) \ - || LTTNG_KERNEL_RANGE(3,2,58, 3,3,0)) + ||LTTNG_KERNEL_RANGE (3 ,2 ,58 ,3 ,3 ,0 ) \ + || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,31, 3,14,0,0))/** * block_rq_complete - block IO operation completed by device driver
Signature · 1 line
1.9.1
PATCH 3/4 Reverse version check logic in lttng_statedump_process_ns
In reply to a message not in the archiveThis allows to keep the most up-to-date branch on top.
Signed-off-by Julien Desfossez <[email protected]>
--- lttng-statedump-impl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
lttng-statedump-impl.c +8 -6
@@ -411,12 +411,12 @@ void lttng_statedump_process_ns(struct lttng_session *session,* "namespaces: Use task_lock and not rcu to protect nsproxy" * for details. */ -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 )) +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 )) + proxy = p->nsproxy; +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ rcu_read_lock (); proxy =task_nsproxy (p); -#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ - proxy = p->nsproxy; -#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ if (proxy) { pid_ns =lttng_get_proxy_pid_ns (proxy); do {
@@ -428,9 +428,11 @@ void lttng_statedump_process_ns(struct lttng_session *session,trace_lttng_statedump_process_state (session, p, type, mode, submode, status,NULL ); } -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 )) +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 )) +/* (nothing) */ +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ rcu_read_unlock (); -#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ +#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ } static
Signature · 1 line
1.9.1
PATCH 4/4 Fix: compile lttng_statedump_process_ns on Ubuntu
In reply to a message not in the archiveFixes #838
Signed-off-by Julien Desfossez <[email protected]>
--- lttng-statedump-impl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
lttng-statedump-impl.c +8 -6
@@ -411,12 +411,13 @@ void lttng_statedump_process_ns(struct lttng_session *session,* "namespaces: Use task_lock and not rcu to protect nsproxy" * for details. */ -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 )) +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 ) || \ +LTTNG_UBUNTU_KERNEL_RANGE (3 ,13 ,11 ,36 ,3 ,14 ,0 ,0 )) proxy = p->nsproxy; -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ +#else rcu_read_lock (); proxy =task_nsproxy (p); -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ +#endif if (proxy) { pid_ns =lttng_get_proxy_pid_ns (proxy); do {
@@ -428,11 +429,12 @@ void lttng_statedump_process_ns(struct lttng_session *session,trace_lttng_statedump_process_state (session, p, type, mode, submode, status,NULL ); } -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 )) +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 ) || \ +LTTNG_UBUNTU_KERNEL_RANGE (3 ,13 ,11 ,36 ,3 ,14 ,0 ,0 ))/* (nothing) */ -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ +#else rcu_read_unlock (); -#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ +#endif } static
Signature · 1 line
1.9.1
Re: [MODULES PATCH 1/4] Introduce macros to check Ubuntu kernel version
In reply to a message not in the archiveWhole series merged, thanks!
Mathieu
----- Original Message -----
Quoted 46 lines
From: "Julien Desfossez" <[email protected]>
To: "mathieu desnoyers" <[email protected]>
Cc: [email protected], "Julien Desfossez" <[email protected]>
Sent: Wednesday, October 1, 2014 11:05:08 AM
Subject: [MODULES PATCH 1/4] Introduce macros to check Ubuntu kernel versionSigned-off-by Julien Desfossez <[email protected]>--- lttng-kernel-version.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+)lttng-kernel-version.h +15
-1@@ -24,6 +24,7 @@*/ #include <linux/version.h> +#include <linux/vermagic.h> /* * This macro checks if the kernel version is between the two specified @@ -33,4 +34,18 @@ (LINUX_VERSION_CODE >=KERNEL_VERSION (a_low, b_low, c_low) && \ LINUX_VERSION_CODE < KERNEL_VERSION(a_high, b_high, c_high)) +#define LTTNG_UBUNTU_KERNEL_VERSION (a,b,c,d) \ + (((a) << 24) + ((b) << 16) + (c << 8) + (d)) + +#define LTTNG_UBUNTU_VERSION_CODE \ + ((LINUX_VERSION_CODE << 8) + UTS_UBUNTU_RELEASE_ABI) + +#define LTTNG_UBUNTU_KERNEL_RANGE (a_low, b_low, c_low, d_low, \ + a_high, b_high, c_high, d_high) \ + (defined(UTS_UBUNTU_RELEASE_ABI) && \ + LTTNG_UBUNTU_VERSION_CODE >= \ + LTTNG_UBUNTU_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \ + LTTNG_UBUNTU_VERSION_CODE < \ + LTTNG_UBUNTU_KERNEL_VERSION(a_high, b_high, c_high, d_high)) +#endif /* _LTTNG_KERNEL_VERSION_H */ --1.9.1
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com