^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # Generic S3 (Suspend to Mem) test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) # This is the configuration file for sleepgraph. It contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) # all the tool arguments so that they don't have to be given on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) # command line. It also includes advanced settings for functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) # and kprobes. It is run like this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) # sudo ./sleepgraph.py -config config/example.cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) [Settings]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) # ---- General Options ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) # Verbosity
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) # print verbose messages (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) verbose: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) # Suspend Mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) # e.g. standby, mem, freeze, disk (default: mem)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) mode: mem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) # Output Directory Format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) # output folder for html, ftrace, and dmesg. Use {date} and {time} for current values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) output-dir: suspend-{hostname}-{date}-{time}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) # Automatic Wakeup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) # Use rtcwake to autoresume after X seconds, or off to disable (default: 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) rtcwake: 15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) # Add Logs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) # add the dmesg and ftrace log to the html output (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) addlogs: true
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) # Suspend/Resume Gap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) # insert a small visible gap between suspend and resume on the timeline (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) srgap: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) # Skip HTML generation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) # Only capture the logs, don't generate the html timeline (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) skiphtml: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) # Sync filesystem before suspend
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) # run sync before the test, minimizes sys_sync call time (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) sync: true
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) # Runtime suspend enable/disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) # Enable/disable runtime suspend for all devices, restore all after test (default: no-action)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) # rs: disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) # Turn display on/off for test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) # Switch the display on/off for the test using xset (default: no-action)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) # display: on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) # Print results to text file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) # Print the status of the test run in the given file (default: no-action)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) result: result.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) # Gzip the log files to save space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) # Gzip the generated log files, and read gzipped log files (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) gzip: true
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) # ---- Advanced Options ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) # Command to execute in lieu of suspend (default: "")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) # command: echo mem > /sys/power/state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) # Display user processes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) # graph user processes and cpu usage in the timeline (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) proc: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) # Display function calls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) # graph source functions in the timeline (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) dev: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) # Multiple test runs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) # Run N tests D seconds apart, generates separate outputs with a summary (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) # multi: 3 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) # Back to Back Suspend/Resume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) # Run two suspend/resumes back to back and display in the same timeline (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) x2: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) # Back to Back Suspend Delay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) # Time delay between the two test runs in ms (default: 0 ms)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) x2delay: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) # Pre Suspend Delay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) # Include an N ms delay before (1st) suspend (default: 0 ms)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) predelay: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) # Post Resume Delay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) # Include an N ms delay after (last) resume (default: 0 ms)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) postdelay: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) # Minimum Device Length
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) # graph only devices longer than min in the timeline (default: 0.001 ms)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) mindev: 0.001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) # Call Loop Max Gap (dev mode only)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) # merge loops of the same call if each is less than maxgap apart (def: 100us)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) callloop-maxgap: 0.0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) # Call Loop Max Length (dev mode only)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) # merge loops of the same call if each is less than maxlen in length (def: 5ms)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) callloop-maxlen: 0.005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) # Override default timeline entries:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) # Do not use the internal default functions for timeline entries (def: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) # Set this to true if you intend to only use the ones defined in the config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) override-timeline-functions: true
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) # Override default dev timeline entries:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) # Do not use the internal default functions for dev timeline entries (def: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) # Set this to true if you intend to only use the ones defined in the config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) override-dev-timeline-functions: true
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) # ---- Debug Options ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) # Callgraph
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) # gather detailed ftrace callgraph data on all timeline events (default: false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) callgraph: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) # Max graph depth
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) # limit the callgraph trace to this depth (default: 0 = all)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) maxdepth: 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) # Callgraph phase filter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) # Only enable callgraphs for one phase, i.e. resume_noirq (default: all)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) cgphase: suspend
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) # Callgraph x2 test filter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) # Only enable callgraphs test 0 or 1 when using -x2 (default: 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) cgtest: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) # Expand Callgraph
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) # pre-expand the callgraph data in the html output (default: disabled)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) expandcg: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) # Minimum Callgraph Length
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) # provide callgraph data for blocks longer than min (default: 0.001 ms)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) mincg: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) # Timestamp Precision
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) # Number of significant digits in timestamps (0:S, [3:ms], 6:us)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) timeprec: 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) # Device Filter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) # show only devices whose name/driver includes one of these strings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) # devicefilter: _cpu_up,_cpu_down,i915,usb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) # Add kprobe functions to the timeline
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) # Add functions to the timeline from a text file (default: no-action)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) # fadd: file.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) # Ftrace buffer size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) # Set trace buffer size to N kilo-bytes (default: all of free memory up to 3GB)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) # bufsize: 1000