今天有个小伙伴私信我,想了解下如何分析现场中gpu的负载。这里一起分享给大家。
- echo gpu_set_log_level 4 > /dev/kgsl-control
- echo gpubusystats 100 > /dev/kgsl-control
配置完节点后,日志会通过slog2info输出,我们可以通过解析slog来分析gpu的当前负载,指令如下:
slog2info -w | grep -i kgsl | grep -E "precentage|utilization"
- Jan 01 00:06:40.163 KGSL.49188 OS-Buffer 0 KGSL:(tid:13):(caller_pid:49188) {0x74725000|0x30020003} CRITICAL INFO rgs_perfcounter_gpu_global_busystats_calculate_continuous[1108]: frame 606: freq = 506.905711MHz/635Mhz, elapsed time = 101.938595ms, busy time = 0.000000ms, busy = 0.000000%, utilization = 0.000000%
- Jan 01 00:06:40.265 KGSL.49188 OS-Buffer 0 KGSL:(tid:13):(caller_pid:49188) {0x74725000|0x30020003} CRITICAL INFO rgs_p