搜索

430

主题

515

帖子

2118

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2118
QQ
发表于 2020-10-26 09:14:17 6913 浏览 0 回复

如何通过adb 命令来调试 about CPU/GPU/DRAM/FPSGO/Thermal/Display

[DESCRIPTION]
      大家在分析performance问题时,经常需要boost CPU/GPU/DRAM、关闭FPSGO/Thermal、对比Display资讯,本FAQ提供常用的debug命令以供参考。

[SOLUTION]
1. Command - CPU
       CPU相关debug指令
      adb root
  1.        Fix L & LL cores max frequency:
  2.        adb shell "echo 0 0 > /proc/ppm/policy/ut_fix_freq_idx"

  3.        Fix cluster0 cores max frequency, some chip's L core is cluster0, some chip's L core is cluster1.
  4.        adb shell "echo -1 0 > /proc/ppm/policy/ut_fix_freq_idx"

  5.        Fix cluster1 cores max frequency
  6.        adb shell "echo 0 -1 > /proc/ppm/policy/ut_fix_freq_idx"

  7.        Get L & LL cores frequency
  8.        adb shell "cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_freq"
  9.        adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_freq"

  10.        Get L & LL cores opp table
  11.        adb shell "cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_oppidx"
  12.        adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_oppidx"

  13.        Check current eas status
  14.        adb shell "cat /sys/devices/system/cpu/eas/info"

  15.        关闭cluster0 cores
  16.        adb shell "echo 0 4 > /proc/ppm/policy/ut_fix_core_num"

  17.        More CPU Commands can refer to FAQ21818.
复制代码

2. Command - GPU
       GPU相关debug指令
       adb root
  1.        Get frequency table
  2.        adb shell "cat /proc/gpufreq/gpufreq_opp_dump"

  3.        Fix frequency, the frequency sbould in gpufreq_opp_dump
  4.        adb shell "echo ***000 > /proc/gpufreq/gpufreq_opp_freq"

  5.        Check current frequency:
  6.        adb shell "cat /proc/gpufreq/gpufreq_var_dump"

  7.        定GPU天花板OPP档位
  8.        adb shell "echo 1 > /d/ged/hal/custom_upbound_gpu_freq"
复制代码




3. Command - DRAM
       VCORE相关debug指令
       adb root
  1.        Force VCORE DVFS
  2.        adb shell "echo 0 > /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_force_vcore_dvfs_opp" //0档表示最高频率

  3.        Check VCORE current status
  4.        adb shell "while true; do (sleep 1; cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_dump | grep -e uv -e khz -e REQ -e DVFSRC_SW_REQ ; echo ===========================); done"
复制代码
  1.        Get OPP table
  2.        adb shell "cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_opp_table"

  3.        Check if VCORE DVFS is enabled
  4.        adb shell "cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_enable"

  5.        More DRAM FAQs can refer to FAQ22607
复制代码

4. Command - FPSGO
  1.        FPSGO开关指令
  2.        adb root

  3.        Check FPSGO enabled
  4.        adb shell "cat /sys/kernel/debug/fpsgo/common/fpsgo_enable"

  5.        Disable FPSGO
  6.        adb shell "echo 0 > /sys/kernel/debug/fpsgo/common/force_onoff"

  7.        Enable FPSGO
  8.        adb shell "echo 1 > /sys/kernel/debug/fpsgo/common/force_onoff"

  9.        Check target fps
  10.        adb shell "cat /sys/kernel/debug/fpsgo/fstb/fpsgo_status"
复制代码


5. Command - Thermal

  1.        Thermal开关指令
  2.        adb root

  3.        Disable thermal
  4.        adb shell "thermal_manager /vendor/etc/.tp/.ht120.mtc"

  5.        Enable thermal policy
  6.        adb shell "thermal_manager vendor/etc/.tp/thermal.conf"

  7.        查看当前thermal policy
  8.        adb shell "cat /data/vendor/.tp/.settings"
  9.        android O之前的版本,使用的节点是/data/.tp/.settings
  10.        adb shell "cat /data/.tp/.settings"

  11.        查看当前thermal policy下的threshold
  12.        adb shell "cat /proc/driver/thermal/clctm"

  13.        Some thermal test of old android version can refer to FAQ15144
复制代码

6. Display相关指令
       检查解析度 & Buffer slots资讯
       adb shell "dumpsys SurfaceFlinger" > sf1.log

       change window size command
       adb shell "wm size 720x1560"

       Reset window size command
       adb shell wm size reset

       More display commands can refer to FAQ22797/FAQ23408/FAQ22555
手机微信同号:13682654092
回复

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


登录或注册
快速回复 返回顶部 返回列表