获取FPS信息

tools/vendor/google_prebuilts/arc/measure_fps.py

 code based on:
18 # https://chromium.googlesource.com/chromium/src/build/+/689a0a184e54c7a50a05964ae666b82e96ea549f/android/pylib/perf/surface_stats_collector.py​​​​​​

https://blog.csdn.net/weixin_43886680/article/details/121088311

https://blog.csdn.net/m0_37999066/article/details/129146611

关于 android 通过 python 统计 fps_python android13 游戏帧率计算公式-CSDN博客

如何使用Perfetto通过trace分析性能问题(一)——使用Timeline检测Android Jank_perfetto expected timeline actual timeline-CSDN博客



 

1073625857298   1073666694641   1073626659693

1073625857298  

1073666694641  

1073626659693



 

应用里面开始

    RenderThread-10050 ( 3476) [001] .... 1073.625613: tracing_mark_write: B|3476|dispatchSetFrameTimelineInfo
    RenderThread-10050 ( 3476) [001] .... 1073.625616: tracing_mark_write: B|3476|setFrameTimelineInfo(VRI[MainActivity]#0) frameNumber: 297 vsyncId: 44747

SF 开始



 vehiclesettings-3476  ( 3476) [005] .... 1072.596941: tracing_mark_write: B|3476|Choreographer#doFrame 44259

> adb shell dumpsys SurfaceFlinger --latency "SurfaceView - com.tencent.tmgp.sgame/com.tencent.tmgp.sgame.SGameActivity#0"
16666666
59069638658663  59069678041684  59069654158298
59069653090955  59069695022100  59069670894236
59069671034444  59069711403455  59069687949861
59069688421840  59069728057361  59069704415121
59069705420850  59069744773350  59069720767830
59069719818975  59069761378975  59069737416007
59069736702673  59069778060955  59069754568663
59069753361528  59069794716007  59069770761632
59069768766371  59069811380486  59069787649600
......

.desiredPresentTime     下一个 HW-VSYNC 的时间戳

actualPresentTime     retire fence signal 的时间戳

frameReadyTime     acquire fence signal 的时间戳

desiredPresentTime    

          <idle>-0     (-----) [003] .... 1073.581689: cpu_idle: state=1 cpu_id=3
          <idle>-0     (-----) [001] .... 1073.581833: sched_waking: comm=wfd event liste pid=347 prio=120 target_cpu=4
          <idle>-0     (-----) [001] .... 1073.581843: cpu_idle: state=4294967295 cpu_id=1
          <idle>-0     (-----) [001] .... 1073.581844: cpu_idle: state=1 cpu_id=1
          <idle>-0     (-----) [004] .... 1073.581854: sched_wakeup: comm=wfd event liste pid=347 prio=120 target_cpu=004
          <idle>-0     (-----) [004] .... 1073.581855: cpu_idle: state=4294967295 cpu_id=4
          <idle>-0     (-----) [004] .... 1073.581859: sched_switch: prev_comm=swapper/4 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=wfd event liste next_pid=347 next_prio=120
 wfd event liste-347   (  347) [004] .... 1073.581864: sched_waking: comm=crtc_commit:64 pid=350 prio=120 target_cpu=7
          <idle>-0     (-----) [007] .... 1073.581886: sched_wakeup: comm=crtc_commit:64 pid=350 prio=120 target_cpu=007
 wfd event liste-347   (  347) [004] .... 1073.581886: sched_switch: prev_comm=wfd event liste prev_pid=347 prev_prio=120 prev_state=S ==> next_comm=swapper/4 next_pid=0 next_prio=120
          <idle>-0     (-----) [007] .... 1073.581887: cpu_idle: state=4294967295 cpu_id=7
          <idle>-0     (-----) [004] .... 1073.581889: cpu_idle: state=1 cpu_id=4
          <idle>-0     (-----) [007] .... 1073.581890: sched_switch: prev_comm=swapper/7 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=crtc_commit:64 next_pid=350 next_prio=120
  crtc_commit:64-350   (  350) [007] .... 1073.581899: sched_switch: prev_comm=crtc_commit:64 prev_pid=350 prev_prio=120 prev_state=S ==> next_comm=swapper/7 next_pid=0 next_prio=120
          <idle>-0     (-----) [007] .... 1073.581901: cpu_idle: state=1 cpu_id=7

actualPresentTime    

送显示

367: sched_switch: prev_comm=wfd event liste prev_pid=347 prev_prio=120 prev_state=S ==> next_comm=swapper/2 next_pid=0 next_prio=120
          <idle>-0     (-----) [002] .... 1072.633368: cpu_idle: state=1 cpu_id=2
          <idle>-0     (-----) [006] .... 1072.633369: sched_wakeup: comm=crtc_commit:62 pid=349 prio=120 target_cpu=006
          <idle>-0     (-----) [006] .... 1072.633370: cpu_idle: state=4294967295 cpu_id=6
 composer@2.4_se-681   (  681) [004] .... 1072.633371: binder_transaction_received: transaction=560437
          <idle>-0     (-----) [006] .... 1072.633393: sched_switch: prev_comm=swapper/6 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=crtc_commit:62 next_pid=349 next_prio=120
 composer@2.4_se-681   (  681) [004] .... 1072.633394: tracing_mark_write: B|681|HIDL::IComposerClient::executeCommands_2_2::server
  crtc_commit:62-349   (  349) [006] .... 1072.633405: sched_switch: prev_comm=crtc_commit:62 prev_pid=349 prev_prio=120 prev_state=S ==> next_comm=swapper/6 next_pid=0 next_prio=120
          <idle>-0     (-----) [006] .... 1072.633407: cpu_idle: state=1 cpu_id=6
 composer@2.4_se-681   (  681) [004] .... 1072.633423: tracing_mark_write: B|681|HWCSession::PresentDisplay::
 composer@2.4_se-681   (  681) [004] .... 1072.633430: tracing_mark_write: B|681|HWCSession::PresentDisplayInternal::
 composer@2.4_se-681   (  681) [004] .... 1072.633432: tracing_mark_write: E|681
 composer@2.4_se-681   (  681) [004] .... 1072.633435: tracing_mark_write: B|681|HWCDisplay::CommitLayerStack::
 composer@2.4_se-681   (  681) [004] .... 1072.633442: tracing_mark_write: B|681|HWDeviceDRM::Commit::
 composer@2.4_se-681   (  681) [004] .... 1072.633445: tracing_mark_write: B|681|HWDeviceDRM::Register::
 composer@2.4_se-681   (  681) [004] .... 1072.633448: tracing_mark_write: E|681
 composer@2.4_se-681   (  681) [004] .... 1072.633450: tracing_mark_write: B|681|HWDeviceDRM::AtomicCommit::
 composer@2.4_se-681   (  681) [004] .... 1072.633453: tracing_mark_write: B|681|HWDeviceDRM::SetupAtomic::
          <idle>-0     (-----) [003] .... 1072.633454: sched_waking: comm=kworker/3:1 pid=77 prio=120 target_cpu=3
          <idle>-0     (-----) [003] .... 1072.633456: sched_wakeup: comm=kworker/3:1 pid=77 prio=120 target_cpu=003
          <idle>-0     (-----) [003] .... 1072.633468: cpu_idle: state=4294967295 cpu_id=3
          <idle>-0     (-----) [003] .... 1072.633470: sched_switch: prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/3:1 next_pid=77 next_prio=120
 composer@2.4_se-681   (  681) [004] .... 1072.633472: tracing_mark_write: E|681
     kworker/3:1-77    (   77) [003] .... 1072.633472: sched_waking: comm=AdrenoOsLib pid=1153 prio=97 target_cpu=5
 composer@2.4_se-681   (  681) [004] .... 1072.633474: tracing_mark_write: B|681|DRMAtomicReq::Commit::

frameReadyTime    

    RenderThread-10050 ( 3476) [003] .... 1072.582371: sched_wakeup: comm=GPU completion pid=10065 prio=110 target_cpu=003
    RenderThread-10050 ( 3476) [003] .... 1072.582372: tracing_mark_write: C|3476|GPU completion|1
    RenderThread-10050 ( 3476) [003] .... 1072.582373: tracing_mark_write: E|3476
    RenderThread-10050 ( 3476) [003] .... 1072.582375: tracing_mark_write: E|3476
    binder:729_2-824   (  729) [000] .... 1072.582379: sched_switch: prev_comm=binder:729_2 prev_pid=824 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120
  surfaceflinger-887   (  729) [004] .... 1072.582380: sched_switch: prev_comm=surfaceflinger prev_pid=887 prev_prio=120 prev_state=S ==> next_comm=swapper/4 next_pid=0 next_prio=120
          <idle>-0     (-----) [000] .... 1072.582381: cpu_idle: state=1 cpu_id=0
          <idle>-0     (-----) [004] .... 1072.582383: cpu_idle: state=1 cpu_id=4
    RenderThread-10050 ( 3476) [003] .... 1072.582389: tracing_mark_write: E|3476
          <idle>-0     (-----) [001] .... 1072.582395: sched_waking: comm=DR_update_filte pid=5241 prio=120 target_cpu=1
    RenderThread-10050 ( 3476) [003] .... 1072.582397: tracing_mark_write: B|3476|reportMetricsWithPresentTime
    RenderThread-10050 ( 3476) [003] .... 1072.582400: tracing_mark_write: B|3476|getFrameTimestamps
          <idle>-0     (-----) [001] .... 1072.582401: sched_wakeup: comm=DR_update_filte pid=5241 prio


 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值