markzhai / markzhai/AndroidPerformanceMonitor

CpuSampler报错

Open
#122 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
6.7k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

09-06 16:22:38.457 4007-4116/com.lrlz.beautyshop E/CpuSampler: doSample:
java.io.FileNotFoundException: /proc/stat (Permission denied)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:200)
at java.io.FileInputStream.(FileInputStream.java:150)
at java.io.FileInputStream.(FileInputStream.java:103)
at com.github.moduth.blockcanary.CpuSampler.doSample(CpuSampler.java:108)
at com.github.moduth.blockcanary.AbstractSampler$1.run(AbstractSampler.java:33)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)

android 8.0上必现
希望能够视频安卓8.0
谢谢

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CpuSampler.java at line 108 and the Android 8.0 stack trace showing access to /proc/stat. Reproduce the failure on Android 8.0 and inspect how sampling handles it. Done means CpuSampler no longer produces this permission error on Android 8.0 while the reported sampling behavior remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.