TOOLS: pm-graph v5.0
Todd Brandt
maintainercover TOOLS: pm-graph v5.0
Upgrade the pm-graph tools from v4.7 to v5.0
Todd Brandt (3):
pm-graph: config files and installer
pm-graph: AnalyzeBoot v2.2
pm-graph: AnalyzeSuspend v5.0
tools/power/pm-graph/Makefile | 29 +-
tools/power/pm-graph/bootgraph.8 | 18 +-
.../pm-graph/{analyze_boot.py => bootgraph.py} | 219 ++-
tools/power/pm-graph/config/cgskip.txt | 65 +
.../pm-graph/config/custom-timeline-functions.cfg | 205 +++
tools/power/pm-graph/config/example.cfg | 133 ++
tools/power/pm-graph/config/freeze-callgraph.cfg | 94 ++
tools/power/pm-graph/config/freeze-dev.cfg | 93 ++
tools/power/pm-graph/config/freeze.cfg | 93 ++
tools/power/pm-graph/config/standby-callgraph.cfg | 94 ++
tools/power/pm-graph/config/standby-dev.cfg | 93 ++
tools/power/pm-graph/config/standby.cfg | 93 ++
tools/power/pm-graph/config/suspend-callgraph.cfg | 98 ++
tools/power/pm-graph/config/suspend-dev.cfg | 93 ++
tools/power/pm-graph/config/suspend-x2-proc.cfg | 93 ++
tools/power/pm-graph/config/suspend.cfg | 93 ++
tools/power/pm-graph/sleepgraph.8 | 47 +-
.../pm-graph/{analyze_suspend.py => sleepgraph.py} | 1625 ++++++++++++--------
18 files changed, 2575 insertions(+), 703 deletions(-)
rename tools/power/pm-graph/{analyze_boot.py => bootgraph.py} (85%)
create mode 100644 tools/power/pm-graph/config/cgskip.txt
create mode 100644 tools/power/pm-graph/config/custom-timeline-functions.cfg
create mode 100644 tools/power/pm-graph/config/example.cfg
create mode 100644 tools/power/pm-graph/config/freeze-callgraph.cfg
create mode 100644 tools/power/pm-graph/config/freeze-dev.cfg
create mode 100644 tools/power/pm-graph/config/freeze.cfg
create mode 100644 tools/power/pm-graph/config/standby-callgraph.cfg
create mode 100644 tools/power/pm-graph/config/standby-dev.cfg
create mode 100644 tools/power/pm-graph/config/standby.cfg
create mode 100644 tools/power/pm-graph/config/suspend-callgraph.cfg
create mode 100644 tools/power/pm-graph/config/suspend-dev.cfg
create mode 100644 tools/power/pm-graph/config/suspend-x2-proc.cfg
create mode 100644 tools/power/pm-graph/config/suspend.cfg
rename tools/power/pm-graph/{analyze_suspend.py => sleepgraph.py} (82%)Signature · 1 line
2.14.1
Todd Brandt
maintainerPATCH 1/3 pm-graph: config files and installer
- name change: analyze_boot.py to bootgraph.py
- name change: analyze_suspend.py to sleepgraph.py
- added config files for easier sleepgraph usage
- added example.cfg which describes all config options
- added cgskip.txt definition for slimmer callgraphs
---
tools/power/pm-graph/Makefile | 29 ++-
.../pm-graph/{analyze_boot.py => bootgraph.py} | 0
tools/power/pm-graph/config/cgskip.txt | 65 +++++++
.../pm-graph/config/custom-timeline-functions.cfg | 205 +++++++++++++++++++++
tools/power/pm-graph/config/example.cfg | 133 +++++++++++++
tools/power/pm-graph/config/freeze-callgraph.cfg | 94 ++++++++++
tools/power/pm-graph/config/freeze-dev.cfg | 93 ++++++++++
tools/power/pm-graph/config/freeze.cfg | 93 ++++++++++
tools/power/pm-graph/config/standby-callgraph.cfg | 94 ++++++++++
tools/power/pm-graph/config/standby-dev.cfg | 93 ++++++++++
tools/power/pm-graph/config/standby.cfg | 93 ++++++++++
tools/power/pm-graph/config/suspend-callgraph.cfg | 98 ++++++++++
tools/power/pm-graph/config/suspend-dev.cfg | 93 ++++++++++
tools/power/pm-graph/config/suspend-x2-proc.cfg | 93 ++++++++++
tools/power/pm-graph/config/suspend.cfg | 93 ++++++++++
.../pm-graph/{analyze_suspend.py => sleepgraph.py} | 0
16 files changed, 1362 insertions(+), 7 deletions(-)
rename tools/power/pm-graph/{analyze_boot.py => bootgraph.py} (100%)
create mode 100644 tools/power/pm-graph/config/cgskip.txt
create mode 100644 tools/power/pm-graph/config/custom-timeline-functions.cfg
create mode 100644 tools/power/pm-graph/config/example.cfg
create mode 100644 tools/power/pm-graph/config/freeze-callgraph.cfg
create mode 100644 tools/power/pm-graph/config/freeze-dev.cfg
create mode 100644 tools/power/pm-graph/config/freeze.cfg
create mode 100644 tools/power/pm-graph/config/standby-callgraph.cfg
create mode 100644 tools/power/pm-graph/config/standby-dev.cfg
create mode 100644 tools/power/pm-graph/config/standby.cfg
create mode 100644 tools/power/pm-graph/config/suspend-callgraph.cfg
create mode 100644 tools/power/pm-graph/config/suspend-dev.cfg
create mode 100644 tools/power/pm-graph/config/suspend-x2-proc.cfg
create mode 100644 tools/power/pm-graph/config/suspend.cfg
rename tools/power/pm-graph/{analyze_suspend.py => sleepgraph.py} (100%)tools/power/pm-graph/Makefile +22 -7
@@ -7,11 +7,24 @@ all: install : uninstall install -d $(DESTDIR)$(PREFIX)/lib/pm-graph - install analyze_suspend.py $(DESTDIR)$(PREFIX)/lib/pm-graph - install analyze_boot.py $(DESTDIR)$(PREFIX)/lib/pm-graph + install sleepgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph + install bootgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph + install -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/cgskip.txt $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/freeze-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/freeze.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/freeze-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/standby-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/standby.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/standby-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/suspend-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/suspend.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/suspend-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config + install -m 644 config/suspend-x2-proc.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config - ln -s $(DESTDIR)$(PREFIX)/lib/pm-graph/analyze_boot.py $(DESTDIR)$(PREFIX)/bin/bootgraph - ln -s $(DESTDIR)$(PREFIX)/lib/pm-graph/analyze_suspend.py $(DESTDIR)$(PREFIX)/bin/sleepgraph + install -d $(DESTDIR)$(PREFIX)/bin + ln -s $(DESTDIR)$(PREFIX)/lib/pm-graph/bootgraph.py $(DESTDIR)$(PREFIX)/bin/bootgraph + ln -s $(DESTDIR)$(PREFIX)/lib/pm-graph/sleepgraph.py $(DESTDIR)$(PREFIX)/bin/sleepgraph install -d $(DESTDIR)$(PREFIX)/share/man/man8 install bootgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8
@@ -24,9 +37,11 @@ uninstall : rm -f $(DESTDIR)$(PREFIX)/bin/bootgraph rm -f $(DESTDIR)$(PREFIX)/bin/sleepgraph - rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/analyze_boot.py - rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/analyze_suspend.py - rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/*.pyc + rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/config/* + if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config ] ; then \ + rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/config; \ + fi; + rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/* if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph ] ; then \ rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph; \ fi;
tools/power/pm-graph/bootgraph.py renamed from tools/power/pm-graph/analyze_boot.py +0 -0
tools/power/pm-graph/config/cgskip.txt new file +65 -0
65 lines not on this page · raw message
tools/power/pm-graph/config/custom-timeline-functions.cfg new file +205 -0
205 lines not on this page · raw message
tools/power/pm-graph/config/example.cfg new file +133 -0
133 lines not on this page · raw message
tools/power/pm-graph/config/freeze-callgraph.cfg new file +94 -0
94 lines not on this page · raw message
tools/power/pm-graph/config/freeze-dev.cfg new file +93 -0
93 lines not on this page · raw message
tools/power/pm-graph/config/freeze.cfg new file +93 -0
93 lines not on this page · raw message
tools/power/pm-graph/config/standby-callgraph.cfg new file +94 -0
94 lines not on this page · raw message
tools/power/pm-graph/config/standby-dev.cfg new file +93 -0
93 lines not on this page · raw message
tools/power/pm-graph/config/standby.cfg new file +93 -0
93 lines not on this page · raw message
tools/power/pm-graph/config/suspend-callgraph.cfg new file +98 -0
98 lines not on this page · raw message
tools/power/pm-graph/config/suspend-dev.cfg new file +93 -0
93 lines not on this page · raw message
tools/power/pm-graph/config/suspend-x2-proc.cfg new file +93 -0
93 lines not on this page · raw message
tools/power/pm-graph/config/suspend.cfg new file +93 -0
93 lines not on this page · raw message
tools/power/pm-graph/sleepgraph.py renamed from tools/power/pm-graph/analyze_suspend.py +0 -0
Signature · 1 line
2.14.1
Todd Brandt
maintainerPATCH 2/3 pm-graph: AnalyzeBoot v2.2
In reply to Todd Brandt- add -cgskip option to reduce callgraph output size
- add -cgfilter option to focus on a list of devices
- add -result option for exporting batch test results
- removed all phoronix hooks, use -result to enable batch testing
- changed argument -f to match sleegraph, -f = -callgraph
- use -fstat for function status instead of -f
- add -verbose option to print out timeline stats and kernel options
- include command string and kernel params in timeline output header
--- tools/power/pm-graph/bootgraph.8 | 18 +++- tools/power/pm-graph/bootgraph.py | 219 +++++++++++++++++++++++++------------- 2 files changed, 160 insertions(+), 77 deletions(-)
tools/power/pm-graph/bootgraph.8 +14 -4
@@ -37,6 +37,9 @@ Print the current tool version Add the dmesg log to the html output. It will be viewable by clicking a button in the timeline. .TP +\fB-result \fIfile\fR +Export a results table to a text file for parsing. +.TP \fB-o \fIname\fR Overrides the output subdirectory name when running a new test. Use {date}, {time}, {hostname} for current values.
@@ -44,14 +47,14 @@ Use {date}, {time}, {hostname} for current values. e.g. boot-{hostname}-{date}-{time} .SS "advanced" .TP -\fB-f\fR -Use ftrace to add function detail (default: disabled) -.TP -\fB-callgraph\fR +\fB-f or -callgraph\fR Use ftrace to create initcall callgraphs (default: disabled). If -func is not used there will be one callgraph per initcall. This can produce very large outputs, i.e. 10MB - 100MB. .TP +\fB-fstat\fR +Use ftrace to add function detail (default: disabled) +.TP \fB-maxdepth \fIlevel\fR limit the callgraph trace depth to \fIlevel\fR (default: 2). This is the best way to limit the output size when using -callgraph.
@@ -67,6 +70,13 @@ Reduce callgraph output in the timeline by limiting it to a list of calls. The argument can be a single function name or a comma delimited list. (default: none) .TP +\fB-cgskip \fIfile\fR +Reduce callgraph output in the timeline by skipping over uninteresting +functions in the trace, e.g. printk or console_unlock. The functions listed +in this file will show up as empty leaves in the callgraph with only the start/end +times displayed. +(default: none) +.TP \fB-timeprec \fIn\fR Number of significant digits in timestamps (0:S, 3:ms, [6:us]) .TP
tools/power/pm-graph/bootgraph.py +146 -73
452 lines not on this page · raw message
Signature · 1 line
2.14.1
Todd Brandt
maintainerPATCH 3/3 pm-graph: AnalyzeSuspend v5.0
In reply to Todd Brandt- add -cgskip option to reduce callgraph output size
- add -cgfilter option to focus on a list of devices
- add -result option for exporting batch test results
- removed all phoronix hooks, use -result to enable batch testing
- change -usbtopo to -devinfo, now prints all devices
- add -gzip option to read/write logs in gz format
- add -bufsize option to manually control ftrace buffer size
- add -sync option to run filesystem sync prior to test
- add -display option to enable/disable the display prior to test
- add -rs option to enable/disable runtime suspend on all devices for test
- add installed config files to search path
- add kernel error/warning links into the timeline
- fix callgraph trace to better handle interrupts
- include command string and kernel params in timeline output header
--- tools/power/pm-graph/sleepgraph.8 | 47 +- tools/power/pm-graph/sleepgraph.py | 1625 ++++++++++++++++++++++-------------- 2 files changed, 1053 insertions(+), 619 deletions(-)
tools/power/pm-graph/sleepgraph.8 +41 -6
@@ -52,9 +52,32 @@ disable rtcwake and require a user keypress to resume. \fB-addlogs\fR Add the dmesg and ftrace logs to the html output. They will be viewable by clicking buttons in the timeline. +.TP +\fB-result \fIfile\fR +Export a results table to a text file for parsing. +.TP +\fB-sync\fR +Sync the filesystems before starting the test. This reduces the size of +the sys_sync call which happens in the suspend_prepare phase. +.TP +\fB-rs \fIenable/disable\fR +During test, enable/disable runtime suspend for all devices. The test is delayed +by 5 seconds to allow runtime suspend changes to occur. The settings are restored +after the test is complete. +.TP +\fB-display \fIon/off\fR +Turn the display on or off for the test using the xset command. This helps +maintain the consistecy of test data for better comparison. +.TP +\fB-skiphtml\fR +Run the test and capture the trace logs, but skip the timeline generation. .SS "advanced" .TP +\fB-gzip\fR +Gzip the trace and dmesg logs to save space. The tool can also read in gzipped +logs for processing. +.TP \fB-cmd \fIstr\fR Run the timeline over a custom suspend command, e.g. pm-suspend. By default the tool forces suspend via /sys/power/state so this allows testing over
@@ -114,6 +137,18 @@ This reduces the html file size as there can be many tiny callgraphs which are barely visible in the timeline. The value is a float: e.g. 0.001 represents 1 us. .TP +\fB-cgfilter \fI"func1,func2,..."\fR +Reduce callgraph output in the timeline by limiting it to a list of calls. The +argument can be a single function name or a comma delimited list. +(default: none) +.TP +\fB-cgskip \fIfile\fR +Reduce callgraph timeline size by skipping over uninteresting functions +in the trace, e.g. printk or console_unlock. The functions listed +in this file will show up as empty leaves in the callgraph with only the start/end +times displayed. cgskip.txt is used automatically if found in the path, so +use "off" to disable completely (default: cgskip.txt) +.TP \fB-cgphase \fIp\fR Only show callgraph data for phase \fIp\fR (e.g. suspend_late). .TP
@@ -122,6 +157,9 @@ In an x2 run, only show callgraph data for test \fIn\fR (e.g. 0 or 1). .TP \fB-timeprec \fIn\fR Number of significant digits in timestamps (0:S, [3:ms], 6:us). +.TP +\fB-bufsize \fIN\fR +Set trace buffer size to N kilo-bytes (default: all of free memory up to 3GB) .SH COMMANDS .TP
@@ -144,11 +182,8 @@ Print out the contents of the ACPI Firmware Performance Data Table. \fB-sysinfo\fR Print out system info extracted from BIOS. Reads /dev/mem directly instead of going through dmidecode. .TP -\fB-usbtopo\fR -Print out the current USB topology with power info. -.TP -\fB-usbauto\fR -Enable autosuspend for all connected USB devices. +\fB-devinfo\fR +Print out the pm settings of all devices which support runtime suspend. .TP \fB-flist\fR Print the list of ftrace functions currently being captured. Functions
@@ -198,7 +233,7 @@ Execute a mem suspend with a 15 second wakeup. Include the logs in the html. .PP Execute a standby with a 15 second wakeup. Change the output folder name. .IP -\f(CW$ sudo sleepgraph -m standby -rtcwake 15 -o "standby-{hostname}-{date}-{time}"\fR +\f(CW$ sudo sleepgraph -m standby -rtcwake 15 -o "standby-{host}-{date}-{time}"\fR .PP Execute a freeze with no wakeup (require keypress). Change output folder name. .IP
tools/power/pm-graph/sleepgraph.py +1012 -613
2,597 lines not on this page · raw message
Signature · 1 line
2.14.1
Hi Todd,
Quoted 33 lines · CET Todd Brandt
Upgrade the pm-graph tools from v4.7 to v5.0
Todd Brandt (3):
pm-graph: config files and installer
pm-graph: AnalyzeBoot v2.2
pm-graph: AnalyzeSuspend v5.0tools/power/pm-graph/Makefile | 29 +- tools/power/pm-graph/bootgraph.8 | 18 +- .../pm-graph/{analyze_boot.py => bootgraph.py} | 219 ++- tools/power/pm-graph/config/cgskip.txt | 65 + .../pm-graph/config/custom-timeline-functions.cfg | 205 +++ tools/power/pm-graph/config/example.cfg | 133 ++ tools/power/pm-graph/config/freeze-callgraph.cfg | 94 ++ tools/power/pm-graph/config/freeze-dev.cfg | 93 ++ tools/power/pm-graph/config/freeze.cfg | 93 ++ tools/power/pm-graph/config/standby-callgraph.cfg | 94 ++ tools/power/pm-graph/config/standby-dev.cfg | 93 ++ tools/power/pm-graph/config/standby.cfg | 93 ++ tools/power/pm-graph/config/suspend-callgraph.cfg | 98 ++ tools/power/pm-graph/config/suspend-dev.cfg | 93 ++ tools/power/pm-graph/config/suspend-x2-proc.cfg | 93 ++ tools/power/pm-graph/config/suspend.cfg | 93 ++ tools/power/pm-graph/sleepgraph.8 | 47 +- .../pm-graph/{analyze_suspend.py => sleepgraph.py} | 1625 ++++++++++++-------- 18 files changed, 2575 insertions(+), 703 deletions(-) rename tools/power/pm-graph/{analyze_boot.py => bootgraph.py} (85%) create mode 100644 tools/power/pm-graph/config/cgskip.txt create mode 100644 tools/power/pm-graph/config/custom-timeline-functions.cfg create mode 100644 tools/power/pm-graph/config/example.cfg create mode 100644 tools/power/pm-graph/config/freeze-callgraph.cfg create mode 100644 tools/power/pm-graph/config/freeze-dev.cfg create mode 100644 tools/power/pm-graph/config/freeze.cfg
Quoted 10 lines
create mode 100644 tools/power/pm-graph/config/standby-callgraph.cfg
create mode 100644 tools/power/pm-graph/config/standby-dev.cfg
create mode 100644 tools/power/pm-graph/config/standby.cfg
create mode 100644 tools/power/pm-graph/config/suspend-callgraph.cfg
create mode 100644 tools/power/pm-graph/config/suspend-dev.cfg
create mode 100644 tools/power/pm-graph/config/suspend-x2-proc.cfg
create mode 100644 tools/power/pm-graph/config/suspend.cfg
rename tools/power/pm-graph/{analyze_suspend.py => sleepgraph.py} (82%)This is a major update, so I would prefer to queue it up for 4.17 to trying to squeeze it into 4.16 at this point.
Please let me know if that would be a problem.
Thanks,
Rafael
Todd Brandt
maintainerQuoted 54 lines · Rafael J. Wysocki
Hi Todd,
Quoted 47 lines · CET Todd Brandt
Upgrade the pm-graph tools from v4.7 to v5.0
Todd Brandt (3):
pm-graph: config files and installer
pm-graph: AnalyzeBoot v2.2
pm-graph: AnalyzeSuspend v5.0tools/power/pm-graph/Makefile | 29 +- tools/power/pm-graph/bootgraph.8 | 18 +- .../pm-graph/{analyze_boot.py => bootgraph.py} | 219 ++- tools/power/pm-graph/config/cgskip.txt | 65 + .../pm-graph/config/custom-timeline-functions.cfg | 205 +++ tools/power/pm-graph/config/example.cfg | 133 ++ tools/power/pm-graph/config/freeze-callgraph.cfg | 94 ++ tools/power/pm-graph/config/freeze-dev.cfg | 93 ++ tools/power/pm-graph/config/freeze.cfg | 93 ++ tools/power/pm-graph/config/standby-callgraph.cfg | 94 ++ tools/power/pm-graph/config/standby-dev.cfg | 93 ++ tools/power/pm-graph/config/standby.cfg | 93 ++ tools/power/pm-graph/config/suspend-callgraph.cfg | 98 ++ tools/power/pm-graph/config/suspend-dev.cfg | 93 ++ tools/power/pm-graph/config/suspend-x2-proc.cfg | 93 ++ tools/power/pm-graph/config/suspend.cfg | 93 ++ tools/power/pm-graph/sleepgraph.8 | 47 +- .../pm-graph/{analyze_suspend.py => sleepgraph.py} | 1625 ++++++++++++-------- 18 files changed, 2575 insertions(+), 703 deletions(-) rename tools/power/pm-graph/{analyze_boot.py => bootgraph.py} (85%) create mode 100644 tools/power/pm-graph/config/cgskip.txt create mode 100644 tools/power/pm-graph/config/custom-timeline- functions.cfg create mode 100644 tools/power/pm-graph/config/example.cfg create mode 100644 tools/power/pm-graph/config/freeze- callgraph.cfg create mode 100644 tools/power/pm-graph/config/freeze-dev.cfg create mode 100644 tools/power/pm-graph/config/freeze.cfg create mode 100644 tools/power/pm-graph/config/standby- callgraph.cfg create mode 100644 tools/power/pm-graph/config/standby-dev.cfg create mode 100644 tools/power/pm-graph/config/standby.cfg create mode 100644 tools/power/pm-graph/config/suspend- callgraph.cfg create mode 100644 tools/power/pm-graph/config/suspend-dev.cfg create mode 100644 tools/power/pm-graph/config/suspend-x2-proc.cfg create mode 100644 tools/power/pm-graph/config/suspend.cfg rename tools/power/pm-graph/{analyze_suspend.py => sleepgraph.py}Quoted 3 lines
(82%)
Quoted 4 lines
This is a major update, so I would prefer to queue it up for 4.17 to trying to squeeze it into 4.16 at this point.
Please let me know if that would be a problem.
No that's ok, sorry for the size.
Quoted 4 lines
Thanks,
Rafael