# 使用 ftrace 方法进行调试

温控日志有助于了解 thermal zone 的活动配置以及现有的温控调节级别。要检索温控配置和活动调节级别，可使用 ftrace 日志。

## ftrace 方法

要启用温控 ftace 日志，可运行以下命令：

echo 1 > /sys/kernel/tracing/events/thermal/enable
    Copy to clipboard

Tab QCS6490/QCS5430
Tab QCS9075

以下是不同温控事件的日志片段：

/* In the following snippet, "cpu0-thermal" represents thermal zone and “temp” indicates existing temperature of thermal zone */
    sh-1420    [001] ..... 1132975.934216: thermal_temperature: thermal_zone=cpu0-thermal id=13 temp_prev=47700 temp=110000
    /*In the following snippet, “trip” indicates trip level and trip level 1 is triggered for cpu0-thermal thermal zone*/
    sh-1420    [001] ..... 1132975.934449: thermal_zone_trip: thermal_zone=cpu0-thermal id=13 trip=1 trip_type=PASSIVE
    /*In the following snippet, “type” represents the cooling device and "target" represents active mitigation of the cooling device*/
    sh-1420 [001] ..... 1132975.934473: cdev_update: type=idle-cpu0 target=100
    Copy to clipboard

以下是 QCS9075 的缓解触发和清除温控事件的日志片段

/* In the following snippet, " cpu-1-2-1-thermal" represents thermal zone
    and “trip” indicates trip level and trip level 1 is triggered for
    cpu-1-2-1-thermal thermal zone*/
    irq/222-c252000-115     [000] ..... 250901.340001:
    thermal_zone_trip: thermal_zone=cpu-1-2-1-thermal
    id=16 trip=1 trip_type=PASSIVE
    /*In the following snippet, “type” represents the cooling device and "target" represents active mitigation of the cooling device*/
    irq/222-c252000-115     [000] ..... 250901.340009: cdev_update: type=idle-cpu6 target=100 kworker/u17:0-23271   [000] ..... 250901.355101:
    thermal_temperature: thermal_zone=cpu-1-2-1-thermal id=16 temp_prev=30100 temp=34100
    kworker/u17:0-23271   [000] ..... 250901.339084: thermal_temperature: thermal_zone=cpu-1-2-1-thermal id=16 temp_prev=30100 temp=29800
    kworker/u17:0-23271   [000] ..... 250901.339139: cdev_update: type=idle-cpu6 target=0
    Copy to clipboard

Note

QCS8275 的日志片段将在后续版本中更新。

Last Published: Oct 23, 2025

[Previous Topic
配置新的 thermal zone](https://docs.qualcomm.com/bundle/publicresource/80-70018-30SC/topics/customize.md) [Next Topic
参考资料](https://docs.qualcomm.com/bundle/publicresource/80-70018-30SC/topics/references.md)