高通平台如何offline 抓取systrace log


当系统需要深度睡眠时,离线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

				<script>
					(function(){
						function setArticleH(btnReadmore,posi){
							var winH = $(window).height();
							var articleBox = $("div.article_content");
							var artH = articleBox.height();
							if(artH > winH*posi){
								articleBox.css({
									'height':winH*posi+'px',
									'overflow':'hidden'
								})
								btnReadmore.click(function(){
									if(typeof window.localStorage === "object" && typeof window.csdn.anonymousUserLimit === "object"){
										if(!window.csdn.anonymousUserLimit.judgment()){
											window.csdn.anonymousUserLimit.Jumplogin();
											return false;
										}else if(!currentUserName){
											window.csdn.anonymousUserLimit.updata();
										}
									}
									
									articleBox.removeAttr("style");
									$(this).parent().remove();
								})
							}else{
								btnReadmore.parent().remove();
							}
						}
						var btnReadmore = $("#btn-readmore");
						if(btnReadmore.length>0){
							if(currentUserName){
								setArticleH(btnReadmore,3);
							}else{
								setArticleH(btnReadmore,1.2);
							}
						}
					})()
				</script>
				</article>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值