summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorJianchuan Wang <jianchuan.wang@windriver.com>2015-07-10 14:33:12 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-16 15:09:18 +0100
commitc18fadb068d4bf76f79372808f220e892b520fb0 (patch)
treedf2e4c734a1bd3548f5ad30cf452c6de90638c93 /meta/recipes-kernel
parenta117fd5ecdd9973c7e4d772d1785f1f4e9b162c2 (diff)
downloadpoky-c18fadb068d4bf76f79372808f220e892b520fb0.tar.gz
lttng: Fix timer calculation error
Fix timer calculation error in the lttng-tools/lttng-ust (From OE-Core rev: 780a590cf2f0604435c05445d02c342e3387497f) Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/lttng-tools-Fix-live-timer-calculation-error.patch42
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb1
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/lttng-ust-Fix-live-timer-calculation-error.patch42
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.6.1.bb1
4 files changed, 86 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/lttng-tools-Fix-live-timer-calculation-error.patch b/meta/recipes-kernel/lttng/lttng-tools/lttng-tools-Fix-live-timer-calculation-error.patch
new file mode 100644
index 0000000000..4719d95489
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/lttng-tools-Fix-live-timer-calculation-error.patch
@@ -0,0 +1,42 @@
1From 161496fbe1465817a77a50a1172734dae81a13ef Mon Sep 17 00:00:00 2001
2From: Mikael Beckius <mikael.beckius@windriver.com>
3Date: Tue, 12 May 2015 11:11:48 +0200
4Subject: [PATCH] lttng-tools: Fix live timer calculation error
5
6There is an calculation error for live timer. Variable switch_timer_interval is
7based on microsecond, and it is not right to assign switch_timer_interval mod
81000000 to var tv_nsec which is based on nanosecond.
9
10Upstream-Status: Pending
11
12Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com>
13Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
14---
15 src/common/consumer-timer.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/src/common/consumer-timer.c b/src/common/consumer-timer.c
19index 1408052..c6202ba 100644
20--- a/src/common/consumer-timer.c
21+++ b/src/common/consumer-timer.c
22@@ -368,7 +368,7 @@ void consumer_timer_switch_start(struct lttng_consumer_channel *channel,
23 channel->switch_timer_enabled = 1;
24
25 its.it_value.tv_sec = switch_timer_interval / 1000000;
26- its.it_value.tv_nsec = switch_timer_interval % 1000000;
27+ its.it_value.tv_nsec = (switch_timer_interval % 1000000) * 1000;
28 its.it_interval.tv_sec = its.it_value.tv_sec;
29 its.it_interval.tv_nsec = its.it_value.tv_nsec;
30
31@@ -425,7 +425,7 @@ void consumer_timer_live_start(struct lttng_consumer_channel *channel,
32 channel->live_timer_enabled = 1;
33
34 its.it_value.tv_sec = live_timer_interval / 1000000;
35- its.it_value.tv_nsec = live_timer_interval % 1000000;
36+ its.it_value.tv_nsec = (live_timer_interval % 1000000) * 1000;
37 its.it_interval.tv_sec = its.it_value.tv_sec;
38 its.it_interval.tv_nsec = its.it_value.tv_nsec;
39
40--
411.9.1
42
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
index 8cc4220c20..6397a987a6 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
@@ -27,6 +27,7 @@ SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.6 \
27 file://runtest-2.4.0.patch \ 27 file://runtest-2.4.0.patch \
28 file://extern-decls.patch \ 28 file://extern-decls.patch \
29 file://run-ptest \ 29 file://run-ptest \
30 file://lttng-tools-Fix-live-timer-calculation-error.patch \
30 " 31 "
31 32
32S = "${WORKDIR}/git" 33S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-Fix-live-timer-calculation-error.patch b/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-Fix-live-timer-calculation-error.patch
new file mode 100644
index 0000000000..03120fe5d6
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-Fix-live-timer-calculation-error.patch
@@ -0,0 +1,42 @@
1From 6d02a6c1aeb1d050ffe7c6624bab9acfa76fc05f Mon Sep 17 00:00:00 2001
2From: Mikael Beckius <mikael.beckius@windriver.com>
3Date: Tue, 12 May 2015 11:04:34 +0200
4Subject: [PATCH] lttng-ust:Fix live timer calculation error
5
6There is an calculation error for live timer. Variable chan->switch_timer_interval is
7based on microsecond, and it is not right to assign chan->switch_timer_interval mod
81000000 to var tv_nsec which is based on nanosecond.
9
10Upstream-Status: Pending
11
12Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com>
13Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
14---
15 libringbuffer/ring_buffer_frontend.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c
19index eb4e486..e0377a3 100644
20--- a/libringbuffer/ring_buffer_frontend.c
21+++ b/libringbuffer/ring_buffer_frontend.c
22@@ -528,7 +528,7 @@ void lib_ring_buffer_channel_switch_timer_start(struct channel *chan)
23 }
24
25 its.it_value.tv_sec = chan->switch_timer_interval / 1000000;
26- its.it_value.tv_nsec = chan->switch_timer_interval % 1000000;
27+ its.it_value.tv_nsec = (chan->switch_timer_interval % 1000000) * 1000;
28 its.it_interval.tv_sec = its.it_value.tv_sec;
29 its.it_interval.tv_nsec = its.it_value.tv_nsec;
30
31@@ -582,7 +582,7 @@ void lib_ring_buffer_channel_read_timer_start(struct channel *chan)
32 }
33
34 its.it_value.tv_sec = chan->read_timer_interval / 1000000;
35- its.it_value.tv_nsec = chan->read_timer_interval % 1000000;
36+ its.it_value.tv_nsec = (chan->read_timer_interval % 1000000) * 1000;
37 its.it_interval.tv_sec = its.it_value.tv_sec;
38 its.it_interval.tv_nsec = its.it_value.tv_nsec;
39
40--
411.9.1
42
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.6.1.bb b/meta/recipes-kernel/lttng/lttng-ust_2.6.1.bb
index 590ec4ac7f..d083f86695 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.6.1.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.6.1.bb
@@ -24,6 +24,7 @@ PE = "2"
24SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.6 \ 24SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.6 \
25 file://lttng-ust-doc-examples-disable.patch \ 25 file://lttng-ust-doc-examples-disable.patch \
26 file://add-aarch64.patch \ 26 file://add-aarch64.patch \
27 file://lttng-ust-Fix-live-timer-calculation-error.patch \
27 " 28 "
28 29
29S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"