]> git.pld-linux.org Git - packages/lttng-modules.git/commitdiff
- upstream fixes for linux 3.13 auto/th/lttng-modules-2.3.4-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 8 Feb 2014 09:10:07 +0000 (10:10 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 8 Feb 2014 09:10:07 +0000 (10:10 +0100)
lttng-modules-linux-3.13.patch [new file with mode: 0644]
lttng-modules.spec

diff --git a/lttng-modules-linux-3.13.patch b/lttng-modules-linux-3.13.patch
new file mode 100644 (file)
index 0000000..04d9afa
--- /dev/null
@@ -0,0 +1,127 @@
+From 33673ee7b705adb6b24350c30966d4937d41ed95 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@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@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@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@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
+
index 0eb5b9acb2292fa7d298e711e9de5049f9b4261e..9c8723ad77123eb1fc9b0677420ee4b93ec160e4 100644 (file)
@@ -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}
This page took 0.163921 seconds and 4 git commands to generate.