外观
如何理解Walk through your investigation / Perfetto 排查思路?
标准回答
When investigating a performance issue, I would first define the symptom clearly. Is it slow startup, delayed input response, or animation jank?
Then I would capture a trace that includes the relevant time window and locate the affected threads.
For the main thread, I would check whether it is running, runnable, or waiting.
If it is running for a long time, I would look at the work being executed and use CPU profiling if more detail is needed.
If it is runnable but not getting CPU time, I would investigate scheduling delays and CPU contention.
If it is waiting, I would check whether it is waiting for a lock, a Binder reply, or I/O. I would then follow that dependency instead of stopping at the main thread.
For a rendering issue, I would also examine RenderThread and SurfaceFlinger.
I would use these observations to form a hypothesis, verify it, and compare the results under consistent test conditions.
表达顺序
定义现象 → 抓 Trace → 看线程状态 → 追依赖 → 验证假设
说明
用 “I would” 表达排查思路。Running:正在 CPU 上运行;Runnable:可以运行,但尚未获得 CPU;Waiting:等待其他条件。
内容来源
- 技术英语表达稿 · 原条目
speech-3