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

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

转载于:https://blog.51cto.com/13694886/2096070

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值