1*4882a593Smuzhiyun# 2*4882a593Smuzhiyun# This is the configuration file for sleepgraph. It contains 3*4882a593Smuzhiyun# all the tool arguments so that they don't have to be given on the 4*4882a593Smuzhiyun# command line. It also includes advanced settings for functions 5*4882a593Smuzhiyun# and kprobes. It is run like this 6*4882a593Smuzhiyun# 7*4882a593Smuzhiyun# sudo ./sleepgraph.py -config thisfile.txt 8*4882a593Smuzhiyun# 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun[Settings] 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun# Verbosity 13*4882a593Smuzhiyun# print verbose messages (default: false) 14*4882a593Smuzhiyunverbose: false 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun# Suspend Mode 17*4882a593Smuzhiyun# e.g. standby, mem, freeze, disk (default: mem) 18*4882a593Smuzhiyunmode: mem 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun# Automatic Wakeup 21*4882a593Smuzhiyun# Use rtcwake to autoresume after X seconds, or off to disable (default: 15) 22*4882a593Smuzhiyunrtcwake: 15 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun# Add Logs 25*4882a593Smuzhiyun# add the dmesg and ftrace log to the html output (default: false) 26*4882a593Smuzhiyunaddlogs: false 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun# Display function calls 29*4882a593Smuzhiyun# graph source functions in the timeline (default: false) 30*4882a593Smuzhiyundev: true 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun# Callgraph 33*4882a593Smuzhiyun# gather detailed ftrace callgraph data on all timeline events (default: false) 34*4882a593Smuzhiyuncallgraph: false 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun# Back to Back Suspend/Resume 37*4882a593Smuzhiyun# Run two suspend/resumes back to back (default: false) 38*4882a593Smuzhiyunx2: false 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun# Back to Back Suspend Delay 41*4882a593Smuzhiyun# Time delay between the two test runs in ms (default: 0 ms) 42*4882a593Smuzhiyunx2delay: 0 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun# Minimum Device Length 45*4882a593Smuzhiyun# graph only devices longer than min in the timeline (default: 0.001 ms) 46*4882a593Smuzhiyunmindev: 1 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun# Minimum Callgraph Length 49*4882a593Smuzhiyun# provide callgraph data for blocks longer than min (default: 0.001 ms) 50*4882a593Smuzhiyunmincg: 1 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun# Suspend/Resume Gap 53*4882a593Smuzhiyun# insert a small visible gap between suspend and resume on the timeline (default: false) 54*4882a593Smuzhiyunsrgap: false 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun# Output Directory Format 57*4882a593Smuzhiyun# output folder for html, ftrace, and dmesg. Use {date} and {time} for current values 58*4882a593Smuzhiyunoutput-dir: suspend-{hostname}-{date}-{time}-custom 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun# Override default timeline entries 61*4882a593Smuzhiyun# Do not use the internal default functions for timeline entries (default: false) 62*4882a593Smuzhiyun# Set this to true if you intend to only use the ones defined in this config 63*4882a593Smuzhiyunoverride-timeline-functions: true 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun# Override default dev timeline entries 66*4882a593Smuzhiyun# Do not use the internal default functions for dev timeline entries (default: false) 67*4882a593Smuzhiyun# Set this to true if you intend to only use the ones defined in this config 68*4882a593Smuzhiyunoverride-dev-timeline-functions: true 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun[timeline_functions_x86_64] 71*4882a593Smuzhiyun# 72*4882a593Smuzhiyun# Function calls to display in the timeline alongside device callbacks. 73*4882a593Smuzhiyun# The tool has an internal set of these functions which should cover the 74*4882a593Smuzhiyun# whole of kernel execution, but you can append or override here. 75*4882a593Smuzhiyun# 76*4882a593Smuzhiyun# This is a list of kprobes which use both symbol data and function arg data. 77*4882a593Smuzhiyun# The function calls are displayed on the timeline alongside the device blocks. 78*4882a593Smuzhiyun# The args are pulled directly from the stack using this architecture's registers 79*4882a593Smuzhiyun# and stack formatting. Three pieces of info are required. The function name, 80*4882a593Smuzhiyun# a format string, and an argument list 81*4882a593Smuzhiyun# 82*4882a593Smuzhiyun# Entry format: 83*4882a593Smuzhiyun# 84*4882a593Smuzhiyun# function: format{fn_arg1}_{fn_arg2} fn_arg1 fn_arg2 ... [color=purple] 85*4882a593Smuzhiyun# 86*4882a593Smuzhiyun# Required Arguments: 87*4882a593Smuzhiyun# 88*4882a593Smuzhiyun# function: The symbol name for the function you want probed, this is the 89*4882a593Smuzhiyun# minimum required for an entry, it will show up as the function 90*4882a593Smuzhiyun# name with no arguments. 91*4882a593Smuzhiyun# 92*4882a593Smuzhiyun# example: _cpu_up: 93*4882a593Smuzhiyun# 94*4882a593Smuzhiyun# Optional Arguments: 95*4882a593Smuzhiyun# 96*4882a593Smuzhiyun# format: The format to display the data on the timeline in. Use braces to 97*4882a593Smuzhiyun# enclose the arg names. 98*4882a593Smuzhiyun# 99*4882a593Smuzhiyun# example: CPU_ON[{cpu}] 100*4882a593Smuzhiyun# 101*4882a593Smuzhiyun# color: The color of the entry block in the timeline. The default color is 102*4882a593Smuzhiyun# transparent, so the entry shares the phase color. The color is an 103*4882a593Smuzhiyun# html color string, either a word, or an RGB. 104*4882a593Smuzhiyun# 105*4882a593Smuzhiyun# example: [color=#CC00CC] 106*4882a593Smuzhiyun# 107*4882a593Smuzhiyun# arglist: A list of arguments from registers/stack addresses. See URL: 108*4882a593Smuzhiyun# https://www.kernel.org/doc/Documentation/trace/kprobetrace.txt 109*4882a593Smuzhiyun# 110*4882a593Smuzhiyun# example: cpu=%di:s32 111*4882a593Smuzhiyun# 112*4882a593Smuzhiyun# Example: Display cpu resume in the timeline 113*4882a593Smuzhiyun# 114*4882a593Smuzhiyun# _cpu_up: CPU_ON[{cpu}] cpu=%di:s32 [color=orange] 115*4882a593Smuzhiyun# 116*4882a593Smuzhiyun_cpu_down: CPU_OFF[{cpu}] cpu=%di:s32 117*4882a593Smuzhiyun_cpu_up: CPU_ON[{cpu}] cpu=%di:s32 118*4882a593Smuzhiyunsys_sync: 119*4882a593Smuzhiyunpm_prepare_console: 120*4882a593Smuzhiyunpm_notifier_call_chain: 121*4882a593Smuzhiyunfreeze_processes: 122*4882a593Smuzhiyunfreeze_kernel_threads: 123*4882a593Smuzhiyunpm_restrict_gfp_mask: 124*4882a593Smuzhiyunacpi_suspend_begin: 125*4882a593Smuzhiyunsuspend_console: 126*4882a593Smuzhiyunacpi_pm_prepare: 127*4882a593Smuzhiyunsyscore_suspend: 128*4882a593Smuzhiyunarch_thaw_secondary_cpus_end: 129*4882a593Smuzhiyunsyscore_resume: 130*4882a593Smuzhiyunacpi_pm_finish: 131*4882a593Smuzhiyunresume_console: 132*4882a593Smuzhiyunacpi_pm_end: 133*4882a593Smuzhiyunpm_restore_gfp_mask: 134*4882a593Smuzhiyunthaw_processes: 135*4882a593Smuzhiyunpm_restore_console: 136*4882a593Smuzhiyun 137*4882a593Smuzhiyun[dev_timeline_functions_x86_64] 138*4882a593Smuzhiyun# 139*4882a593Smuzhiyun# Dev mode function calls to display inside timeline entries 140*4882a593Smuzhiyun# 141*4882a593Smuzhiyun# This is a list of kprobes which use both symbol data and function arg data. 142*4882a593Smuzhiyun# The function calls are displayed on the timeline alongside the device blocks. 143*4882a593Smuzhiyun# The args are pulled directly from the stack using this architecture's registers 144*4882a593Smuzhiyun# and stack formatting. Three pieces of info are required. The function name, 145*4882a593Smuzhiyun# a format string, and an argument list 146*4882a593Smuzhiyun# 147*4882a593Smuzhiyun# Entry format: 148*4882a593Smuzhiyun# 149*4882a593Smuzhiyun# function: format{fn_arg1}_{fn_arg2} fn_arg1 fn_arg2 ... [color=purple] 150*4882a593Smuzhiyun# 151*4882a593Smuzhiyun# Required Arguments: 152*4882a593Smuzhiyun# 153*4882a593Smuzhiyun# function: The symbol name for the function you want probed, this is the 154*4882a593Smuzhiyun# minimum required for an entry, it will show up as the function 155*4882a593Smuzhiyun# name with no arguments. 156*4882a593Smuzhiyun# 157*4882a593Smuzhiyun# example: ata_eh_recover: 158*4882a593Smuzhiyun# 159*4882a593Smuzhiyun# Optional Arguments: 160*4882a593Smuzhiyun# 161*4882a593Smuzhiyun# format: The format to display the data on the timeline in. Use braces to 162*4882a593Smuzhiyun# enclose the arg names. 163*4882a593Smuzhiyun# 164*4882a593Smuzhiyun# example: ata{port}_port_reset 165*4882a593Smuzhiyun# 166*4882a593Smuzhiyun# color: The color of the entry block in the timeline. The default color is 167*4882a593Smuzhiyun# transparent, so the entry shares the phase color. The color is an 168*4882a593Smuzhiyun# html color string, either a word, or an RGB. 169*4882a593Smuzhiyun# 170*4882a593Smuzhiyun# example: [color=#CC00CC] 171*4882a593Smuzhiyun# 172*4882a593Smuzhiyun# arglist: A list of arguments from registers/stack addresses. See URL: 173*4882a593Smuzhiyun# https://www.kernel.org/doc/Documentation/trace/kprobetrace.txt 174*4882a593Smuzhiyun# 175*4882a593Smuzhiyun# example: port=+36(%di):s32 176*4882a593Smuzhiyun# 177*4882a593Smuzhiyun# Example: Display ATA port reset as ataN_port_reset in the timeline 178*4882a593Smuzhiyun# 179*4882a593Smuzhiyun# ata_eh_recover: ata{port}_port_reset port=+36(%di):s32 180*4882a593Smuzhiyun# 181*4882a593Smuzhiyunmsleep: msleep time=%di:s32 182*4882a593Smuzhiyunschedule_timeout_uninterruptible: schedule_timeout_uninterruptible timeout=%di:s32 183*4882a593Smuzhiyunschedule_timeout: schedule_timeout timeout=%di:s32 184*4882a593Smuzhiyunusleep_range: usleep_range min=%di:s32 max=%si:s32 185*4882a593Smuzhiyun__const_udelay: udelay loops=%di:s32 186*4882a593Smuzhiyun__mutex_lock_slowpath: mutex_lock_slowpath 187*4882a593Smuzhiyunata_eh_recover: ata_eh_recover port=+36(%di):s32 188*4882a593Smuzhiyunacpi_os_stall: 189*4882a593Smuzhiyunacpi_resume_power_resources: 190*4882a593Smuzhiyunacpi_ps_parse_aml: 191*4882a593Smuzhiyunext4_sync_fs: 192*4882a593Smuzhiyuni915_gem_resume: 193*4882a593Smuzhiyuni915_restore_state: 194*4882a593Smuzhiyunintel_opregion_setup: 195*4882a593Smuzhiyung4x_pre_enable_dp: 196*4882a593Smuzhiyunvlv_pre_enable_dp: 197*4882a593Smuzhiyunchv_pre_enable_dp: 198*4882a593Smuzhiyung4x_enable_dp: 199*4882a593Smuzhiyunvlv_enable_dp: 200*4882a593Smuzhiyunintel_hpd_init: 201*4882a593Smuzhiyunintel_opregion_register: 202*4882a593Smuzhiyunintel_dp_detect: 203*4882a593Smuzhiyunintel_hdmi_detect: 204*4882a593Smuzhiyunintel_opregion_init: 205*4882a593Smuzhiyunintel_fbdev_set_suspend: 206