diff options
author | Xueqin Luo <luoxueqin@kylinos.cn> | 2023-03-16 04:33:07 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-03-27 20:24:08 +0300 |
commit | 34ea427e01ea60d9a9328d2d5a72d43740be25bc (patch) | |
tree | 68cb79405e1647083fc2643b0d7278fc014c46dd /tools/power | |
parent | 0417552730d0b1c30268fd32546914290b7c7ca0 (diff) | |
download | linux-34ea427e01ea60d9a9328d2d5a72d43740be25bc.tar.xz |
PM: tools: sleepgraph: Recognize "CPU killed" messages
On the arm64 platform with PSCI, the core log of CPU offline is as
follows:
[ 100.431501] CPU1: shutdown
[ 100.454820] psci: CPU1 killed (polled 20 ms)
[ 100.459266] CPU2: shutdown
[ 100.482575] psci: CPU2 killed (polled 20 ms)
[ 100.486057] CPU3: shutdown
[ 100.513974] psci: CPU3 killed (polled 28 ms)
[ 100.518068] CPU4: shutdown
[ 100.541481] psci: CPU4 killed (polled 24 ms)
Prevent sleepgraph from mistakenly treating the "CPU up" message as part
of the suspend flow (because it should be regarded as part of the resume
flow) by making it recognize the "CPU* killed" messages above.
Signed-off-by: Xueqin Luo <luoxueqin@kylinos.cn>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power')
-rwxr-xr-x | tools/power/pm-graph/sleepgraph.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/power/pm-graph/sleepgraph.py b/tools/power/pm-graph/sleepgraph.py index ab703c9227d5..4a356a706785 100755 --- a/tools/power/pm-graph/sleepgraph.py +++ b/tools/power/pm-graph/sleepgraph.py @@ -4151,9 +4151,12 @@ def parseKernelLog(data): elif(re.match('Enabling non-boot CPUs .*', msg)): # start of first cpu resume cpu_start = ktime - elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)): + elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)) \ + or re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)): # end of a cpu suspend, start of the next m = re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg) + if(not m): + m = re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg) cpu = 'CPU'+m.group('cpu') if(cpu not in actions): actions[cpu] = [] |