Skip to content

feat: report the GPU usage of Samsung Galaxy phones - #671

Merged
Zel9278 merged 1 commit into
mainfrom
feat/samsung-gpu
Oct 9, 2026
Merged

Zel9278 merged 1 commit into
mainfrom
feat/samsung-gpu

Conversation

@Zel9278

@Zel9278 Zel9278 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Galaxy(Exynos:Mali、新しい機種は Xclipse)の GPU 使用率を読むようにした。

  • Samsung のカーネルの /sys/kernel/gpu/gpu_busy:使用率が%で入っている(12 % など)。adb shell の権限で読める
  • 名前は gpu_model から。読めなければ「GPU」
  • 中身の最初の数字を%として使う(12 %・12%・12、小数も)
  • 共有メモリは、Adreno と同じく dumpsys gpu --gpumem から(GPU の種類に関係なく使える)
  • 読む順番は nvidia-smi → Adreno → Samsung。Adreno の部分は mobile モジュールにまとめた

確認

  • cargo clippy(pedantic)は警告 0、cargo test は 15 件通過(%の読み取りのテストを追加)
  • まとめ直したあとも、SH-M28(Adreno 752)で使用率と共有メモリが出ることを確かめた
  • Galaxy の実機ではまだ試していない(手元に無い)

🤖 Generated with Claude Code

Exynos Galaxy phones (Mali, or Xclipse on newer ones) expose the GPU
usage in percent through Samsung's /sys/kernel/gpu/gpu_busy ("12 %"),
readable from adb shell, and the model in gpu_model. When neither
nvidia-smi nor the Adreno files are there, these are read; the shared
GPU memory comes from dumpsys gpu as for Adreno, which works for any
GPU.

The Adreno code moves into a mobile module with the Samsung reader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPa4N5jsG2gZ7yW3FiM2KN
@Zel9278
Zel9278 merged commit 4a4c544 into main Oct 9, 2026
8 checks passed
@Zel9278
Zel9278 deleted the feat/samsung-gpu branch October 9, 2026 04:30
@github-actions github-actions Bot mentioned this pull request Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant