[tracing] Improve MainThreadSchedulerImpl trace events [chromium/src : main]

3 views
Skip to first unread message

Etienne Pierre-Doray (Gerrit)

unread,
Jul 27, 2026, 2:37:49 PM (10 days ago) Jul 27
to Scott Haseley, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
Attention needed from Scott Haseley

Etienne Pierre-Doray added 2 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Etienne Pierre-Doray . resolved

PTAL

File third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h
Line 782, Patchset 6 (Latest): TraceableState<std::optional<TaskDescriptionForTracing>,
TRACE_DISABLED_BY_DEFAULT("renderer.scheduler")>
task_description_for_tracing; // Don't use except for tracing.
TraceableState<std::optional<TaskPriority>,
TRACE_DISABLED_BY_DEFAULT("renderer.scheduler")>
task_priority_for_tracing; // Only used for tracing.
Etienne Pierre-Doray . unresolved

These 2 are redundant with "scheduler" that adds args to RunTask (we could probably remove them)
They are also not moved to "renderer.scheduler.status" because they are high overhead.

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia36b7b05364bb608ad0730a40392386a70525bd7
Gerrit-Change-Number: 8074040
Gerrit-PatchSet: 6
Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Jul 2026 18:37:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

AI Code Reviewer (Gerrit)

unread,
Jul 27, 2026, 2:40:36 PM (10 days ago) Jul 27
to Etienne Pierre-Doray, Scott Haseley, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
Attention needed from Scott Haseley

AI Code Reviewer added 1 comment

File third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h
Line 315, Patchset 6 (Latest): perfetto::Track tracing_track() const { return *tracing_track_; }
AI Code Reviewer . unresolved

Blink Style Guide: Naming - Use 'CamelCase' for all function names. Function names should begin with an uppercase letter. Please rename `tracing_track()` to `TracingTrack()`.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia36b7b05364bb608ad0730a40392386a70525bd7
Gerrit-Change-Number: 8074040
Gerrit-PatchSet: 6
Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-Comment-Date: Mon, 27 Jul 2026 18:40:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Haseley (Gerrit)

unread,
Jul 27, 2026, 5:29:52 PM (9 days ago) Jul 27
to Etienne Pierre-Doray, AI Code Reviewer, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
Attention needed from Etienne Pierre-Doray

Scott Haseley voted and added 4 comments

Votes added by Scott Haseley

Code-Review+1

4 comments

Patchset-level comments
Scott Haseley . resolved

LGTM. Thanks for all the tracing improvements!

File third_party/blink/renderer/platform/scheduler/common/throttling/cpu_time_budget_pool.h
Line 27, Patchset 6 (Latest): "RendererScheduler.BackgroundBudgetMs",
Scott Haseley . unresolved

MTSI is using "Scheduler.*" now instead of RendererScheduler. Should this too?

File third_party/blink/renderer/platform/scheduler/main_thread/find_in_page_budget_pool_controller.cc
Line 37, Patchset 6 (Latest): "RendererScheduler.FindInPageBudgetMs", scheduler_->tracing_track());
Scott Haseley . unresolved

Same question here.

File third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h
Line 782, Patchset 6 (Latest): TraceableState<std::optional<TaskDescriptionForTracing>,
TRACE_DISABLED_BY_DEFAULT("renderer.scheduler")>
task_description_for_tracing; // Don't use except for tracing.
TraceableState<std::optional<TaskPriority>,
TRACE_DISABLED_BY_DEFAULT("renderer.scheduler")>
task_priority_for_tracing; // Only used for tracing.
Etienne Pierre-Doray . unresolved

These 2 are redundant with "scheduler" that adds args to RunTask (we could probably remove them)
They are also not moved to "renderer.scheduler.status" because they are high overhead.

Scott Haseley

ACK, I use the "scheduler" variants, so removing SG from my side. I still find it a bit unintuitive that "scheduler" adds info to existing trace events. Not sure if there's a better setup/name for that, but meh I'm used to it at this point.

Open in Gerrit

Related details

