diff options
author | Yasir-Khan <yasir_khan@mentor.com> | 2014-08-08 20:41:08 +0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-11 10:53:08 +0100 |
commit | 3b769f03959ccb991391fe0451aa2cc4a4a95a70 (patch) | |
tree | 09ae28c9a3ff8d35a31b335ad46c5592f2be9f5c /meta | |
parent | 4380b1ad385fd3e321408306b4f457e185a4119e (diff) | |
download | poky-3b769f03959ccb991391fe0451aa2cc4a4a95a70.tar.gz |
trace-cmd: Update to version 2.3.2
Current trace-cmd version 1.2 throws "recorder error in
splice input" error while recording a trace on kernel
version 3.10. Update the trace-cmd version to latest 2.3.2
to resolve this error and drop the redundant patches.
* patches dropped - not needed anymore
- trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch - backport
- trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch - backport
- trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch - backport
- trace-cmd-fix-syntax-error-of-shell.patch - backport
(From OE-Core rev: 3b5e792f3245e28495d61d7d7e8df0ef30070ebc)
Signed-off-by: Yasir-Khan <yasir_khan@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
6 files changed, 36 insertions, 248 deletions
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch deleted file mode 100644 index 8fdeedb008..0000000000 --- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From a6e259b2cd43db3c0f69441f627a8cf214f88506 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Thu, 5 Apr 2012 15:19:44 -0400 | ||
4 | Subject: [PATCH] trace-cmd: Add checks for invalid pointers to fix segfaults | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Running 'trace-cmd report' after running latency tracers will cause a | ||
9 | segfault due to invalid pointers. Adding checks to ensure | ||
10 | pointers/lists are initialized before attempting to use them prevents | ||
11 | these segfaults. | ||
12 | |||
13 | Link: http://lkml.kernel.org/r/1333653586-3379-2-git-send-email-mark.asselstine@windriver.com | ||
14 | |||
15 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
16 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
17 | --- | ||
18 | trace-input.c | 12 +++++++++--- | ||
19 | 1 file changed, 9 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/trace-input.c b/trace-input.c | ||
22 | index b6af1e6..5151c1e 100644 | ||
23 | --- a/trace-input.c | ||
24 | +++ b/trace-input.c | ||
25 | @@ -695,7 +695,8 @@ static void __free_page(struct tracecmd_input *handle, struct page *page) | ||
26 | |||
27 | static void free_page(struct tracecmd_input *handle, int cpu) | ||
28 | { | ||
29 | - if (!handle->cpu_data[cpu].page) | ||
30 | + if (!handle->cpu_data || cpu >= handle->cpus || | ||
31 | + !handle->cpu_data[cpu].page) | ||
32 | return; | ||
33 | |||
34 | __free_page(handle, handle->cpu_data[cpu].page); | ||
35 | @@ -746,8 +747,12 @@ void tracecmd_record_ref(struct record *record) | ||
36 | |||
37 | static void free_next(struct tracecmd_input *handle, int cpu) | ||
38 | { | ||
39 | - struct record *record = handle->cpu_data[cpu].next; | ||
40 | + struct record *record; | ||
41 | + | ||
42 | + if (!handle->cpu_data || cpu >= handle->cpus) | ||
43 | + return; | ||
44 | |||
45 | + record = handle->cpu_data[cpu].next; | ||
46 | if (!record) | ||
47 | return; | ||
48 | |||
49 | @@ -2337,7 +2342,8 @@ void tracecmd_close(struct tracecmd_input *handle) | ||
50 | /* The tracecmd_peek_data may have cached a record */ | ||
51 | free_next(handle, cpu); | ||
52 | free_page(handle, cpu); | ||
53 | - if (!list_empty(&handle->cpu_data[cpu].pages)) | ||
54 | + if (handle->cpu_data && | ||
55 | + !list_empty(&handle->cpu_data[cpu].pages)) | ||
56 | warning("pages still allocated on cpu %d%s", | ||
57 | cpu, show_records(&handle->cpu_data[cpu].pages)); | ||
58 | } | ||
59 | -- | ||
60 | 1.7.10.4 | ||
61 | |||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch deleted file mode 100644 index 4c00c512bb..0000000000 --- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 356dee73d9ced3e019dea2883a7f357fd4664b3e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Thu, 5 Apr 2012 15:19:45 -0400 | ||
4 | Subject: [PATCH] trace-cmd: Do not call stop_threads() if doing latency | ||
5 | tracing | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | If we are using a latency tracer we do not call start_threads() we | ||
10 | should therefore not call stop_threads() if 'latency'. Attempting | ||
11 | to call stop_threads() without first calling start_threads() will | ||
12 | cause a segfault since pids will be uninitialized. | ||
13 | |||
14 | Link: http://lkml.kernel.org/r/1333653586-3379-3-git-send-email-mark.asselstine@windriver.com | ||
15 | |||
16 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
17 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
18 | --- | ||
19 | trace-record.c | 3 ++- | ||
20 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/trace-record.c b/trace-record.c | ||
23 | index fcec28b..1c56fa9 100644 | ||
24 | --- a/trace-record.c | ||
25 | +++ b/trace-record.c | ||
26 | @@ -2216,7 +2216,8 @@ void trace_record (int argc, char **argv) | ||
27 | } | ||
28 | |||
29 | disable_tracing(); | ||
30 | - stop_threads(); | ||
31 | + if (!latency) | ||
32 | + stop_threads(); | ||
33 | } | ||
34 | |||
35 | for (cpu = 0; cpu < cpu_count; cpu++) { | ||
36 | -- | ||
37 | 1.7.10.4 | ||
38 | |||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch deleted file mode 100644 index 724e1e80b1..0000000000 --- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | From d65740d61e7a4ea6d8d77237954b33dd18e3276c Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Sun, 8 Apr 2012 11:38:45 -0400 | ||
4 | Subject: [PATCH] trace-cmd: Setting plugin to 'nop' clears data before it's | ||
5 | recorded | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | commit e09a5db1a929ab668c273b87c4f0a32b81e1c21a | ||
10 | [trace-cmd: Add trace-cmd record --date option] | ||
11 | |||
12 | moved the call to disable_all() in trace_record() from after record_data() | ||
13 | to before it. Unfortunately disable_all() sets 'nop' in 'current_tracer' | ||
14 | which has the side affect of clearing 'trace', thus all the latency tracer | ||
15 | reports are empty/useless. Here we make disable_all() optionally call | ||
16 | set_plugin() thus, where we need to, we can delay the disabling of the tracer | ||
17 | until we have had a chance to capture 'trace'. We have added this delayed | ||
18 | behavior to trace_record() to fix the latency reports, for all other calls to | ||
19 | disable_all() we continue to have set_plugin() called. | ||
20 | |||
21 | Link: http://lkml.kernel.org/r/1333899525-6436-1-git-send-email-mark.asselstine@windriver.com | ||
22 | |||
23 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
24 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
25 | --- | ||
26 | trace-record.c | 16 ++++++++++------ | ||
27 | 1 file changed, 10 insertions(+), 6 deletions(-) | ||
28 | |||
29 | diff --git a/trace-record.c b/trace-record.c | ||
30 | index 1c56fa9..95d4a2a 100644 | ||
31 | --- a/trace-record.c | ||
32 | +++ b/trace-record.c | ||
33 | @@ -897,11 +897,13 @@ static void disable_tracing(void) | ||
34 | write_tracing_on(0); | ||
35 | } | ||
36 | |||
37 | -static void disable_all(void) | ||
38 | +static void disable_all(int disable_tracer) | ||
39 | { | ||
40 | disable_tracing(); | ||
41 | |||
42 | - set_plugin("nop"); | ||
43 | + if (disable_tracer) | ||
44 | + set_plugin("nop"); | ||
45 | + | ||
46 | reset_events(); | ||
47 | |||
48 | /* Force close and reset of ftrace pid file */ | ||
49 | @@ -1573,7 +1575,7 @@ static void set_funcs(void) | ||
50 | /* make sure we are filtering functions */ | ||
51 | if (func_stack) { | ||
52 | if (!functions_filtered()) { | ||
53 | - disable_all(); | ||
54 | + disable_all(1); | ||
55 | die("Function stack trace set, but functions not filtered"); | ||
56 | } | ||
57 | save_option(FUNC_STACK_TRACE); | ||
58 | @@ -1938,7 +1940,7 @@ void trace_record (int argc, char **argv) | ||
59 | break; | ||
60 | } | ||
61 | } | ||
62 | - disable_all(); | ||
63 | + disable_all(1); | ||
64 | set_buffer_size(); | ||
65 | exit(0); | ||
66 | } else | ||
67 | @@ -2147,7 +2149,7 @@ void trace_record (int argc, char **argv) | ||
68 | |||
69 | if (!extract) { | ||
70 | fset = set_ftrace(!disable); | ||
71 | - disable_all(); | ||
72 | + disable_all(1); | ||
73 | |||
74 | /* Record records the date first */ | ||
75 | if (record && date) | ||
76 | @@ -2227,7 +2229,7 @@ void trace_record (int argc, char **argv) | ||
77 | } | ||
78 | |||
79 | if (!keep) | ||
80 | - disable_all(); | ||
81 | + disable_all(0); | ||
82 | |||
83 | printf("Kernel buffer statistics:\n" | ||
84 | " Note: \"entries\" are the entries left in the kernel ring buffer and are not\n" | ||
85 | @@ -2249,6 +2251,8 @@ void trace_record (int argc, char **argv) | ||
86 | if (keep) | ||
87 | exit(0); | ||
88 | |||
89 | + set_plugin("nop"); | ||
90 | + | ||
91 | /* If tracing_on was enabled before we started, set it on now */ | ||
92 | if (tracing_on_init_val) | ||
93 | write_tracing_on(tracing_on_init_val); | ||
94 | -- | ||
95 | 1.7.10.4 | ||
96 | |||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch deleted file mode 100644 index 8e7c2a45f9..0000000000 --- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | trace-cmd: fix syntax error of shell | ||
2 | |||
3 | Delete "<<<" syntax of bash in Makefile, else we would get following error: | ||
4 | |||
5 | Syntax error: redirection unexpected | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
10 | --- | ||
11 | Makefile | 3 +-- | ||
12 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/Makefile b/Makefile | ||
15 | index c1fa906..7973c53 100644 | ||
16 | --- a/Makefile | ||
17 | +++ b/Makefile | ||
18 | @@ -89,8 +89,7 @@ endif | ||
19 | |||
20 | # $(call test-build, snippet, ret) -> ret if snippet compiles | ||
21 | # -> empty otherwise | ||
22 | -test-build = $(if $(shell $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 \ | ||
23 | - <<<'$1' && echo y), $2) | ||
24 | +test-build = $(if $(shell echo '$1' |$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y), $2) | ||
25 | |||
26 | # have udis86 disassembler library? | ||
27 | udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86) | ||
28 | -- | ||
29 | 1.7.9.5 | ||
30 | |||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb deleted file mode 100644 index 6f3319dfd1..0000000000 --- a/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | SUMMARY = "User interface to Ftrace" | ||
2 | LICENSE = "GPLv2 & LGPLv2.1" | ||
3 | |||
4 | require trace-cmd.inc | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
7 | file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \ | ||
8 | file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \ | ||
9 | file://trace-input.c;beginline=5;endine=8;md5=6ad47cc2b03385d8456771eec5eeea0b" | ||
10 | |||
11 | SRC_URI_append = "file://trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch \ | ||
12 | file://trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch \ | ||
13 | file://trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch \ | ||
14 | file://trace-cmd-fix-syntax-error-of-shell.patch \ | ||
15 | " | ||
16 | |||
17 | EXTRA_OEMAKE = "'prefix=${prefix}'" | ||
18 | |||
19 | FILES_${PN}-dbg += "${datadir}/trace-cmd/plugins/.debug/" | ||
20 | |||
21 | do_install() { | ||
22 | oe_runmake prefix="${prefix}" DESTDIR="${D}" install | ||
23 | } | ||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb new file mode 100644 index 0000000000..8d26205672 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | SUMMARY = "User interface to Ftrace" | ||
2 | LICENSE = "GPLv2 & LGPLv2.1" | ||
3 | |||
4 | require trace-cmd.inc | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
7 | file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \ | ||
8 | file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \ | ||
9 | file://trace-input.c;beginline=5;endine=8;md5=dafd8a1cade30b847a8686dd3628cea4 \ | ||
10 | " | ||
11 | SRCREV = "79e08f8edb38c4c5098486caaa87ca90ba00f547" | ||
12 | |||
13 | PV = "2.3.2+git${SRCPV}" | ||
14 | |||
15 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git;branch=trace-cmd-stable-v2.3 \ | ||
16 | " | ||
17 | |||
18 | EXTRA_OEMAKE = "\ | ||
19 | 'prefix=${prefix}' \ | ||
20 | 'bindir=${bindir}' \ | ||
21 | 'man_dir=${mandir}' \ | ||
22 | 'html_install=${datadir}/kernelshark/html' \ | ||
23 | 'img_install=${datadir}/kernelshark/html/images' \ | ||
24 | \ | ||
25 | 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \ | ||
26 | 'libdir=${@oe.path.relative(prefix, libdir)}' \ | ||
27 | \ | ||
28 | NO_PYTHON=1 \ | ||
29 | " | ||
30 | |||
31 | FILES_${PN}-dbg += "${libdir}/trace-cmd/plugins/.debug" | ||
32 | |||
33 | do_install() { | ||
34 | oe_runmake DESTDIR="${D}" install | ||
35 | } | ||
36 | |||