diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-07-30 00:16:52 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-07-30 00:16:52 +0300 |
commit | bb6a14e2f317abf60677c6ad8de9c33d5760bf36 (patch) | |
tree | 00457d3677e86437cec25fd7dab6c4513a53b1a4 /meta-openembedded/meta-oe/recipes-kernel/pm-graph | |
parent | defdca82c107f46e980c84bffb1b2c1263522fa0 (diff) | |
parent | cf6fd27dbd8e2d1b507f8c3752b85801b2c6ef57 (diff) | |
download | openbmc-bb6a14e2f317abf60677c6ad8de9c33d5760bf36.tar.xz |
Merge tag '0.63' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-kernel/pm-graph')
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch b/meta-openembedded/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch new file mode 100644 index 000000000..33557275f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch @@ -0,0 +1,51 @@ +From 9bbc991a927722439cad38c892fc9f57207089d3 Mon Sep 17 00:00:00 2001 +From: Liwei Song <liwei.song@windriver.com> +Date: Mon, 24 May 2021 08:27:28 +0000 +Subject: [PATCH] sleepgraph.py: parse unfished cpu exec line + +exist the below case in ftrace file: +sleepgraph-6508 [003] .... 18197.824037: tracing_mark_write: ps - xxx..., lock_torture_wr-94 169,lock_torture_wr-95 143,lock_tort +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 + +lock_torture_wr-96 was split to different line due to limited buffer +size(1k) set in kernel, check this case and re-parse the unfinished +line. + +Upstream-Status: [Submitted: https://github.com/intel/pm-graph/pull/20] + +Signed-off-by: Liwei Song <liwei.song@windriver.com> +--- + sleepgraph.py | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/sleepgraph.py b/sleepgraph.py +index e340d5b3f03b..38b4439db8eb 100755 +--- a/sleepgraph.py ++++ b/sleepgraph.py +@@ -3365,8 +3365,21 @@ def parseTraceLog(live=False): + val = ps.split() + if not val: + continue +- name = val[0].replace('--', '-') +- proclist[name] = int(val[1]) ++ if not len(val) < 2: ++ name = val[0].replace('--', '-') ++ proclist[name] = int(val[1]) ++ else: ++ proclist = dict() ++ nextline = next(tf) ++ mcont = re.match(tp.ftrace_line_fmt, nextline) ++ n = m.group('ps') + mcont.group('msg').split(': ')[1] ++ for pscont in n.split(','): ++ val = pscont.split() ++ if not val: ++ continue ++ if not len(val) < 2: ++ name = val[0].replace('--', '-') ++ proclist[name] = int(val[1]) + data.pstl[t.time] = proclist + continue + # find the end of resume +-- +2.29.2 + diff --git a/meta-openembedded/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb b/meta-openembedded/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb index 4526eeed3..4d7a1b2d4 100644 --- a/meta-openembedded/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb +++ b/meta-openembedded/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb @@ -10,6 +10,7 @@ SRC_URI = "git://github.com/intel/pm-graph.git \ file://0001-Makefile-fix-multilib-build-failure.patch \ file://0001-sleepgraph.py-use-python3.patch \ file://0001-sleepgraph-add-support-for-RT-kernel-ftrace-flags.patch \ + file://0001-sleepgraph.py-parse-unfished-cpu-exec-line.patch \ " S = "${WORKDIR}/git" |