Add tracing to the "actor" browser component [chromium/src : main]

3 views
Skip to first unread message

Ryan Sturm (Gerrit)

unread,
Aug 29, 2025, 4:13:44 PM (11 days ago) Aug 29
to David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
Attention needed from David Bokan

Ryan Sturm added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Ryan Sturm . resolved

bokan: PTAL, are there any other major files that I am missing that would help me understand the thread contention of the browser better?

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: I25338a5a0982d4aeae5f657aff50c3282808742c
Gerrit-Change-Number: 6900353
Gerrit-PatchSet: 2
Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Comment-Date: Fri, 29 Aug 2025 20:13:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Bokan (Gerrit)

unread,
Aug 29, 2025, 5:11:22 PM (11 days ago) Aug 29
to Ryan Sturm, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
Attention needed from Ryan Sturm

David Bokan voted and added 1 comment

Votes added by David Bokan

Code-Review+1

1 comment

Patchset-level comments
David Bokan . resolved

if you want more granularity around load waiting you could add some traces to [ToolController](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/actor/tools/tool_controller.h).

Ditto for renderer-side and page stability: [ToolExecutor](https://source.chromium.org/chromium/chromium/src/+/main:chrome/renderer/actor/tool_executor.h)

Open in Gerrit

Related details

Attention is currently required from:
  • Ryan Sturm
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: I25338a5a0982d4aeae5f657aff50c3282808742c
    Gerrit-Change-Number: 6900353
    Gerrit-PatchSet: 2
    Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Attention: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Comment-Date: Fri, 29 Aug 2025 21:11:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ryan Sturm (Gerrit)

    unread,
    Aug 29, 2025, 5:12:53 PM (11 days ago) Aug 29
    to David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org

    Ryan Sturm added 1 comment

    Patchset-level comments
    Ryan Sturm . resolved

    I'll follow up if this is still giving me trouble. Thanks for the files!

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: I25338a5a0982d4aeae5f657aff50c3282808742c
    Gerrit-Change-Number: 6900353
    Gerrit-PatchSet: 2
    Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Comment-Date: Fri, 29 Aug 2025 21:12:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ryan Sturm (Gerrit)

    unread,
    Aug 29, 2025, 5:13:09 PM (11 days ago) Aug 29
    to Eric Seckler, David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
    Attention needed from Eric Seckler

    Ryan Sturm added 1 comment

    Patchset-level comments
    Ryan Sturm . resolved

    Eric: PTAL

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Eric Seckler
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: I25338a5a0982d4aeae5f657aff50c3282808742c
    Gerrit-Change-Number: 6900353
    Gerrit-PatchSet: 2
    Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Eric Seckler <esec...@chromium.org>
    Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Attention: Eric Seckler <esec...@chromium.org>
    Gerrit-Comment-Date: Fri, 29 Aug 2025 21:12:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ryan Sturm (Gerrit)

    unread,
    Sep 3, 2025, 3:52:45 PM (6 days ago) Sep 3
    to Eric Seckler, David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
    Attention needed from David Bokan and Eric Seckler

    New activity on the change

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Bokan
    • Eric Seckler
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: I25338a5a0982d4aeae5f657aff50c3282808742c
    Gerrit-Change-Number: 6900353
    Gerrit-PatchSet: 5
    Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Eric Seckler <esec...@chromium.org>
    Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Attention: Eric Seckler <esec...@chromium.org>
    Gerrit-Attention: David Bokan <bo...@chromium.org>
    Gerrit-Comment-Date: Wed, 03 Sep 2025 19:52:35 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Eric Seckler (Gerrit)

    unread,
    Sep 3, 2025, 10:14:25 PM (6 days ago) Sep 3
    to Ryan Sturm, David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
    Attention needed from David Bokan and Ryan Sturm

    Eric Seckler voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Bokan
    • Ryan Sturm
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: I25338a5a0982d4aeae5f657aff50c3282808742c
    Gerrit-Change-Number: 6900353
    Gerrit-PatchSet: 8
    Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Eric Seckler <esec...@chromium.org>
    Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Attention: Ryan Sturm <ryan...@chromium.org>
    Gerrit-Attention: David Bokan <bo...@chromium.org>
    Gerrit-Comment-Date: Thu, 04 Sep 2025 02:13:58 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Dave Tapuska (Gerrit)

    unread,
    Sep 4, 2025, 9:52:32 AM (5 days ago) Sep 4
    to Ryan Sturm, Eric Seckler, David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
    Attention needed from David Bokan and Ryan Sturm

    Dave Tapuska added 2 comments

    File chrome/browser/actor/actor_keyed_service.cc
    Line 253, Patchset 8 (Latest): const std::vector<optimization_guide::proto::ScriptToolResult> empty_results;
    Dave Tapuska . unresolved

    merge failure

    Line 281, Patchset 8 (Latest): std::vector<optimization_guide::proto::ScriptToolResult>
    Dave Tapuska . unresolved

    merge failure

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Bokan
    • Ryan Sturm
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      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: I25338a5a0982d4aeae5f657aff50c3282808742c
      Gerrit-Change-Number: 6900353
      Gerrit-PatchSet: 8
      Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Eric Seckler <esec...@chromium.org>
      Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
      Gerrit-CC: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Attention: Ryan Sturm <ryan...@chromium.org>
      Gerrit-Attention: David Bokan <bo...@chromium.org>
      Gerrit-Comment-Date: Thu, 04 Sep 2025 13:52:25 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Ryan Sturm (Gerrit)

      unread,
      Sep 4, 2025, 2:14:10 PM (5 days ago) Sep 4
      to Dave Tapuska, Eric Seckler, David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
      Attention needed from David Bokan

      Ryan Sturm voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • David Bokan
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      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: I25338a5a0982d4aeae5f657aff50c3282808742c
      Gerrit-Change-Number: 6900353
      Gerrit-PatchSet: 8
      Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Eric Seckler <esec...@chromium.org>
      Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
      Gerrit-CC: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Attention: David Bokan <bo...@chromium.org>
      Gerrit-Comment-Date: Thu, 04 Sep 2025 18:13:56 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Ryan Sturm (Gerrit)

      unread,
      Sep 4, 2025, 2:15:04 PM (5 days ago) Sep 4
      to Dave Tapuska, Eric Seckler, David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
      Attention needed from David Bokan

      Ryan Sturm voted Commit-Queue+1

      Commit-Queue+1
      Gerrit-Comment-Date: Thu, 04 Sep 2025 18:14:50 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Ryan Sturm (Gerrit)

      unread,
      Sep 4, 2025, 2:18:36 PM (5 days ago) Sep 4
      to Dave Tapuska, Eric Seckler, David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
      Attention needed from Dave Tapuska and David Bokan

      Ryan Sturm added 2 comments

      File chrome/browser/actor/actor_keyed_service.cc
      Line 253, Patchset 8: const std::vector<optimization_guide::proto::ScriptToolResult> empty_results;
      Dave Tapuska . resolved

      merge failure

      Ryan Sturm

      Thanks! That merge went very poorly.

      Line 281, Patchset 8: std::vector<optimization_guide::proto::ScriptToolResult>
      Dave Tapuska . resolved

      merge failure

      Ryan Sturm

      Thanks!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dave Tapuska
      • David Bokan
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      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: I25338a5a0982d4aeae5f657aff50c3282808742c
      Gerrit-Change-Number: 6900353
      Gerrit-PatchSet: 9
      Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Eric Seckler <esec...@chromium.org>
      Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
      Gerrit-CC: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Attention: David Bokan <bo...@chromium.org>
      Gerrit-Comment-Date: Thu, 04 Sep 2025 18:18:23 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Dave Tapuska <dtap...@chromium.org>
      satisfied_requirement
      open
      diffy

      Ryan Sturm (Gerrit)

      unread,
      Sep 4, 2025, 2:19:01 PM (5 days ago) Sep 4
      to Dave Tapuska, Eric Seckler, David Bokan, AyeAye, Chromium LUCI CQ, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org
      Attention needed from Dave Tapuska and David Bokan

      Ryan Sturm voted Commit-Queue+2

      Commit-Queue+2
      Gerrit-Comment-Date: Thu, 04 Sep 2025 18:18:48 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Sep 4, 2025, 3:47:59 PM (5 days ago) Sep 4
      to Ryan Sturm, Dave Tapuska, Eric Seckler, David Bokan, AyeAye, mfoltz...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org, spang...@chromium.org

      Chromium LUCI CQ submitted the change with unreviewed changes

      Unreviewed changes

      8 is the latest approved patch-set.
      The change was submitted with unreviewed changes in the following files:

      ```
      The name of the file: chrome/browser/actor/actor_keyed_service.cc
      Insertions: 5, Deletions: 7.

      @@ -250,13 +250,13 @@
      std::vector<std::unique_ptr<ToolRequest>>&& actions,
      PerformActionsCallback callback) {
      TRACE_EVENT0("actor", "ActorKeyedService::PerformActions");
      - const std::vector<optimization_guide::proto::ScriptToolResult> empty_results;
      + std::vector<ActionResultWithLatencyInfo> empty_results;
      auto* task = GetTask(task_id);
      if (!task) {
      VLOG(1) << "PerformActions failed: Task not found.";
      RunLater(base::BindOnce(std::move(callback),
      mojom::ActionResultCode::kTaskWentAway,
      - std::nullopt, empty_results));
      + std::nullopt, std::move(empty_results)));
      return;
      }

      @@ -264,7 +264,7 @@
      VLOG(1) << "PerformActions failed: No actions provided.";
      RunLater(base::BindOnce(std::move(callback),
      mojom::ActionResultCode::kEmptyActionSequence,
      - std::nullopt, empty_results));
      + std::nullopt, std::move(empty_results)));
      return;
      }

      @@ -278,14 +278,12 @@
      PerformActionsCallback callback,
      mojom::ActionResultPtr result,
      std::optional<size_t> index_of_failed_action,
      - std::vector<optimization_guide::proto::ScriptToolResult>
      - script_tool_results) {
      + std::vector<ActionResultWithLatencyInfo> action_results) {
      TRACE_EVENT0("actor", "ActorKeyedService::OnActionsFinished");
      // If the result if Ok then we must not have a failed action.
      CHECK(!IsOk(*result) || !index_of_failed_action);
      RunLater(base::BindOnce(std::move(callback), result->code,
      - index_of_failed_action,
      - std::move(script_tool_results)));
      + index_of_failed_action, std::move(action_results)));
      }

      void ActorKeyedService::StopTask(TaskId task_id, bool success) {
      ```

      Change information

      Commit message:
      Add tracing to the "actor" browser component

      This change introduces a new trace category "actor" and adds `TRACE_EVENT` calls to key methods within `ActorKeyedService`, `ExecutionEngine`, and `browser_action_util` to provide insights into the execution flow of actor-related operations.
      Bug: 442852243
      Change-Id: I25338a5a0982d4aeae5f657aff50c3282808742c
      Reviewed-by: David Bokan <bo...@chromium.org>
      Reviewed-by: Eric Seckler <esec...@chromium.org>
      Commit-Queue: Ryan Sturm <ryan...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1511081}
      Files:
      • M base/trace_event/builtin_categories.h
      • M chrome/browser/actor/actor_keyed_service.cc
      • M chrome/browser/actor/browser_action_util.cc
      • M chrome/browser/actor/execution_engine.cc
      Change size: S
      Delta: 4 files changed, 41 insertions(+), 0 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Eric Seckler, +1 by David Bokan
      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: I25338a5a0982d4aeae5f657aff50c3282808742c
      Gerrit-Change-Number: 6900353
      Gerrit-PatchSet: 10
      Gerrit-Owner: Ryan Sturm <ryan...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Eric Seckler <esec...@chromium.org>
      Gerrit-Reviewer: Ryan Sturm <ryan...@chromium.org>
      Gerrit-CC: Dave Tapuska <dtap...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages