Add experiment for background Perfetto init [chromium/src : main]

0 views
Skip to first unread message

Peter Birk Pakkenberg (Gerrit)

unread,
Jan 30, 2026, 7:22:17 AM (8 days ago) Jan 30
to Abhijith Nair, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org
Attention needed from Abhijith Nair

Peter Birk Pakkenberg added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Peter Birk Pakkenberg . resolved

Hi Abhijith, could you give this a first review before I send it to others?

Open in Gerrit

Related details

Attention is currently required from:
  • Abhijith Nair
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: Iaf8af4ddb6e182b81af56ad1880beb023f5fb72a
Gerrit-Change-Number: 7525531
Gerrit-PatchSet: 2
Gerrit-Owner: Peter Birk Pakkenberg <pb...@chromium.org>
Gerrit-Reviewer: Abhijith Nair <abhiji...@chromium.org>
Gerrit-Reviewer: Peter Birk Pakkenberg <pb...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Abhijith Nair <abhiji...@chromium.org>
Gerrit-Comment-Date: Fri, 30 Jan 2026 12:22:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Abhijith Nair (Gerrit)

unread,
Jan 30, 2026, 7:47:40 AM (8 days ago) Jan 30
to Peter Birk Pakkenberg, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org
Attention needed from Peter Birk Pakkenberg

Abhijith Nair added 2 comments

File android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
Line 615, Patchset 2 (Latest): TaskTraits.BEST_EFFORT,
Abhijith Nair . unresolved

This will end up blocking startup if it takes too long. Shouldn't this be higher priority?

File android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
Line 1087, Patchset 2 (Latest): + AwFeatures.WEBVIEW_EARLY_PERFETTO_INIT
Abhijith Nair . unresolved

Curious, does it make sense to consolidate all our perfetto flags into one flag and use feature params to select different behaviours? That way, I don't think we have to worry about a situation where multiple feature params are enabled at the same time?

Open in Gerrit

Related details

Attention is currently required from:
  • Peter Birk Pakkenberg
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: Iaf8af4ddb6e182b81af56ad1880beb023f5fb72a
    Gerrit-Change-Number: 7525531
    Gerrit-PatchSet: 2
    Gerrit-Owner: Peter Birk Pakkenberg <pb...@chromium.org>
    Gerrit-Reviewer: Abhijith Nair <abhiji...@chromium.org>
    Gerrit-Reviewer: Peter Birk Pakkenberg <pb...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Peter Birk Pakkenberg <pb...@chromium.org>
    Gerrit-Comment-Date: Fri, 30 Jan 2026 12:47:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Peter Birk Pakkenberg (Gerrit)

    unread,
    Jan 30, 2026, 9:23:34 AM (8 days ago) Jan 30
    to Abhijith Nair, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org
    Attention needed from Abhijith Nair

    Peter Birk Pakkenberg added 2 comments

    File android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
    Line 615, Patchset 2: TaskTraits.BEST_EFFORT,
    Abhijith Nair . resolved

    This will end up blocking startup if it takes too long. Shouldn't this be higher priority?

    Peter Birk Pakkenberg

    Good point. Adjusted to USER_VISIBLE

    File android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
    Line 1087, Patchset 2: + AwFeatures.WEBVIEW_EARLY_PERFETTO_INIT
    Abhijith Nair . resolved

    Curious, does it make sense to consolidate all our perfetto flags into one flag and use feature params to select different behaviours? That way, I don't think we have to worry about a situation where multiple feature params are enabled at the same time?

    Peter Birk Pakkenberg

    Possibly, but it would still only have one variant tested at a time, and the flags UI does not support params afaik, so this approach allows the flag UI to select each arm.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Abhijith Nair
    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: Iaf8af4ddb6e182b81af56ad1880beb023f5fb72a
      Gerrit-Change-Number: 7525531
      Gerrit-PatchSet: 4
      Gerrit-Owner: Peter Birk Pakkenberg <pb...@chromium.org>
      Gerrit-Reviewer: Abhijith Nair <abhiji...@chromium.org>
      Gerrit-Reviewer: Peter Birk Pakkenberg <pb...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Abhijith Nair <abhiji...@chromium.org>
      Gerrit-Comment-Date: Fri, 30 Jan 2026 14:23:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Abhijith Nair <abhiji...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Abhijith Nair (Gerrit)

      unread,
      Jan 30, 2026, 9:24:35 AM (8 days ago) Jan 30
      to Peter Birk Pakkenberg, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org
      Attention needed from Peter Birk Pakkenberg

      Abhijith Nair voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Peter Birk Pakkenberg
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: Iaf8af4ddb6e182b81af56ad1880beb023f5fb72a
        Gerrit-Change-Number: 7525531
        Gerrit-PatchSet: 4
        Gerrit-Owner: Peter Birk Pakkenberg <pb...@chromium.org>
        Gerrit-Reviewer: Abhijith Nair <abhiji...@chromium.org>
        Gerrit-Reviewer: Peter Birk Pakkenberg <pb...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Peter Birk Pakkenberg <pb...@chromium.org>
        Gerrit-Comment-Date: Fri, 30 Jan 2026 14:24:15 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Peter Birk Pakkenberg (Gerrit)

        unread,
        Jan 30, 2026, 9:30:43 AM (8 days ago) Jan 30
        to Richard (Torne) Coles, Abhijith Nair, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org
        Attention needed from Richard (Torne) Coles

        Peter Birk Pakkenberg added 1 comment

        Peter Birk Pakkenberg . resolved

        Hi Torne, would you mind taking a look at this? It is more complex than the previous CL that added an experiment for background startup because it makes sure that Perfetto is in fact initialized before it proceeds with main thread startup.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Richard (Torne) Coles
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: Iaf8af4ddb6e182b81af56ad1880beb023f5fb72a
        Gerrit-Change-Number: 7525531
        Gerrit-PatchSet: 4
        Gerrit-Owner: Peter Birk Pakkenberg <pb...@chromium.org>
        Gerrit-Reviewer: Abhijith Nair <abhiji...@chromium.org>
        Gerrit-Reviewer: Peter Birk Pakkenberg <pb...@chromium.org>
        Gerrit-Reviewer: Richard (Torne) Coles <to...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Richard (Torne) Coles <to...@chromium.org>
        Gerrit-Comment-Date: Fri, 30 Jan 2026 14:30:23 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Richard (Torne) Coles (Gerrit)

        unread,
        Jan 30, 2026, 4:03:00 PM (8 days ago) Jan 30
        to Peter Birk Pakkenberg, Richard (Torne) Coles, Abhijith Nair, Chromium LUCI CQ, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, tracing...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org
        Attention needed from Peter Birk Pakkenberg

        Richard (Torne) Coles added 1 comment

        File android_webview/browser/aw_browser_process.cc
        Line 402, Patchset 4 (Latest): if (g_initializing_perfetto_on_background_thread) {
        Richard (Torne) Coles . unresolved

        If the call to InitPerfetto has been posted to a background thread then I don't think anything guarantees that it will have reached the point of setting this variable to true before this function is called?

        I think you would need to always signal the event and always wait on it, and only read `g_initializing_perfetto_on_background_thread` *after* successfully waiting for it if you want to know whether it was done on the background thread or not for the purposes of the metric.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Peter Birk Pakkenberg
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: Iaf8af4ddb6e182b81af56ad1880beb023f5fb72a
          Gerrit-Change-Number: 7525531
          Gerrit-PatchSet: 4
          Gerrit-Owner: Peter Birk Pakkenberg <pb...@chromium.org>
          Gerrit-Reviewer: Abhijith Nair <abhiji...@chromium.org>
          Gerrit-Reviewer: Peter Birk Pakkenberg <pb...@chromium.org>
          Gerrit-Reviewer: Richard (Torne) Coles <to...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Peter Birk Pakkenberg <pb...@chromium.org>
          Gerrit-Comment-Date: Fri, 30 Jan 2026 21:02:50 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages