Hewro Hewei
unread,Mar 31, 2026, 6:52:42 AM (7 days ago) Mar 31Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium-dev, Joe Mason, Chromium-dev, scheduler-dev, ihe...@gmail.com
Thanks for the reply.
Our detector is heartbeat-based: a periodic timer on the UI thread updates a timestamp, and a monitor thread reports a stall if that heartbeat is overdue.
I looked through Chromium’s existing mechanisms (`HangWatcher`, `GpuWatchdogThread`, `JankMonitorImpl`, responsiveness watcher), and my understanding is that they mostly reason about task/event/message-pump work boundaries rather than a heartbeat signal.
So for a heartbeat-based detector, it seems expected that some reports will capture only the normal message-loop wait path: the signal reflects overall UI-thread responsiveness, not necessarily the runtime of one specific task/event/message. By the time we sample, the UI thread may already have returned to the run loop.
The idea of discounting reports when the monitor thread itself appears delayed is also very helpful for us.Separately, in production we sometimes see very shallow crashpad stacks for the UI thread, e.g. only 2 frames on macOS:
```text
_mach_msg2_trap
_mach_msg2_internal
```
and on Windows sometimes similarly shallow stacks such as:
```text
NtUserCalcMenuBar
NcGetFrameMetrics
```
Has the Chromium team seen this kind of very shallow stack in apparent UI-hang reports? If so, any guidance on common causes or ways to improve diagnostic quality would be much appreciated.
Thanks again!