[packages/lttng-modules] - upstream fixes for linux 3.13

baggins baggins at pld-linux.org
Sat Feb 8 10:10:21 CET 2014


commit d78989f95fa50c33a58cfd494aa9cdc90eda1cae
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Feb 8 10:10:07 2014 +0100

    - upstream fixes for linux 3.13

 lttng-modules-linux-3.13.patch | 127 +++++++++++++++++++++++++++++++++++++++++
 lttng-modules.spec             |   2 +
 2 files changed, 129 insertions(+)
---
diff --git a/lttng-modules.spec b/lttng-modules.spec
index 0eb5b9a..9c8723a 100644
--- a/lttng-modules.spec
+++ b/lttng-modules.spec
@@ -31,6 +31,7 @@ License:	GPL v2
 Group:		Base/Kernel
 Source0:	http://lttng.org/files/lttng-modules/%{pname}-%{version}.tar.bz2
 # Source0-md5:	6941d6c2b149d9b301e388a9b4a99470
+Patch0:		%{name}-linux-3.13.patch
 URL:		http://lttng.org/
 %if %{with dist_kernel}
 BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.38
@@ -100,6 +101,7 @@ p=`pwd`\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 %build
 %{expand:%bkpkg}
diff --git a/lttng-modules-linux-3.13.patch b/lttng-modules-linux-3.13.patch
new file mode 100644
index 0000000..04d9afa
--- /dev/null
+++ b/lttng-modules-linux-3.13.patch
@@ -0,0 +1,127 @@
+From 33673ee7b705adb6b24350c30966d4937d41ed95 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
+Date: Mon, 20 Jan 2014 11:31:30 -0500
+Subject: [PATCH] Update sched instrumentation to Linux 3.13
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
+---
+ instrumentation/events/lttng-module/sched.h |   38 ++++++++++++++++++++++++---
+ 1 file changed, 34 insertions(+), 4 deletions(-)
+
+diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h
+index 25faad0..9e490cf 100644
+--- a/instrumentation/events/lttng-module/sched.h
++++ b/instrumentation/events/lttng-module/sched.h
+@@ -15,7 +15,24 @@
+ #ifndef _TRACE_SCHED_DEF_
+ #define _TRACE_SCHED_DEF_
+ 
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
++
++static inline long __trace_sched_switch_state(struct task_struct *p)
++{
++	long state = p->state;
++
++#ifdef CONFIG_PREEMPT
++	/*
++	 * For all intents and purposes a preempted task is a running task.
++	 */
++	if (task_preempt_count(p) & PREEMPT_ACTIVE)
++		state = TASK_RUNNING | TASK_STATE_MAX;
++#endif
++
++	return state;
++}
++
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+ 
+ static inline long __trace_sched_switch_state(struct task_struct *p)
+ {
+@@ -26,11 +43,24 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
+ 	 * For all intents and purposes a preempted task is a running task.
+ 	 */
+ 	if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+ 		state = TASK_RUNNING | TASK_STATE_MAX;
+-#else
+-		state = TASK_RUNNING;
+ #endif
++
++	return state;
++}
++
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
++
++static inline long __trace_sched_switch_state(struct task_struct *p)
++{
++	long state = p->state;
++
++#ifdef CONFIG_PREEMPT
++	/*
++	 * For all intents and purposes a preempted task is a running task.
++	 */
++	if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
++		state = TASK_RUNNING;
+ #endif
+ 
+ 	return state;
+-- 
+1.7.10.4
+
+From 0d019e70c4c0acccbaed913487c4f0ce96aeda17 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
+Date: Mon, 20 Jan 2014 11:37:25 -0500
+Subject: [PATCH] Update kvm instrumentation to Linux 3.13
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
+---
+ instrumentation/events/lttng-module/kvm.h |   25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/instrumentation/events/lttng-module/kvm.h b/instrumentation/events/lttng-module/kvm.h
+index ba4e528..99d1788 100644
+--- a/instrumentation/events/lttng-module/kvm.h
++++ b/instrumentation/events/lttng-module/kvm.h
+@@ -325,6 +325,29 @@ DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_ready,
+ 	TP_ARGS(token, gva)
+ )
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
++
++TRACE_EVENT(
++	kvm_async_pf_completed,
++	TP_PROTO(unsigned long address, u64 gva),
++	TP_ARGS(address, gva),
++
++	TP_STRUCT__entry(
++		__field(unsigned long, address)
++		__field(u64, gva)
++		),
++
++	TP_fast_assign(
++		tp_assign(address, address)
++		tp_assign(gva, gva)
++		),
++
++	TP_printk("gva %#llx address %#lx",  __entry->gva,
++		  __entry->address)
++)
++
++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)) */
++
+ TRACE_EVENT(
+ 	kvm_async_pf_completed,
+ 	TP_PROTO(unsigned long address, struct page *page, u64 gva),
+@@ -346,6 +369,8 @@ TRACE_EVENT(
+ 		  __entry->address, __entry->pfn)
+ )
+ 
++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)) */
++
+ #endif
+ 
+ #endif
+-- 
+1.7.10.4
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lttng-modules.git/commitdiff/d78989f95fa50c33a58cfd494aa9cdc90eda1cae



More information about the pld-cvs-commit mailing list