[iOS tracing] Add chrome://tracing WebUI to capture performance traces [chromium/src : main]

0 views
Skip to first unread message

Justin Cohen (Gerrit)

unread,
Apr 23, 2026, 11:11:33 PM (3 days ago) Apr 23
to Rohit Rao, Daniel White, Justin Novosad, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, wfh+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Justin Novosad

Justin Cohen voted and added 1 comment

Votes added by Justin Cohen

Auto-Submit+1
Commit-Queue+2

1 comment

File ios/chrome/browser/webui/ui_bundled/tracing/tracing_ui.mm
Line 44, Patchset 18: return cache_dir.Append("manual_trace.perfetto-trace");
Rohit Rao . resolved

Ok if we overwrite the previous trace?

Justin Cohen

I think so? We can always iterate here.

Open in Gerrit

Related details

Attention is currently required from:
  • Justin Novosad
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: I72ae795a2293834e3bdae151ddd3adfc19504731
Gerrit-Change-Number: 7751575
Gerrit-PatchSet: 21
Gerrit-Owner: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Daniel White <daniel...@google.com>
Gerrit-Reviewer: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Rohit Rao <rohi...@chromium.org>
Gerrit-CC: Justin Novosad <ju...@chromium.org>
Gerrit-Attention: Justin Novosad <ju...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Apr 2026 03:11:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Rohit Rao <rohi...@chromium.org>
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Apr 24, 2026, 12:25:49 AM (3 days ago) Apr 24
to Justin Cohen, Rohit Rao, Daniel White, Justin Novosad, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, wfh+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org

Chromium LUCI CQ submitted the change with unreviewed changes

Unreviewed changes

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

```
The name of the file: ios/chrome/browser/webui/ui_bundled/tracing/tracing_ui.h
Insertions: 0, Deletions: 1.

@@ -32,7 +32,6 @@
void OnTracingStarted();
void OnTracingStopped();

- private:
std::unique_ptr<perfetto::TracingSession> tracing_session_;
base::WeakPtrFactory<TracingMessageHandler> weak_ptr_factory_{this};
};
```
```
The name of the file: ios/chrome/browser/webui/ui_bundled/tracing/tracing_ui.mm
Insertions: 1, Deletions: 1.

@@ -119,7 +119,7 @@
// Note: this should be triggered from the active view controller, but since
// we are in WebUI, we can find the key window's rootViewController.
NSURL* file_url =
- [NSURL fileURLWithPath:base::SysUTF8ToNSString(trace_file.value())];
+ [NSURL fileURLWithPath:base::apple::FilePathToNSString(trace_file)];
UIActivityViewController* activity_vc =
[[UIActivityViewController alloc] initWithActivityItems:@[ file_url ]
applicationActivities:nil];
```
```
The name of the file: ios/chrome/browser/webui/ui_bundled/BUILD.gn
Insertions: 0, Deletions: 1.

@@ -168,7 +168,6 @@
"//ios/chrome/browser/signin/model",
"//ios/chrome/browser/sync/model",
"//ios/chrome/browser/sync/model:sync_invalidations_service_factory",
- "//ios/chrome/browser/tracing",
"//ios/chrome/browser/webui/ui_bundled/connectors_internals",
"//ios/chrome/browser/webui/ui_bundled/data_sharing_internals",
"//ios/chrome/browser/webui/ui_bundled/gcm",
```

Change information

Commit message:
[iOS tracing] Add chrome://tracing WebUI to capture performance traces

Adds a developer-facing WebUI (chrome://tracing) that interfaces with
the Perfetto tracing controller. It provides a simple start/stop
interface for on-device trace recording and uses the native iOS share
sheet to export the trace file once recording is complete.
Bug: 495937056
Change-Id: I72ae795a2293834e3bdae151ddd3adfc19504731
Reviewed-by: Daniel White <daniel...@google.com>
Auto-Submit: Justin Cohen <justi...@google.com>
Reviewed-by: Rohit Rao <rohi...@chromium.org>
Commit-Queue: Justin Cohen <justi...@google.com>
Cr-Commit-Position: refs/heads/main@{#1619954}
Files:
  • M ios/chrome/app/resources/ios_resources.grd
  • M ios/chrome/browser/shared/model/url/chrome_url_constants.h
  • M ios/chrome/browser/webui/ui_bundled/BUILD.gn
  • M ios/chrome/browser/webui/ui_bundled/DEPS
  • M ios/chrome/browser/webui/ui_bundled/chrome_web_ui_ios_controller_factory.mm
  • A ios/chrome/browser/webui/ui_bundled/tracing/DEPS
  • A ios/chrome/browser/webui/ui_bundled/tracing/resources/tracing.html
  • A ios/chrome/browser/webui/ui_bundled/tracing/tracing_ui.h
  • A ios/chrome/browser/webui/ui_bundled/tracing/tracing_ui.mm
  • A ios/chrome/browser/webui/ui_bundled/tracing/tracing_ui_egtest.mm
Change size: L
Delta: 10 files changed, 388 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Rohit Rao, +1 by Daniel White
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: I72ae795a2293834e3bdae151ddd3adfc19504731
Gerrit-Change-Number: 7751575
Gerrit-PatchSet: 22
Gerrit-Owner: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Daniel White <daniel...@google.com>
Gerrit-Reviewer: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Rohit Rao <rohi...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages