chrome_main_thread_hotspots
List Chrome main-thread tasks sorted by wall duration to find responsiveness bottlenecks. Compare CPU and wall times to pinpoint hot tasks during scroll or load.
Instructions
Top Chrome main-thread tasks by wall duration: id, name, task_type, thread_name, process_name, dur_ms, cpu_pct (thread_dur/dur), thread_dur_ms. Uses chrome.tasks and thread.is_main_thread = 1 (tid == pid per Linux convention).
Use when: investigating main-thread responsiveness, finding hot tasks during scroll/load, comparing CPU vs wall time, scoping to one renderer in multi-renderer traces.
Don't use for: non-Chrome traces (will error). For background (non-main) thread tasks, drop to execute_sql against chrome.tasks directly.
Parameters (all optional):
process_name/pid/upid: scope to one process or process type.process_name='Renderer'shows all renderers together;pidis the OS pid (visible in Task Manager but can be recycled mid-trace);upidis the trace-internal unique pid (always precise — prefer overpidfor multi-renderer traces). Look up both vialist_processes. All AND when set; redundant pairings (e.g. matching upid + pid) are harmless.min_dur_ms: minimum task duration. Defaults to 16 (one 60 Hz frame). Pass 0 for ALL tasks; raise to 33 (30 Hz) or 100 to focus on bigger stutters.limit: max rows (default 100, capped at 5000). Must be > 0 if set.
Empty result: either no main-thread tasks exceeded min_dur_ms (good performance at that threshold), or thread metadata is incomplete (is_main_thread is NULL). If the latter is suspected, retry with execute_sql filtering on thread_name IN ('CrBrowserMain', 'CrRendererMain') to bypass the is_main_thread filter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Optional max rows to return. Defaults to 100 and is capped at 5000 to match `execute_sql`. Lower values keep responses short; higher values surface long tails of mid-duration tasks. Accepts both numbers and numeric strings. | |
| min_dur_ms | No | Optional minimum task duration in milliseconds. Defaults to 16 ms (one 60 Hz frame budget). Pass 0 to see ALL main-thread tasks; raise to e.g. 33 (30 Hz) or 100 to focus on the worst stutters. Must be a finite non-negative number. Accepts both numbers and numeric strings. | |
| pid | No | Optional pid filter — the OS-level process ID (visible in Task Manager). Get pid from `list_processes`. ANDs with the other filters when set. Note: pids can be recycled within a long trace; prefer `upid` when precision matters. Accepts both numbers and numeric strings. | |
| process_name | No | Optional process-name filter (e.g. "Renderer", "Browser", "GPU Process"). Useful to scope to one process type without picking a specific instance. | |
| upid | No | Optional upid filter — the trace-internal Unique Process ID assigned by trace_processor (also from `list_processes`). Always uniquely identifies one process within a trace, even if the OS recycled its pid. Use this to disambiguate same-named or pid-recycled processes; ANDs with the other filters when set. Accepts both numbers and numeric strings. |