1a6fbdbb2STodd E Brandt# 2a6fbdbb2STodd E Brandt# This is the configuration file for sleepgraph. It contains 3a6fbdbb2STodd E Brandt# all the tool arguments so that they don't have to be given on the 4a6fbdbb2STodd E Brandt# command line. It also includes advanced settings for functions 5a6fbdbb2STodd E Brandt# and kprobes. It is run like this 6a6fbdbb2STodd E Brandt# 7a6fbdbb2STodd E Brandt# sudo ./sleepgraph.py -config thisfile.txt 8a6fbdbb2STodd E Brandt# 9a6fbdbb2STodd E Brandt 10a6fbdbb2STodd E Brandt[Settings] 11a6fbdbb2STodd E Brandt 12a6fbdbb2STodd E Brandt# Verbosity 13a6fbdbb2STodd E Brandt# print verbose messages (default: false) 14a6fbdbb2STodd E Brandtverbose: false 15a6fbdbb2STodd E Brandt 16a6fbdbb2STodd E Brandt# Suspend Mode 17a6fbdbb2STodd E Brandt# e.g. standby, mem, freeze, disk (default: mem) 18a6fbdbb2STodd E Brandtmode: mem 19a6fbdbb2STodd E Brandt 20a6fbdbb2STodd E Brandt# Automatic Wakeup 21a6fbdbb2STodd E Brandt# Use rtcwake to autoresume after X seconds, or off to disable (default: 15) 22a6fbdbb2STodd E Brandtrtcwake: 15 23a6fbdbb2STodd E Brandt 24a6fbdbb2STodd E Brandt# Add Logs 25a6fbdbb2STodd E Brandt# add the dmesg and ftrace log to the html output (default: false) 26a6fbdbb2STodd E Brandtaddlogs: false 27a6fbdbb2STodd E Brandt 28a6fbdbb2STodd E Brandt# Display function calls 29a6fbdbb2STodd E Brandt# graph source functions in the timeline (default: false) 30a6fbdbb2STodd E Brandtdev: true 31a6fbdbb2STodd E Brandt 32a6fbdbb2STodd E Brandt# Callgraph 33a6fbdbb2STodd E Brandt# gather detailed ftrace callgraph data on all timeline events (default: false) 34a6fbdbb2STodd E Brandtcallgraph: false 35a6fbdbb2STodd E Brandt 36a6fbdbb2STodd E Brandt# Back to Back Suspend/Resume 37a6fbdbb2STodd E Brandt# Run two suspend/resumes back to back (default: false) 38a6fbdbb2STodd E Brandtx2: false 39a6fbdbb2STodd E Brandt 40a6fbdbb2STodd E Brandt# Back to Back Suspend Delay 41a6fbdbb2STodd E Brandt# Time delay between the two test runs in ms (default: 0 ms) 42a6fbdbb2STodd E Brandtx2delay: 0 43a6fbdbb2STodd E Brandt 44a6fbdbb2STodd E Brandt# Minimum Device Length 45a6fbdbb2STodd E Brandt# graph only devices longer than min in the timeline (default: 0.001 ms) 46a6fbdbb2STodd E Brandtmindev: 1 47a6fbdbb2STodd E Brandt 48a6fbdbb2STodd E Brandt# Minimum Callgraph Length 49a6fbdbb2STodd E Brandt# provide callgraph data for blocks longer than min (default: 0.001 ms) 50a6fbdbb2STodd E Brandtmincg: 1 51a6fbdbb2STodd E Brandt 52a6fbdbb2STodd E Brandt# Suspend/Resume Gap 53a6fbdbb2STodd E Brandt# insert a small visible gap between suspend and resume on the timeline (default: false) 54a6fbdbb2STodd E Brandtsrgap: false 55a6fbdbb2STodd E Brandt 56a6fbdbb2STodd E Brandt# Output Directory Format 57a6fbdbb2STodd E Brandt# output folder for html, ftrace, and dmesg. Use {date} and {time} for current values 58a6fbdbb2STodd E Brandtoutput-dir: suspend-{hostname}-{date}-{time}-custom 59a6fbdbb2STodd E Brandt 60a6fbdbb2STodd E Brandt# Override default timeline entries 61a6fbdbb2STodd E Brandt# Do not use the internal default functions for timeline entries (default: false) 62a6fbdbb2STodd E Brandt# Set this to true if you intend to only use the ones defined in this config 63a6fbdbb2STodd E Brandtoverride-timeline-functions: true 64a6fbdbb2STodd E Brandt 65a6fbdbb2STodd E Brandt# Override default dev timeline entries 66a6fbdbb2STodd E Brandt# Do not use the internal default functions for dev timeline entries (default: false) 67a6fbdbb2STodd E Brandt# Set this to true if you intend to only use the ones defined in this config 68a6fbdbb2STodd E Brandtoverride-dev-timeline-functions: true 69a6fbdbb2STodd E Brandt 70a6fbdbb2STodd E Brandt[timeline_functions_x86_64] 71a6fbdbb2STodd E Brandt# 72a6fbdbb2STodd E Brandt# Function calls to display in the timeline alongside device callbacks. 73a6fbdbb2STodd E Brandt# The tool has an internal set of these functions which should cover the 74a6fbdbb2STodd E Brandt# whole of kernel execution, but you can append or override here. 75a6fbdbb2STodd E Brandt# 76a6fbdbb2STodd E Brandt# This is a list of kprobes which use both symbol data and function arg data. 77a6fbdbb2STodd E Brandt# The function calls are displayed on the timeline alongside the device blocks. 78a6fbdbb2STodd E Brandt# The args are pulled directly from the stack using this architecture's registers 79a6fbdbb2STodd E Brandt# and stack formatting. Three pieces of info are required. The function name, 80a6fbdbb2STodd E Brandt# a format string, and an argument list 81a6fbdbb2STodd E Brandt# 82a6fbdbb2STodd E Brandt# Entry format: 83a6fbdbb2STodd E Brandt# 84a6fbdbb2STodd E Brandt# function: format{fn_arg1}_{fn_arg2} fn_arg1 fn_arg2 ... [color=purple] 85a6fbdbb2STodd E Brandt# 86a6fbdbb2STodd E Brandt# Required Arguments: 87a6fbdbb2STodd E Brandt# 88a6fbdbb2STodd E Brandt# function: The symbol name for the function you want probed, this is the 89a6fbdbb2STodd E Brandt# minimum required for an entry, it will show up as the function 90a6fbdbb2STodd E Brandt# name with no arguments. 91a6fbdbb2STodd E Brandt# 92a6fbdbb2STodd E Brandt# example: _cpu_up: 93a6fbdbb2STodd E Brandt# 94a6fbdbb2STodd E Brandt# Optional Arguments: 95a6fbdbb2STodd E Brandt# 96a6fbdbb2STodd E Brandt# format: The format to display the data on the timeline in. Use braces to 97a6fbdbb2STodd E Brandt# enclose the arg names. 98a6fbdbb2STodd E Brandt# 99a6fbdbb2STodd E Brandt# example: CPU_ON[{cpu}] 100a6fbdbb2STodd E Brandt# 101a6fbdbb2STodd E Brandt# color: The color of the entry block in the timeline. The default color is 102a6fbdbb2STodd E Brandt# transparent, so the entry shares the phase color. The color is an 103a6fbdbb2STodd E Brandt# html color string, either a word, or an RGB. 104a6fbdbb2STodd E Brandt# 105a6fbdbb2STodd E Brandt# example: [color=#CC00CC] 106a6fbdbb2STodd E Brandt# 107a6fbdbb2STodd E Brandt# arglist: A list of arguments from registers/stack addresses. See URL: 10818d3f8fcSTodd Brandt# https://www.kernel.org/doc/Documentation/trace/kprobetrace.txt 109a6fbdbb2STodd E Brandt# 110a6fbdbb2STodd E Brandt# example: cpu=%di:s32 111a6fbdbb2STodd E Brandt# 112a6fbdbb2STodd E Brandt# Example: Display cpu resume in the timeline 113a6fbdbb2STodd E Brandt# 114a6fbdbb2STodd E Brandt# _cpu_up: CPU_ON[{cpu}] cpu=%di:s32 [color=orange] 115a6fbdbb2STodd E Brandt# 116a6fbdbb2STodd E Brandt_cpu_down: CPU_OFF[{cpu}] cpu=%di:s32 117a6fbdbb2STodd E Brandt_cpu_up: CPU_ON[{cpu}] cpu=%di:s32 118a6fbdbb2STodd E Brandtsys_sync: 119a6fbdbb2STodd E Brandtpm_prepare_console: 120a6fbdbb2STodd E Brandtpm_notifier_call_chain: 121a6fbdbb2STodd E Brandtfreeze_processes: 122a6fbdbb2STodd E Brandtfreeze_kernel_threads: 123a6fbdbb2STodd E Brandtpm_restrict_gfp_mask: 124a6fbdbb2STodd E Brandtacpi_suspend_begin: 125a6fbdbb2STodd E Brandtsuspend_console: 126a6fbdbb2STodd E Brandtacpi_pm_prepare: 127a6fbdbb2STodd E Brandtsyscore_suspend: 128*b3f6c43dSTodd Brandtarch_enable_nonboot_cpus_end: 129a6fbdbb2STodd E Brandtsyscore_resume: 130a6fbdbb2STodd E Brandtacpi_pm_finish: 131a6fbdbb2STodd E Brandtresume_console: 132a6fbdbb2STodd E Brandtacpi_pm_end: 133a6fbdbb2STodd E Brandtpm_restore_gfp_mask: 134a6fbdbb2STodd E Brandtthaw_processes: 135a6fbdbb2STodd E Brandtpm_restore_console: 136a6fbdbb2STodd E Brandt 137a6fbdbb2STodd E Brandt[dev_timeline_functions_x86_64] 138a6fbdbb2STodd E Brandt# 139a6fbdbb2STodd E Brandt# Dev mode function calls to display inside timeline entries 140a6fbdbb2STodd E Brandt# 141a6fbdbb2STodd E Brandt# This is a list of kprobes which use both symbol data and function arg data. 142a6fbdbb2STodd E Brandt# The function calls are displayed on the timeline alongside the device blocks. 143a6fbdbb2STodd E Brandt# The args are pulled directly from the stack using this architecture's registers 144a6fbdbb2STodd E Brandt# and stack formatting. Three pieces of info are required. The function name, 145a6fbdbb2STodd E Brandt# a format string, and an argument list 146a6fbdbb2STodd E Brandt# 147a6fbdbb2STodd E Brandt# Entry format: 148a6fbdbb2STodd E Brandt# 149a6fbdbb2STodd E Brandt# function: format{fn_arg1}_{fn_arg2} fn_arg1 fn_arg2 ... [color=purple] 150a6fbdbb2STodd E Brandt# 151a6fbdbb2STodd E Brandt# Required Arguments: 152a6fbdbb2STodd E Brandt# 153a6fbdbb2STodd E Brandt# function: The symbol name for the function you want probed, this is the 154a6fbdbb2STodd E Brandt# minimum required for an entry, it will show up as the function 155a6fbdbb2STodd E Brandt# name with no arguments. 156a6fbdbb2STodd E Brandt# 157a6fbdbb2STodd E Brandt# example: ata_eh_recover: 158a6fbdbb2STodd E Brandt# 159a6fbdbb2STodd E Brandt# Optional Arguments: 160a6fbdbb2STodd E Brandt# 161a6fbdbb2STodd E Brandt# format: The format to display the data on the timeline in. Use braces to 162a6fbdbb2STodd E Brandt# enclose the arg names. 163a6fbdbb2STodd E Brandt# 164a6fbdbb2STodd E Brandt# example: ata{port}_port_reset 165a6fbdbb2STodd E Brandt# 166a6fbdbb2STodd E Brandt# color: The color of the entry block in the timeline. The default color is 167a6fbdbb2STodd E Brandt# transparent, so the entry shares the phase color. The color is an 168a6fbdbb2STodd E Brandt# html color string, either a word, or an RGB. 169a6fbdbb2STodd E Brandt# 170a6fbdbb2STodd E Brandt# example: [color=#CC00CC] 171a6fbdbb2STodd E Brandt# 172a6fbdbb2STodd E Brandt# arglist: A list of arguments from registers/stack addresses. See URL: 17318d3f8fcSTodd Brandt# https://www.kernel.org/doc/Documentation/trace/kprobetrace.txt 174a6fbdbb2STodd E Brandt# 175a6fbdbb2STodd E Brandt# example: port=+36(%di):s32 176a6fbdbb2STodd E Brandt# 177a6fbdbb2STodd E Brandt# Example: Display ATA port reset as ataN_port_reset in the timeline 178a6fbdbb2STodd E Brandt# 179a6fbdbb2STodd E Brandt# ata_eh_recover: ata{port}_port_reset port=+36(%di):s32 180a6fbdbb2STodd E Brandt# 181a6fbdbb2STodd E Brandtmsleep: msleep time=%di:s32 182a6fbdbb2STodd E Brandtschedule_timeout_uninterruptible: schedule_timeout_uninterruptible timeout=%di:s32 183a6fbdbb2STodd E Brandtschedule_timeout: schedule_timeout timeout=%di:s32 184a6fbdbb2STodd E Brandtusleep_range: usleep_range min=%di:s32 max=%si:s32 185a6fbdbb2STodd E Brandt__const_udelay: udelay loops=%di:s32 186a6fbdbb2STodd E Brandt__mutex_lock_slowpath: mutex_lock_slowpath 187a6fbdbb2STodd E Brandtata_eh_recover: ata_eh_recover port=+36(%di):s32 188a6fbdbb2STodd E Brandtacpi_os_stall: 189a6fbdbb2STodd E Brandtacpi_resume_power_resources: 190a6fbdbb2STodd E Brandtacpi_ps_parse_aml: 191a6fbdbb2STodd E Brandtext4_sync_fs: 192a6fbdbb2STodd E Brandti915_gem_resume: 193a6fbdbb2STodd E Brandti915_restore_state: 194a6fbdbb2STodd E Brandtintel_opregion_setup: 195a6fbdbb2STodd E Brandtg4x_pre_enable_dp: 196a6fbdbb2STodd E Brandtvlv_pre_enable_dp: 197a6fbdbb2STodd E Brandtchv_pre_enable_dp: 198a6fbdbb2STodd E Brandtg4x_enable_dp: 199a6fbdbb2STodd E Brandtvlv_enable_dp: 200a6fbdbb2STodd E Brandtintel_hpd_init: 201a6fbdbb2STodd E Brandtintel_opregion_register: 202a6fbdbb2STodd E Brandtintel_dp_detect: 203a6fbdbb2STodd E Brandtintel_hdmi_detect: 204a6fbdbb2STodd E Brandtintel_opregion_init: 205a6fbdbb2STodd E Brandtintel_fbdev_set_suspend: 206