温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

【QAULCOMM】启动过程抓取FTRACE方法

发布时间:2020-07-02 12:16:13 来源:网络 阅读:2150 作者:飞鱼技术 栏目:移动开发

Add boot parameter in device\qcom\msm_xxx\BoardConfig.mk. xxx is the build variant name

Build and flash boot.img:
make kernel
#put device into fastboot mode and update boot.img
fastboot flash boot boot.img
fastboot reboot
check cmdline to make sure change is successful.
adb root
$ adb shell cat /proc/cmdline
sched_enable_hmp=1 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0
androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1
androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78B0000 trace_event=sched:,
workqueue:
,irq:,cpufreq_interactive:,:thermal:* trace_buf_size=48M androidboot.emmc=true
androidboot.verifiedbootstate=orange androidboot.veritymode=enforcing androidboot.keymaster=1
androidboot.serialno=41544cca androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,
mdss_dsi_r69006_1080p_cmd:1:none:cfg:single_dsi
1.2.1 Choose the right tracing categories
All the available events can be found with commands:
adb shell ls /d/tracing/events
almk
asoc
binder
block
cfg80211
cma

Interested events can be appended to boot command lines, separated with commar.
1.2.2 Enable user space tracing

If we are interested in the userspace tracing like am/wm/audio/input, can specify that by adding
property in system/build.prop
debug.atrace.tags.enableflags=0xFFFF
each bit in this value is corresponding to a category: (system/core/include/cutils/trace.h)
#define ATRACE_TAG_GRAPHICS (1<<1)
#define ATRACE_TAG_INPUT (1<<2)
….
#define ATRACE_TAG_POWER (1<<17)
So we can simply enable all the categories by set debug.atrace.tags.enableflags to 0xFFFF
#/add a new line in system/buildprop
debug.atrace.tags.enableflags=0xFFFF
#push to system/build.prop
adb root
adb remount
adb push build.prop /system/build.prop
adb shell chmod 755 /system/build.prop
adb shell sync
adb reboot
1.3 capture ftrace logs
Connect device with usb cable, and boot up, once boot up is finished, run the scripts to pull logs:
adb root
adb wait-for-device
adb shell echo 0 > /d/tracing/trace_on
adb pull /d/tracing/trace trace.txt

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI