General options
[Settings]
# Verbosity
# print verbose messages (default: false)
verbose: false
# Suspend Mode
# e.g. standby, mem, freeze, disk (default: mem)
mode: mem
# Output Directory Format
# output folder for html, ftrace, and dmesg. Use {date} and {time} for current values
output-dir: suspend-{hostname}-{date}-{time}
# Automatic Wakeup
# Use rtcwake to autoresume after X seconds, or off to disable (default: 15)
rtcwake: 15
# Add Logs
# add the dmesg and ftrace log to the html output (default: false)
addlogs: true
# Suspend/Resume Gap
# insert a small visible gap between suspend and resume on the timeline (default: false)
srgap: false
# Skip HTML generation
# Only capture the logs, don't generate the html timeline (default: false)
skiphtml: false
# Sync filesystem before suspend
# run sync before the test, minimizes sys_sync call time (default: false)
sync: true
# Runtime suspend enable/disable
# Enable/disable runtime suspend for all devices, restore all after test (default: no-action)
rs: disable
# Turn display on/off for test
# Switch the display on/off for the test using xset (default: no-action)
display: on
# Print results to text file
# Print the status of the test run in the given file (default: no-action)
result: result.txt
# Gzip the log files to save space
# Gzip the generated log files, and read gzipped log files (default: false)
gzip: true
Advanced options
# Command to execute in lieu of suspend (default: "")
command: echo mem > /sys/power/state
# Display user processes
# graph user processes and cpu usage in the timeline (default: false)
proc: false
# Display function calls
# graph source functions in the timeline (default: false)
dev: false
# Multiple test runs
# Run N tests D seconds apart, generates separate outputs with a summary (default: false)
multi: 3 5
# Back to Back Suspend/Resume
# Run two suspend/resumes back to back and display in the same timeline (default: false)
x2: false
# Back to Back Suspend Delay
# Time delay between the two test runs in ms (default: 0 ms)
x2delay: 0
# Pre Suspend Delay
# Include an N ms delay before (1st) suspend (default: 0 ms)
predelay: 0
# Post Resume Delay
# Include an N ms delay after (last) resume (default: 0 ms)
postdelay: 0
# Minimum Device Length
# graph only devices longer than min in the timeline (default: 0.001 ms)
mindev: 0.001
# Call Loop Max Gap (dev mode only)
# merge loops of the same call if each is less than maxgap apart (def: 100us)
callloop-maxgap: 0.0001
# Call Loop Max Length (dev mode only)
# merge loops of the same call if each is less than maxlen in length (def: 5ms)
callloop-maxlen: 0.005
# Override default timeline entries:
# Do not use the internal default functions for timeline entries (def: false)
# Set this to true if you intend to only use the ones defined in the config
override-timeline-functions: true
# Override default dev timeline entries:
# Do not use the internal default functions for dev timeline entries (def: false)
# Set this to true if you intend to only use the ones defined in the config
override-dev-timeline-functions: true
Debug options
# Callgraph
# gather detailed ftrace callgraph data on all timeline events (default: false)
callgraph: false
# Max graph depth
# limit the callgraph trace to this depth (default: 0 = all)
maxdepth: 2
# Callgraph phase filter
# Only enable callgraphs for one phase, i.e. resume_noirq (default: all)
cgphase: suspend
# Callgraph x2 test filter
# Only enable callgraphs test 0 or 1 when using -x2 (default: 1)
cgtest: 0
# Expand Callgraph
# pre-expand the callgraph data in the html output (default: disabled)
expandcg: false
# Minimum Callgraph Length
# provide callgraph data for blocks longer than min (default: 0.001 ms)
mincg: 1
# Timestamp Precision
# Number of significant digits in timestamps (0:S, [3:ms], 6:us)
timeprec: 6
# Device Filter
# show only devices whose name/driver includes one of these strings
# devicefilter: _cpu_up,_cpu_down,i915,usb
# Add kprobe functions to the timeline
# Add functions to the timeline from a text file (default: no-action)
# fadd: file.txt
# Ftrace buffer size
# Set trace buffer size to N kilo-bytes (default: all of free memory up to 3GB)
# bufsize: 1000
Adding functions as new timeline events
# The tool uses an array of function names to fill out empty spaces in the
# timeline where device callbacks don't appear. For instance, in suspend_prepare
# the tool adds the sys_sync and freeze_processes calls as virtual device blocks
# in the timeline to show you where the time is going. These calls should fill
# the timeline with contiguous data so that most kernel execution is covered.
#
# It is possible to add new function calls to the timeline by adding them to
# the config. It's also possible to copy the internal timeline functions into
# the config so that you can override and edit them. Place them in the
# timeline_functions_ARCH section with the name of your architecture appended.
# i.e. for x86_64: [timeline_functions_x86_64]
#
# Use the override-timeline-functions option if you only want to use your
# custom calls, or leave it false to append them to the internal ones.
# custom functions to the internal ones.
#
# This is a list of kprobes which use both symbol data and function arg data.
# The args are pulled directly from the stack using this architecture's registers
# and stack formatting. Each entry can include up to four pieces of info.
# The function name, a format string, an argument list, and a color.
#
# Entry format:
#
# function: format{fn_arg1}_{fn_arg2} fn_arg1 fn_arg2 ... [color=purple]
#
# Required Arguments:
#
# function: The symbol name for the function you want probed, this is the
# minimum required for an entry, it will show up as the function
# name with no arguments.
#
# example: _cpu_up:
#
# Optional Arguments:
#
# format: The format to display the data on the timeline in. Use braces to
# enclose the arg names.
#
# example: CPU_ON[{cpu}]
#
# color: The color of the entry block in the timeline. The default color is
# transparent, so the entry shares the phase color. The color is an
# html color string, either a word, or an RGB.
#
# example: [color=#CC00CC]
#
# arglist: A list of arguments from registers/stack addresses. See URL:
# https://www.kernel.org/doc/Documentation/trace/kprobetrace.txt
#
# example: cpu=%di:s32
#
# Here is a full example entry. It displays cpu resume calls in the timeline
# in orange. They will appear as CPU_ON[0], CPU_ON[1], etc.
#
[timeline_functions_x86_64]
_cpu_up: CPU_ON[{cpu}] cpu=%di:s32 [color=orange]
Adding source functions to a dev mode timeline
# In dev mode, the tool uses an array of function names to monitor source
# execution within the timeline entries.
#
# The function calls are displayed inside the main device/call blocks in the
# timeline. However, if a function call is not within a main timeline event,
# it will spawn an entirely new event named after the caller's kernel thread.
# These asynchronous kernel threads will populate in a separate section
# beneath the main device/call section.
#
# The tool has a set of hard coded calls which focus on the most common use
# cases: msleep, udelay, schedule_timeout, mutex_lock_slowpath, etc. These are
# the functions that add a hardcoded time delay to the suspend/resume path.
# The tool also includes some common functions native to important
# subsystems: ata, i915, and ACPI, etc.
#
# It is possible to add new function calls to the dev timeline by adding them
# to the config. It's also possible to copy the internal dev timeline
# functions into the config so that you can override and edit them. Place them
# in the timeline_functions_ARCH section with the name of your architecture
# appended. i.e. for x86_64: [dev_timeline_functions_x86_64]
#
# Use the override-dev-timeline-functions option if you only want to use your
# custom calls, or leave it false to append them to the internal ones.
#
# The format is the same as the timeline_functions_x86_64 section. This is a
# list of kprobes which use both symbol data and function arg data.
# The args are pulled directly from the stack using this architecture's registers
# and stack formatting. Each entry can include up to four pieces of info.
# The function name, a format string, an argument list, and a color.
#
# Here is a full example entry. It displays the ATA port reset calls as
# ataN_port_reset in the timeline. This is where most of the SATA disk resume
# time goes, so it can be helpful to see the low level call.
#
[dev_timeline_functions_x86_64]
ata_eh_recover: ata{port}_port_reset port=+36(%di):s32 [color=#CC00CC]