Skip to content

Commit b3f6c43

Browse files
tebrandtrafaeljw
authored andcommitted
pm-graph v5.9
bootgraph: - fix parsing of /proc/version to be much more flexible - check kernel version to disallow ftrace on anything older than 4.10 sleepgraph: - include fix to bugzilla 212761 in case it regresses - fix for -proc bug: intel/pm-graph#20 - add -debugtiming arg to get timestamps on prints - allow use of the netfix tool hosted in the github repo - read s0ix data from pmc_core for better debug - include more system data in the output log - Do a better job testing input files useability - flag more error data from dmesg in the timeline - pre-parse the trace log to fix any ordering issues - add new parser to process dmesg only timelines - remove superflous sleep(5) in multitest mode config/custom-timeline-functions.cfg: - change some names to keep up to date README: - new version, small wording changes Signed-off-by: Todd Brandt <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 3234649 commit b3f6c43

File tree

4 files changed

+360
-186
lines changed

4 files changed

+360
-186
lines changed

tools/power/pm-graph/README

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
|_| |___/ |_|
77

88
pm-graph: suspend/resume/boot timing analysis tools
9-
Version: 5.8
9+
Version: 5.9
1010
Author: Todd Brandt <[email protected]>
1111
Home Page: https://01.org/pm-graph
1212

@@ -97,8 +97,8 @@
9797
(kernel/pre-3.15/enable_trace_events_suspend_resume.patch)
9898
(kernel/pre-3.15/enable_trace_events_device_pm_callback.patch)
9999

100-
If you're using a kernel older than 3.15.0, the following
101-
additional kernel parameters are required:
100+
If you're using bootgraph, or sleepgraph with a kernel older than 3.15.0,
101+
the following additional kernel parameters are required:
102102
(e.g. in file /etc/default/grub)
103103
GRUB_CMDLINE_LINUX_DEFAULT="... initcall_debug log_buf_len=32M ..."
104104

tools/power/pm-graph/bootgraph.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,24 @@ class SystemValues(aslib.SystemValues):
6969
bootloader = 'grub'
7070
blexec = []
7171
def __init__(self):
72-
self.hostname = platform.node()
72+
self.kernel, self.hostname = 'unknown', platform.node()
7373
self.testtime = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
7474
if os.path.exists('/proc/version'):
7575
fp = open('/proc/version', 'r')
76-
val = fp.read().strip()
76+
self.kernel = self.kernelVersion(fp.read().strip())
7777
fp.close()
78-
self.kernel = self.kernelVersion(val)
79-
else:
80-
self.kernel = 'unknown'
8178
self.testdir = datetime.now().strftime('boot-%y%m%d-%H%M%S')
8279
def kernelVersion(self, msg):
83-
return msg.split()[2]
80+
m = re.match('^[Ll]inux *[Vv]ersion *(?P<v>\S*) .*', msg)
81+
if m:
82+
return m.group('v')
83+
return 'unknown'
8484
def checkFtraceKernelVersion(self):
85-
val = tuple(map(int, self.kernel.split('-')[0].split('.')))
86-
if val >= (4, 10, 0):
87-
return True
85+
m = re.match('^(?P<x>[0-9]*)\.(?P<y>[0-9]*)\.(?P<z>[0-9]*).*', self.kernel)
86+
if m:
87+
val = tuple(map(int, m.groups()))
88+
if val >= (4, 10, 0):
89+
return True
8890
return False
8991
def kernelParams(self):
9092
cmdline = 'initcall_debug log_buf_len=32M'

tools/power/pm-graph/config/custom-timeline-functions.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ acpi_suspend_begin:
125125
suspend_console:
126126
acpi_pm_prepare:
127127
syscore_suspend:
128-
arch_thaw_secondary_cpus_end:
128+
arch_enable_nonboot_cpus_end:
129129
syscore_resume:
130130
acpi_pm_finish:
131131
resume_console:

0 commit comments

Comments
 (0)