本文へスキップ
Skillpedia
一般的なプログラミング25k · #10064

trace-analysis

できること

このスキルは、トレースファイルを分析して、アプリの遅い部分や固まった部分の原因を見つける方法をAIに示します。UIのカクつきなどの性能の問題を調べるエンジニア向けです。

使う場面

  • ✓トレースファイルで、メインのスレッドがブロックされ、画面が遅く感じられたとき。
  • ✓待機しているスレッドを、それを起こしたスレッドまでたどる必要があるとき。
  • ✓眠っているスレッドやブロックされたスレッドが何を待っていたかを見たいとき。

スキルのリンク

https://github.com/chromium/chromium/blob/main/agents/skills/trace-analysis/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/chromium/chromium/blob/main/agents/skills/trace-analysis/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“アプリが一瞬固まります。このトレースファイルを見て、どのスレッドが遅延を起こしたか教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

AIは、どのスレッドが待機していたかを見て、起こす記録をたどり、それを解放したスレッドを見つけます。また、システムコールを確認して、待機しているスレッドが何でブロックされていたかを調べます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Skill: Trace Analysis for Blocked Threads

When analyzing traces for UI jank or blocked threads (e.g., monitor contention on main thread):

  1. Don't just look at the ancestors of a slice: Looking at ancestors only shows the calling hierarchy on that thread. It might lead to dead ends or vague links if the callback was posted or triggered by another event loop.
  2. Follow the 'Woken By' or 'Waking' metadata: Look at the 'Running' or 'Runnable' task on the timeline to inspect what event or thread woke it up or sent work to it. This bridges cross-thread and async gaps. In SQL queries, utilize the waker_utid and waker_id columns in the thread_state table to find the hard waker thread that moved the target from a sleeping to a runnable state.
  3. Look at syscalls to understand why a thread is not runnable: If a thread is listed as Sleeping or Blocked (and not Runnable), look at recorded syscalls (such as SYS_futex) to understand what operation or system lock it was waiting for. This adds context on what exact kernel blocker stalled the thread.
  4. Trace cross-process flows (IPC/Binder): If a thread was woken by system_server or another process (like Play Store's com.android.vending), find out what service or operation was being called or completed (e.g. searching for unbindServiceLocked or onAppUpdateInfo in slice or args table). Using waker_utid to locate the waking thread allows identifying the exact operation handle on that waker thread, creating a causal chain across processes instead of relying on luck or timing estimates.
  5. Identify the chain of events: Chrome -> Play Core library -> System Server (handling connection or binder completion) -> Event handled by background vs UI thread. This gives context on why a shared lock was taken and held synchronously.

This approach avoids getting stuck in opaque library calls and allows tracking complete cross-process flows.

よくある質問

トレースファイルとは何ですか?

プログラムの各部分が時間とともに何をしていたかを記録したものです。遅い箇所を見つけるのに役立ちます。

親の呼び出しだけを見ればよいのではないですか?

親の呼び出しは、1つのスレッドの経路しか示しません。原因は別のスレッドにあるかもしれないので、このスキルは起こす関係をたどります。

特別なツールが必要ですか?

このスキルはトレースのデータに対するSQLクエリに触れています。実行するには、AIがトレース分析ツールにアクセスできる必要があるかもしれません。

詳細

作者による元の説明

Skill for analyzing trace files and finding hard causal links across threads and processes (using waker_utid).

repo: chromium/chromium

人気

GitHubのスター
25k
ランキング
#10064
ライセンス
BSD-3-Clause
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル