DEBUG: debug.yml: enable FTrace settings in kernel cmdline#2155
DEBUG: debug.yml: enable FTrace settings in kernel cmdline#2155apateriy-qcom wants to merge 1 commit into
Conversation
|
Please check and follow the same commit message pattern followed in this repository |
|
Please justify why you need these options in your commit message, and explain them as well. |
Test Results 63 files 286 suites 2h 59m 52s ⏱️ For more details on these failures, see this check. Results for commit 83c8d5e. ♻️ This comment has been updated with latest results. |
| DEBUG_BUILD = "1" | ||
|
|
||
| cmdline: | | ||
| KERNEL_CMDLINE_EXTRA:append = " trace_event=timer:timer_expire_entry,timer:timer_expire_exit,timer:hrtimer_cancel,timer:hrtimer_expire_entry,timer:hrtimer_expire_exit,timer:hrtimer_init,timer:hrtimer_start,irq:*,workqueue:*,sched:sched_migrate_task,sched:sched_pi_setprio,sched:sched_switch,sched:sched_wakeup,sched:sched_wakeup_new,power:clock_set_rate,power:clock_enable,power:clock_disable,power:cpu_frequency,regulator:*,thermal:thermal_zone_trip,thermal:thermal_temperature,thermal:cdev_update,rpmh:rpmh_send_msg trace_buf_size=5M ftrace=tracing_on" |
There was a problem hiding this comment.
Given that the line is very long, use a new variable for it.
KERNEL_CMDLINE_EXTRA_FTRACE = "trace_event=..."
KERNEL_CMDLINE_EXTRA:append = " ${KERNEL_CMDLINE_EXTRA_FTRACE}"9386e40 to
83c8d5e
Compare
added the reason in commit message and PR description. |
lumag
left a comment
There was a problem hiding this comment.
I understand the intention, but for me it feels like having too special command line in a generic build.
Also, some (older) bootloaders might cut the command line. Please move the enablement options to the beginning of the line so that they are never cut off.
FTrace is off by default. On debug builds, timing-sensitive events (scheduler latency, IRQ storms, thermal throttling, clock/regulator transitions) happen during early init before userspace can enable tracing, and are lost. Enable the following FTrace options via KERNEL_CMDLINE_EXTRA: - ftrace=tracing_on: enables the tracer at boot so early-init events are not missed - trace_buf_size=5M: increases per-CPU ring buffer from 1 MB to 5 MB to reduce data loss under high-frequency event bursts - trace_event: captures timer, IRQ, workqueue, scheduler, clock, CPU frequency, regulator, thermal, and RPMh events ftrace=tracing_on and trace_buf_size=5M are placed at the beginning of the cmdline so they are processed even if older bootloaders truncate the kernel command line. The event list is stored in KERNEL_CMDLINE_EXTRA_FTRACE and appended to KERNEL_CMDLINE_EXTRA to keep the assignment readable. These options apply to debug builds only and have no effect on release or performance builds. Signed-off-by: Anurag Pateriya <apateriy@qti.qualcomm.com>
Add FTrace kernel cmdline options to ci/debug.yml for debug builds to enable tracing from early boot.
Problem
FTrace is off by default. On debug builds, timing-sensitive events (scheduler latency, IRQ storms, thermal throttling, clock/regulator transitions) happen during early init — before userspace can enable
tracing — and are lost.
Changes
FTrace Options
Impact
Debug builds only — no effect on release or performance builds.