ios: Enable native Perfetto data sources for developer profiling [chromium/src : main]

0 views
Skip to first unread message

Justin Cohen (Gerrit)

unread,
Mar 25, 2026, 11:43:42 PM (8 days ago) Mar 25
to Justin Novosad, Etienne Pierre-Doray, Chromium LUCI CQ, chromium...@chromium.org, ios-revie...@chromium.org, ios-rev...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Etienne Pierre-Doray and Justin Novosad

Justin Cohen added 1 comment

Patchset-level comments
File-level comment, Patchset 19 (Latest):
Justin Cohen . resolved

For discussion -- a first draft that's maybe landable? WDYT?

Open in Gerrit

Related details

Attention is currently required from:
  • Etienne Pierre-Doray
  • Justin Novosad
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: I3f4d20fee4e8a80692445e907e4cfdde401de591
Gerrit-Change-Number: 7700720
Gerrit-PatchSet: 19
Gerrit-Owner: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Justin Novosad <ju...@google.com>
Gerrit-Attention: Justin Novosad <ju...@google.com>
Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Mar 2026 03:43:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Etienne Pierre-Doray (Gerrit)

unread,
Mar 26, 2026, 1:22:41 PM (7 days ago) Mar 26
to Justin Cohen, Justin Novosad, Chromium LUCI CQ, chromium...@chromium.org, ios-revie...@chromium.org, ios-rev...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Justin Cohen and Justin Novosad

Etienne Pierre-Doray added 4 comments

Patchset-level comments
Etienne Pierre-Doray . resolved

Publishing my initial comments

File ios/chrome/browser/tracing/ios_background_tracing_manager.h
Line 20, Patchset 19 (Latest):class IOSBackgroundTracingManager {
Etienne Pierre-Doray . unresolved

Looking at what this does, it fills a role closer to StartupTracingController than BackgroundTracingManager (counterpart in content) + some initialization logic.
In fact, I'm wondering how much of StartupTracingController we could simply more to services and reuse here, which would support the same set of command line arguments.

File ios/chrome/browser/tracing/ios_background_tracing_manager.mm
Line 38, Patchset 19 (Latest):void IOSBackgroundTracingManager::Initialize() {
Etienne Pierre-Doray . unresolved

Even though you might not need all of PerfettoTracedProcess, I think we can improve code sharing (by extracting and reusing parts of it)

  • I think we want to use base::tracing::PerfettoPlatform on iOS
  • We should reuse the same code for DataSource registrations
File services/tracing/public/cpp/perfetto/histogram_samples_data_source.cc
Line 84, Patchset 19 (Latest): desc.set_name(tracing::mojom::kHistogramSampleSourceName);
Etienne Pierre-Doray . unresolved

There's no reason for these to be in mojo anymore, I think we should just move the declarations in a plain header in services/tracing/public/cpp/perfetto/
And then this can unconditionally refer to it.

Open in Gerrit

Related details

Attention is currently required from:
  • Justin Cohen
  • Justin Novosad
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I3f4d20fee4e8a80692445e907e4cfdde401de591
    Gerrit-Change-Number: 7700720
    Gerrit-PatchSet: 19
    Gerrit-Owner: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Justin Novosad <ju...@google.com>
    Gerrit-Attention: Justin Cohen <justi...@google.com>
    Gerrit-Attention: Justin Novosad <ju...@google.com>
    Gerrit-Comment-Date: Thu, 26 Mar 2026 17:22:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Justin Novosad (Gerrit)

    unread,
    Mar 26, 2026, 2:37:44 PM (7 days ago) Mar 26
    to Justin Cohen, Etienne Pierre-Doray, Chromium LUCI CQ, chromium...@chromium.org, ios-revie...@chromium.org, ios-rev...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Justin Cohen

    Justin Novosad added 8 comments

    File ios/chrome/browser/webui/ui_bundled/tracing/resources/tracing.html
    Line 104, Patchset 19 (Latest): startButton.disabled = false;
    Justin Novosad . unresolved

    The start button should only be re-enbaled once trace processing is complete. I.e. at the same time that the statusText becomes "Ready".

    Line 105, Patchset 19 (Latest): stopButton.disabled = true;
    Justin Novosad . unresolved

    Disabling the stop button should probably be done earlier, in the stopButton's event listener. Reduces the potential for a race condition.

    Line 112, Patchset 19 (Latest): }, 2000);
    Justin Novosad . unresolved

    This 2 second delay is wrong. There should be another callback that triggers this transition upon completion of the trace processing.

    File ios/chrome/browser/webui/ui_bundled/tracing/tracing_ui_egtest.mm
    Line 27, Patchset 19 (Latest): [ChromeEarlGrey waitForWebStateContainingText:"Stop and Share"];
    Justin Novosad . unresolved

    Isn't this condition tautological? I mean the button with this label remains visible regardless of whether or not the button is disabled. This test should instead observe UI state transitions by monitoring the statusText element. In this case, I think it should be waiting for the text to change to "Recording...".

    Line 32, Patchset 19 (Latest): [ChromeEarlGrey waitForWebStateContainingText:"Start Recording"];
    Justin Novosad . unresolved

    Same issue here. The test should be waiting for the statusText to change back to "Ready" IMHO.

    File services/tracing/public/cpp/perfetto/metadata_data_source.cc
    Line 18, Patchset 19 (Latest):#include "components/variations/active_field_trials.h" // nogncheck
    Justin Novosad . unresolved

    Why "nogncheck" here? Either fix the gn file or provide an explanation for why an exception is absolutely required.

    File services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc
    Line 35, Patchset 19 (Latest):#include "services/tracing/public/mojom/perfetto_service.mojom.h" // nogncheck
    Justin Novosad . unresolved

    nogncheck?

    File services/tracing/public/cpp/system_metrics_sampler.cc
    Line 18, Patchset 19 (Latest):#include "services/tracing/public/mojom/perfetto_service.mojom.h" // nogncheck
    Justin Novosad . unresolved

    same here.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Cohen
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I3f4d20fee4e8a80692445e907e4cfdde401de591
    Gerrit-Change-Number: 7700720
    Gerrit-PatchSet: 19
    Gerrit-Owner: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Justin Novosad <ju...@google.com>
    Gerrit-Attention: Justin Cohen <justi...@google.com>
    Gerrit-Comment-Date: Thu, 26 Mar 2026 18:37:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages