高通平台如何offline 抓取systrace log

    xiaoxiao2021-03-25  74

    当系统需要深度睡眠时,离线systrace可以帮助收集systrace。 在这种情况下, 像没有usb连接可用或系统需要进入LMP其他模式。您可以使用这个 文档获得正确的systrace以帮助性能问题。

    前提 1.adb root和adb remount可用 2./system/bin/atrace可用

    收集systrace 1,运行“adb root && adb remount” 2,在adb shell中,运行以下命令:

    atrace -z -b 40000 gfx input view wm am hal res dalvik rs sched freq idle load disk mmc -t 15 > /data/local/tmp/trace_output

    -a appname enable app-level tracing for a comma separated list of cmdlines

    -b N use a trace buffer size of N KB -t N trace for N seconds [defualt 5] -z compress the trace dump --list_categories list the available tracing categories The time and buffer size should be long enough to finished the systrace collecting. 3, remove USB connection 4, reproduce this issue

    从设备获取systrace

    1.使用USB电缆连接设备 2.使用“adb shell ps -t | grep atrace”,如果没有这样的atrace,就可以走出systrace 3.使用以下命令:adb pull /data/local/tmp/trace_output

    转换systrace

    systrace.py --from-file trace_output -o output.html

    现在,您可以使用Chrome来分析systrace文件。

    Most kernel modules have tracing configuration, customer can switch on/off tracing event accordingly. For example, if you only care about bus vote, following settings is preferred. adb shell "echo 0 > /sys/kernel/debug/tracing/tracing_on" adb shell "echo > /sys/kernel/debug/tracing/trace" adb shell "echo > /d/tracing/set_event"adb shell "echo 1 > /sys/kernel/debug/tracing/events/msm_bus/bus_update_request/enable" adb shell "echo 1 > /sys/kernel/debug/tracing/events/msm_bus/bus_update_request_end/enable" adb shell "echo 1 > /d/tracing/events/rpm_smd/enable" adb shell "echo 1 > /sys/kernel/debug/tracing/events/power/clock_set_rate/enable" adb shell "echo 1 > /sys/kernel/debug/tracing/events/mdss/mdp_video_underrun_done/enable" adb shell "echo 1 > /sys/kernel/debug/tracing/tracing_on" adb shell cat /sys/kernel/debug/tracing/trace_pipe > trace_pipe.txt

    转载请注明原文地址: https://ju.6miu.com/read-13621.html

    最新回复(0)