Attention is currently required from:
  • Etienne Pierre-Doray
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia36b7b05364bb608ad0730a40392386a70525bd7
    Gerrit-Change-Number: 8074040
    Gerrit-PatchSet: 6
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Comment-Date: Mon, 27 Jul 2026 21:29:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Etienne Pierre-Doray <etie...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Etienne Pierre-Doray (Gerrit)

    unread,
    Jul 28, 2026, 3:52:01 PM (9 days ago) Jul 28
    to Scott Haseley, AI Code Reviewer, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
    Attention needed from Scott Haseley

    Etienne Pierre-Doray voted and added 4 comments

    Votes added by Etienne Pierre-Doray

    Commit-Queue+2

    4 comments

    File third_party/blink/renderer/platform/scheduler/common/throttling/cpu_time_budget_pool.h
    Line 27, Patchset 6: "RendererScheduler.BackgroundBudgetMs",
    Scott Haseley . resolved

    MTSI is using "Scheduler.*" now instead of RendererScheduler. Should this too?

    Etienne Pierre-Doray

    Sure, done.

    File third_party/blink/renderer/platform/scheduler/main_thread/find_in_page_budget_pool_controller.cc
    Line 37, Patchset 6: "RendererScheduler.FindInPageBudgetMs", scheduler_->tracing_track());
    Scott Haseley . resolved

    Same question here.

    Etienne Pierre-Doray

    Done

    File third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h
    Line 782, Patchset 6: TraceableState<std::optional<TaskDescriptionForTracing>,

    TRACE_DISABLED_BY_DEFAULT("renderer.scheduler")>
    task_description_for_tracing; // Don't use except for tracing.
    TraceableState<std::optional<TaskPriority>,
    TRACE_DISABLED_BY_DEFAULT("renderer.scheduler")>
    task_priority_for_tracing; // Only used for tracing.
    Etienne Pierre-Doray . resolved

    These 2 are redundant with "scheduler" that adds args to RunTask (we could probably remove them)
    They are also not moved to "renderer.scheduler.status" because they are high overhead.

    Scott Haseley

    ACK, I use the "scheduler" variants, so removing SG from my side. I still find it a bit unintuitive that "scheduler" adds info to existing trace events. Not sure if there's a better setup/name for that, but meh I'm used to it at this point.

    Etienne Pierre-Doray

    Ok I removed it.

     still find it a bit unintuitive that "scheduler" adds info to existing trace events

    altimin added at some point "config.scheduler.record_task_post_time" (for other things), which is still just a category but at least the naming is a bit more helpful.

    Line 315, Patchset 6: perfetto::Track tracing_track() const { return *tracing_track_; }
    AI Code Reviewer . resolved

    Blink Style Guide: Naming - Use 'CamelCase' for all function names. Function names should begin with an uppercase letter. Please rename `tracing_track()` to `TracingTrack()`.

    To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
    **Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


    _This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
    _AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
    _[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

    Etienne Pierre-Doray

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Scott Haseley
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ia36b7b05364bb608ad0730a40392386a70525bd7
      Gerrit-Change-Number: 8074040
      Gerrit-PatchSet: 8
      Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-Attention: Scott Haseley <shas...@chromium.org>
      Gerrit-Comment-Date: Tue, 28 Jul 2026 19:51:55 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
      Comment-In-Reply-To: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Comment-In-Reply-To: Etienne Pierre-Doray <etie...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Etienne Pierre-Doray (Gerrit)

      unread,
      Jul 28, 2026, 3:52:31 PM (9 days ago) Jul 28
      to Scott Haseley, AI Code Reviewer, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
      Attention needed from Scott Haseley

      Etienne Pierre-Doray added 1 comment

      Patchset-level comments
      File-level comment, Patchset 8 (Latest):
      Etienne Pierre-Doray . resolved

      Ah I need re-lgtm

      Gerrit-Comment-Date: Tue, 28 Jul 2026 19:52:25 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Scott Haseley (Gerrit)

      unread,
      Jul 28, 2026, 4:06:45 PM (9 days ago) Jul 28
      to Etienne Pierre-Doray, AI Code Reviewer, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
      Attention needed from Etienne Pierre-Doray

      Scott Haseley voted and added 1 comment

      Votes added by Scott Haseley

      Code-Review+1

      1 comment

      Patchset-level comments
      Scott Haseley . resolved

      LGTM

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Etienne Pierre-Doray
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia36b7b05364bb608ad0730a40392386a70525bd7
        Gerrit-Change-Number: 8074040
        Gerrit-PatchSet: 8
        Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
        Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Comment-Date: Tue, 28 Jul 2026 20:06:37 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Etienne Pierre-Doray (Gerrit)

        unread,
        Jul 28, 2026, 4:17:20 PM (9 days ago) Jul 28
        to Scott Haseley, AI Code Reviewer, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org

        Etienne Pierre-Doray voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia36b7b05364bb608ad0730a40392386a70525bd7
        Gerrit-Change-Number: 8074040
        Gerrit-PatchSet: 8
        Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
        Gerrit-Comment-Date: Tue, 28 Jul 2026 20:17:14 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Etienne Pierre-Doray (Gerrit)

        unread,
        Jul 28, 2026, 4:26:46 PM (8 days ago) Jul 28
        to Scott Haseley, AI Code Reviewer, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
        Gerrit-Comment-Date: Tue, 28 Jul 2026 20:26:39 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Jul 28, 2026, 6:28:19 PM (8 days ago) Jul 28
        to Etienne Pierre-Doray, Scott Haseley, AI Code Reviewer, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        [tracing] Improve MainThreadSchedulerImpl trace events

        This CL
        - Folds MainThreadSchedulerImpl under a common "MainThreadScheduler" track
        - moves a few TraceableState to "renderer.scheduler.status" so that they are considered persistent events.
        - Plumb correct name to CPUTimeBudgetPool
        Change-Id: Ia36b7b05364bb608ad0730a40392386a70525bd7
        Commit-Queue: Etienne Pierre-Doray <etie...@chromium.org>
        Reviewed-by: Scott Haseley <shas...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1669816}
        Files:
        • M third_party/blink/renderer/platform/scheduler/common/throttling/cpu_time_budget_pool.cc
        • M third_party/blink/renderer/platform/scheduler/common/throttling/cpu_time_budget_pool.h
        • M third_party/blink/renderer/platform/scheduler/main_thread/find_in_page_budget_pool_controller.cc
        • M third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.cc
        • M third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h
        • M third_party/blink/renderer/platform/scheduler/main_thread/page_scheduler_impl.cc
        • M third_party/blink/renderer/platform/scheduler/worker/worker_thread_scheduler.cc
        Change size: M
        Delta: 7 files changed, 114 insertions(+), 106 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Scott Haseley
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia36b7b05364bb608ad0730a40392386a70525bd7
        Gerrit-Change-Number: 8074040
        Gerrit-PatchSet: 9
        Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages