diff options
-rw-r--r-- | meta-oe/recipes-kernel/pm-graph/pm-graph/0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch | 51 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch b/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch new file mode 100644 index 0000000000..33557275fb --- /dev/null +++ b/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 9bbc991a927722439cad38c892fc9f57207089d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Liwei Song <liwei.song@windriver.com> | ||
3 | Date: Mon, 24 May 2021 08:27:28 +0000 | ||
4 | Subject: [PATCH] sleepgraph.py: parse unfished cpu exec line | ||
5 | |||
6 | exist the below case in ftrace file: | ||
7 | sleepgraph-6508 [003] .... 18197.824037: tracing_mark_write: ps - xxx..., lock_torture_wr-94 169,lock_torture_wr-95 143,lock_tort | ||
8 | sleepgraph-6508 [003] .... 18197.824043: tracing_mark_write: ure_wr-96 189,lock_torture_wr-97 174,lock_torture_wr-98 160,lock_torture_st-99 1 | ||
9 | |||
10 | lock_torture_wr-96 was split to different line due to limited buffer | ||
11 | size(1k) set in kernel, check this case and re-parse the unfinished | ||
12 | line. | ||
13 | |||
14 | Upstream-Status: [Submitted: https://github.com/intel/pm-graph/pull/20] | ||
15 | |||
16 | Signed-off-by: Liwei Song <liwei.song@windriver.com> | ||
17 | --- | ||
18 | sleepgraph.py | 17 +++++++++++++++-- | ||
19 | 1 file changed, 15 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/sleepgraph.py b/sleepgraph.py | ||
22 | index e340d5b3f03b..38b4439db8eb 100755 | ||
23 | --- a/sleepgraph.py | ||
24 | +++ b/sleepgraph.py | ||
25 | @@ -3365,8 +3365,21 @@ def parseTraceLog(live=False): | ||
26 | val = ps.split() | ||
27 | if not val: | ||
28 | continue | ||
29 | - name = val[0].replace('--', '-') | ||
30 | - proclist[name] = int(val[1]) | ||
31 | + if not len(val) < 2: | ||
32 | + name = val[0].replace('--', '-') | ||
33 | + proclist[name] = int(val[1]) | ||
34 | + else: | ||
35 | + proclist = dict() | ||
36 | + nextline = next(tf) | ||
37 | + mcont = re.match(tp.ftrace_line_fmt, nextline) | ||
38 | + n = m.group('ps') + mcont.group('msg').split(': ')[1] | ||
39 | + for pscont in n.split(','): | ||
40 | + val = pscont.split() | ||
41 | + if not val: | ||
42 | + continue | ||
43 | + if not len(val) < 2: | ||
44 | + name = val[0].replace('--', '-') | ||
45 | + proclist[name] = int(val[1]) | ||
46 | data.pstl[t.time] = proclist | ||
47 | continue | ||
48 | # find the end of resume | ||
49 | -- | ||
50 | 2.29.2 | ||
51 | |||
diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb index 4526eeed3f..4d7a1b2d45 100644 --- a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb +++ b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb | |||
@@ -10,6 +10,7 @@ SRC_URI = "git://github.com/intel/pm-graph.git \ | |||
10 | file://0001-Makefile-fix-multilib-build-failure.patch \ | 10 | file://0001-Makefile-fix-multilib-build-failure.patch \ |
11 | file://0001-sleepgraph.py-use-python3.patch \ | 11 | file://0001-sleepgraph.py-use-python3.patch \ |
12 | file://0001-sleepgraph-add-support-for-RT-kernel-ftrace-flags.patch \ | 12 | file://0001-sleepgraph-add-support-for-RT-kernel-ftrace-flags.patch \ |
13 | file://0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch \ | ||
13 | " | 14 | " |
14 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
15 | 16 | ||