BrowserThread::IO has a specific IOThreadRun() stack frame.
The TaskScheduler should also have named frames on its threads so they can be more easily identified (currently they're all just ThreadMain() -> Thread::Run() -> ...).
For example in issue 728235, it would have been nice if the stack had explicitly labeled the reported thread as the service thread.
Comment 1 by fdoray@chromium.org
, May 3 2018To maximize the usefulness of this, particularly when background pool is merged with foreground pool, we should have a stack frame for each possible TaskTraits. NOINLINE void TaskTracker::RunUserBlockingPriority(Task task, Sequence* sequence, bool can_run_task) { RunOrSkipTask(Task task, sequence, can_run_task) } NOINLINE void TaskTracker::RunUserVisiblePriority(Task task, Sequence* sequence, bool can_run_task) { RunOrSkipTask(Task task, sequence, can_run_task) } NOINLINE void TaskTracker::RunBackgroundPriority(Task task, Sequence* sequence, bool can_run_task) { RunOrSkipTask(Task task, sequence, can_run_task) } NOINLINE void TaskTracker::RunMayBlock(Task task, Sequence* sequence, bool can_run_task) { switch (task.traits.priority()) { case TaskPriority::USER_BLOCKING: RunUserBlockingPriority(...); break; ... } } ...