Android: Implement automatic trace pulling for gtests [chromium/src : main]

0 views
Skip to first unread message

Kartar Singh (Gerrit)

unread,
May 26, 2026, 6:30:31 AMMay 26
to Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Mikhail Khokhlov

Kartar Singh added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Kartar Singh . resolved

Hi @khok...@google.com,
Can you please take a look at the change mainly at the part changing default save path from `chrometrace.log` to `chrome.pftrace`. Does it look safe to you, or do we need to do more things before we can change this default save path.

Open in Gerrit

Related details

Attention is currently required from:
  • Mikhail Khokhlov
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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
Gerrit-Change-Number: 7865914
Gerrit-PatchSet: 1
Gerrit-Owner: Kartar Singh <karta...@google.com>
Gerrit-Reviewer: Kartar Singh <karta...@google.com>
Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
Gerrit-Attention: Mikhail Khokhlov <khok...@google.com>
Gerrit-Comment-Date: Tue, 26 May 2026 10:30:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mikhail Khokhlov (Gerrit)

unread,
May 26, 2026, 6:51:53 AMMay 26
to Kartar Singh, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Kartar Singh

Mikhail Khokhlov voted and added 2 comments

Votes added by Mikhail Khokhlov

Code-Review+1

2 comments

Patchset-level comments
Kartar Singh . resolved

Hi @khok...@google.com,
Can you please take a look at the change mainly at the part changing default save path from `chrometrace.log` to `chrome.pftrace`. Does it look safe to you, or do we need to do more things before we can change this default save path.

Mikhail Khokhlov

You never know who depends on things like that before you change them 😊

In general, it should be safe though, since tracing is a developer tool. Even if some tool assumes a specific path, it's always possible to provide a `--trace-startup-file` explicitly.

File services/tracing/public/cpp/startup_tracing_controller.cc
Line 427, Patchset 1 (Latest): return BasenameToPath("chrome.pftrace");
Mikhail Khokhlov . unresolved
Open in Gerrit

Related details

Attention is currently required from:
  • Kartar Singh
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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
    Gerrit-Change-Number: 7865914
    Gerrit-PatchSet: 1
    Gerrit-Owner: Kartar Singh <karta...@google.com>
    Gerrit-Reviewer: Kartar Singh <karta...@google.com>
    Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
    Gerrit-Attention: Kartar Singh <karta...@google.com>
    Gerrit-Comment-Date: Tue, 26 May 2026 10:51:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Kartar Singh <karta...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kartar Singh (Gerrit)

    unread,
    May 26, 2026, 6:58:47 AMMay 26
    to Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Mikhail Khokhlov

    Kartar Singh added 2 comments

    Patchset-level comments
    Kartar Singh . resolved

    Hi @khok...@google.com,
    Can you please take a look at the change mainly at the part changing default save path from `chrometrace.log` to `chrome.pftrace`. Does it look safe to you, or do we need to do more things before we can change this default save path.

    Mikhail Khokhlov

    You never know who depends on things like that before you change them 😊

    In general, it should be safe though, since tracing is a developer tool. Even if some tool assumes a specific path, it's always possible to provide a `--trace-startup-file` explicitly.

    Kartar Singh

    Thanks Mikhail, makes sense.

    File services/tracing/public/cpp/startup_tracing_controller.cc
    Line 427, Patchset 1: return BasenameToPath("chrome.pftrace");
    Mikhail Khokhlov . resolved
    Kartar Singh

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mikhail Khokhlov
    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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
      Gerrit-Change-Number: 7865914
      Gerrit-PatchSet: 2
      Gerrit-Owner: Kartar Singh <karta...@google.com>
      Gerrit-Reviewer: Kartar Singh <karta...@google.com>
      Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
      Gerrit-Attention: Mikhail Khokhlov <khok...@google.com>
      Gerrit-Comment-Date: Tue, 26 May 2026 10:58:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Mikhail Khokhlov <khok...@google.com>
      Comment-In-Reply-To: Kartar Singh <karta...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Kartar Singh (Gerrit)

      unread,
      May 26, 2026, 7:04:24 AMMay 26
      to Haiyang Pan, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
      Attention needed from Haiyang Pan and Mikhail Khokhlov

      Kartar Singh added 1 comment

      Patchset-level comments
      File-level comment, Patchset 2 (Latest):
      Kartar Singh . unresolved

      Hi @hy...@google.com,

      Can you please take a look at the change. We are now pulling the traces from device for local test run into `TEST_*` directory in out.

      Though there is an issue when `--skip-clear-data` is passed, which will retain the traces across multiple runs. What do you suggest should we try to solve this here, or is it fine to submit it as is? If we want to solve this we can probably keep a list of traces before the test run and just pull the new traces after the test run.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Haiyang Pan
      • Mikhail Khokhlov
      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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
        Gerrit-Change-Number: 7865914
        Gerrit-PatchSet: 2
        Gerrit-Owner: Kartar Singh <karta...@google.com>
        Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
        Gerrit-Reviewer: Kartar Singh <karta...@google.com>
        Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
        Gerrit-Attention: Mikhail Khokhlov <khok...@google.com>
        Gerrit-Attention: Haiyang Pan <hy...@google.com>
        Gerrit-Comment-Date: Tue, 26 May 2026 11:04:10 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Kartar Singh (Gerrit)

        unread,
        May 26, 2026, 7:05:28 AMMay 26
        to Haiyang Pan, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Haiyang Pan and Mikhail Khokhlov

        Kartar Singh added 1 comment

        File build/android/pylib/local/device/local_device_gtest_run.py
        Line 832, Patchset 2 (Latest): f, 'traces', datatype=output_manager.Datatype.TEXT) as host_file:
        Kartar Singh . unresolved

        Traces are binary files, should we create a new `Datatype` here? Or is it fine to use TEXT here? @hy...@google.com

        Gerrit-Comment-Date: Tue, 26 May 2026 11:05:11 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Mikhail Khokhlov (Gerrit)

        unread,
        May 26, 2026, 7:35:09 AMMay 26
        to Kartar Singh, Haiyang Pan, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Haiyang Pan and Kartar Singh

        Mikhail Khokhlov voted and added 1 comment

        Votes added by Mikhail Khokhlov

        Code-Review+1

        1 comment

        Patchset-level comments
        Mikhail Khokhlov . resolved

        Still LGTM

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Haiyang Pan
        • Kartar Singh
        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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
          Gerrit-Change-Number: 7865914
          Gerrit-PatchSet: 2
          Gerrit-Owner: Kartar Singh <karta...@google.com>
          Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
          Gerrit-Reviewer: Kartar Singh <karta...@google.com>
          Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
          Gerrit-Attention: Kartar Singh <karta...@google.com>
          Gerrit-Attention: Haiyang Pan <hy...@google.com>
          Gerrit-Comment-Date: Tue, 26 May 2026 11:34:54 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Haiyang Pan (Gerrit)

          unread,
          May 26, 2026, 1:50:20 PMMay 26
          to Kartar Singh, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
          Attention needed from Kartar Singh

          Haiyang Pan added 1 comment

          File build/android/pylib/local/device/local_device_gtest_run.py
          Line 832, Patchset 2 (Latest): f, 'traces', datatype=output_manager.Datatype.TEXT) as host_file:
          Kartar Singh . unresolved

          Traces are binary files, should we create a new `Datatype` here? Or is it fine to use TEXT here? @hy...@google.com

          Haiyang Pan

          Given traces are binary files, we should not use TEXT here.

          The `output_manager` can upload the file to a remote storage service (logdog or gcs), or store locally, depending on if the test runner is called locally or on swarming.

          Do you only want to pull the trace file only to your local environment or also upload it?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Kartar Singh
          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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
          Gerrit-Change-Number: 7865914
          Gerrit-PatchSet: 2
          Gerrit-Owner: Kartar Singh <karta...@google.com>
          Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
          Gerrit-Reviewer: Kartar Singh <karta...@google.com>
          Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
          Gerrit-Attention: Kartar Singh <karta...@google.com>
          Gerrit-Comment-Date: Tue, 26 May 2026 17:50:08 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Kartar Singh <karta...@google.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Kartar Singh (Gerrit)

          unread,
          May 26, 2026, 2:07:15 PMMay 26
          to Mikhail Khokhlov, Haiyang Pan, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
          Attention needed from Haiyang Pan

          Kartar Singh added 1 comment

          File build/android/pylib/local/device/local_device_gtest_run.py
          Line 832, Patchset 2 (Latest): f, 'traces', datatype=output_manager.Datatype.TEXT) as host_file:
          Kartar Singh . unresolved

          Traces are binary files, should we create a new `Datatype` here? Or is it fine to use TEXT here? @hy...@google.com

          Haiyang Pan

          Given traces are binary files, we should not use TEXT here.

          The `output_manager` can upload the file to a remote storage service (logdog or gcs), or store locally, depending on if the test runner is called locally or on swarming.

          Do you only want to pull the trace file only to your local environment or also upload it?

          Kartar Singh

          Do you only want to pull the trace file only to your local environment or also upload it?

          The current use case I am looking to solve is only for local development i.e. pull trace into local environment no uploads.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Haiyang Pan
          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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
          Gerrit-Change-Number: 7865914
          Gerrit-PatchSet: 2
          Gerrit-Owner: Kartar Singh <karta...@google.com>
          Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
          Gerrit-Reviewer: Kartar Singh <karta...@google.com>
          Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
          Gerrit-Attention: Haiyang Pan <hy...@google.com>
          Gerrit-Comment-Date: Tue, 26 May 2026 18:06:55 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Haiyang Pan <hy...@google.com>
          Comment-In-Reply-To: Kartar Singh <karta...@google.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Kartar Singh (Gerrit)

          unread,
          May 26, 2026, 5:13:25 PMMay 26
          to Mikhail Khokhlov, Haiyang Pan, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
          Attention needed from Haiyang Pan and Mikhail Khokhlov

          Kartar Singh added 1 comment

          File build/android/pylib/local/device/local_device_gtest_run.py
          Line 832, Patchset 2: f, 'traces', datatype=output_manager.Datatype.TEXT) as host_file:
          Kartar Singh . unresolved

          Traces are binary files, should we create a new `Datatype` here? Or is it fine to use TEXT here? @hy...@google.com

          Haiyang Pan

          Given traces are binary files, we should not use TEXT here.

          The `output_manager` can upload the file to a remote storage service (logdog or gcs), or store locally, depending on if the test runner is called locally or on swarming.

          Do you only want to pull the trace file only to your local environment or also upload it?

          Kartar Singh

          Do you only want to pull the trace file only to your local environment or also upload it?

          The current use case I am looking to solve is only for local development i.e. pull trace into local environment no uploads.

          Kartar Singh

          Updated to used newly added Datatype.BINARY. Could you please take a look.

          The pulled trace has this mime type:
          ```
          $ file --mime-type test.pftrace
          test.pftrace: application/octet-stream
          ```

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Haiyang Pan
          • Mikhail Khokhlov
          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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
            Gerrit-Change-Number: 7865914
            Gerrit-PatchSet: 3
            Gerrit-Owner: Kartar Singh <karta...@google.com>
            Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
            Gerrit-Reviewer: Kartar Singh <karta...@google.com>
            Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Haiyang Pan <hy...@google.com>
            Gerrit-Comment-Date: Tue, 26 May 2026 21:13:06 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Kartar Singh <karta...@google.com>
            Comment-In-Reply-To: Haiyang Pan <hy...@google.com>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Haiyang Pan (Gerrit)

            unread,
            May 26, 2026, 6:10:44 PMMay 26
            to Kartar Singh, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
            Attention needed from Kartar Singh and Mikhail Khokhlov

            Haiyang Pan added 3 comments

            Commit Message
            Line 7, Patchset 3 (Latest):Android: Implement automatic trace pulling for gtests
            Haiyang Pan . unresolved

            Can you create a bug if you haven't done so? And put the bug number in the commit message, as well as in the `local_device_gtest_run.py` (See my comment here.)

            File build/android/pylib/local/device/local_device_gtest_run.py
            Line 832, Patchset 2: f, 'traces', datatype=output_manager.Datatype.TEXT) as host_file:
            Kartar Singh . resolved

            Traces are binary files, should we create a new `Datatype` here? Or is it fine to use TEXT here? @hy...@google.com

            Haiyang Pan

            Given traces are binary files, we should not use TEXT here.

            The `output_manager` can upload the file to a remote storage service (logdog or gcs), or store locally, depending on if the test runner is called locally or on swarming.

            Do you only want to pull the trace file only to your local environment or also upload it?

            Kartar Singh

            Do you only want to pull the trace file only to your local environment or also upload it?

            The current use case I am looking to solve is only for local development i.e. pull trace into local environment no uploads.

            Kartar Singh

            Updated to used newly added Datatype.BINARY. Could you please take a look.

            The pulled trace has this mime type:
            ```
            $ file --mime-type test.pftrace
            test.pftrace: application/octet-stream
            ```

            Haiyang Pan

            Done

            Line 1012, Patchset 3 (Latest): self._PullSavedTraces(device)
            Haiyang Pan . unresolved

            Can you add something like this, to ensure it is pulling only for local run?

            Also please add the bug link here so that users can read more if interested

            ```
            # Pull trace files for local run only. See crbug.com/XXX for details.
            if isinstance(self._env.output_manager, local_output_manager.LocalOutputManager):
            self._PullSavedTraces(device)
            ```
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Kartar Singh
            • Mikhail Khokhlov
            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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
            Gerrit-Change-Number: 7865914
            Gerrit-PatchSet: 3
            Gerrit-Owner: Kartar Singh <karta...@google.com>
            Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
            Gerrit-Reviewer: Kartar Singh <karta...@google.com>
            Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Kartar Singh <karta...@google.com>
            Gerrit-Comment-Date: Tue, 26 May 2026 22:10:35 +0000
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Kartar Singh (Gerrit)

            unread,
            May 27, 2026, 6:43:57 AMMay 27
            to Mikhail Khokhlov, Haiyang Pan, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
            Attention needed from Haiyang Pan and Mikhail Khokhlov

            Kartar Singh added 2 comments

            Commit Message
            Line 7, Patchset 3:Android: Implement automatic trace pulling for gtests
            Haiyang Pan . resolved

            Can you create a bug if you haven't done so? And put the bug number in the commit message, as well as in the `local_device_gtest_run.py` (See my comment here.)

            Kartar Singh

            Done

            File build/android/pylib/local/device/local_device_gtest_run.py
            Line 1012, Patchset 3: self._PullSavedTraces(device)
            Haiyang Pan . resolved

            Can you add something like this, to ensure it is pulling only for local run?

            Also please add the bug link here so that users can read more if interested

            ```
            # Pull trace files for local run only. See crbug.com/XXX for details.
            if isinstance(self._env.output_manager, local_output_manager.LocalOutputManager):
            self._PullSavedTraces(device)
            ```
            Kartar Singh

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Haiyang Pan
            • Mikhail Khokhlov
            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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
            Gerrit-Change-Number: 7865914
            Gerrit-PatchSet: 5
            Gerrit-Owner: Kartar Singh <karta...@google.com>
            Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
            Gerrit-Reviewer: Kartar Singh <karta...@google.com>
            Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Haiyang Pan <hy...@google.com>
            Gerrit-Comment-Date: Wed, 27 May 2026 10:43:36 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Haiyang Pan <hy...@google.com>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Mikhail Khokhlov (Gerrit)

            unread,
            May 27, 2026, 12:56:16 PMMay 27
            to Kartar Singh, Haiyang Pan, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
            Attention needed from Haiyang Pan and Kartar Singh

            Mikhail Khokhlov voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Haiyang Pan
            • Kartar Singh
            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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
              Gerrit-Change-Number: 7865914
              Gerrit-PatchSet: 5
              Gerrit-Owner: Kartar Singh <karta...@google.com>
              Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
              Gerrit-Reviewer: Kartar Singh <karta...@google.com>
              Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
              Gerrit-Attention: Kartar Singh <karta...@google.com>
              Gerrit-Attention: Haiyang Pan <hy...@google.com>
              Gerrit-Comment-Date: Wed, 27 May 2026 16:55:55 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Haiyang Pan (Gerrit)

              unread,
              May 27, 2026, 1:47:35 PMMay 27
              to Kartar Singh, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

              Haiyang Pan voted and added 2 comments

              Votes added by Haiyang Pan

              Code-Review+1

              2 comments

              Patchset-level comments
              Kartar Singh . unresolved

              Hi @hy...@google.com,

              Can you please take a look at the change. We are now pulling the traces from device for local test run into `TEST_*` directory in out.

              Though there is an issue when `--skip-clear-data` is passed, which will retain the traces across multiple runs. What do you suggest should we try to solve this here, or is it fine to submit it as is? If we want to solve this we can probably keep a list of traces before the test run and just pull the new traces after the test run.

              Haiyang Pan

              If the pftrace files are not big, I think it is probably fine to pull them everytime?

              File-level comment, Patchset 5 (Latest):
              Haiyang Pan . resolved

              LGTM. Thanks for the CL!

              Open in Gerrit

              Related details

              Attention set is empty
              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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
              Gerrit-Change-Number: 7865914
              Gerrit-PatchSet: 5
              Gerrit-Owner: Kartar Singh <karta...@google.com>
              Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
              Gerrit-Reviewer: Kartar Singh <karta...@google.com>
              Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
              Gerrit-Comment-Date: Wed, 27 May 2026 17:47:18 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              Comment-In-Reply-To: Kartar Singh <karta...@google.com>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Kartar Singh (Gerrit)

              unread,
              May 27, 2026, 3:53:32 PMMay 27
              to Haiyang Pan, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

              Kartar Singh added 1 comment

              Patchset-level comments
              File-level comment, Patchset 2:
              Kartar Singh . resolved

              Hi @hy...@google.com,

              Can you please take a look at the change. We are now pulling the traces from device for local test run into `TEST_*` directory in out.

              Though there is an issue when `--skip-clear-data` is passed, which will retain the traces across multiple runs. What do you suggest should we try to solve this here, or is it fine to submit it as is? If we want to solve this we can probably keep a list of traces before the test run and just pull the new traces after the test run.

              Haiyang Pan

              If the pftrace files are not big, I think it is probably fine to pull them everytime?

              Kartar Singh

              They are <1mb each so not terribly big. We can wait for developers to actually start using the feature before we expand implementation.

              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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
                Gerrit-Change-Number: 7865914
                Gerrit-PatchSet: 5
                Gerrit-Owner: Kartar Singh <karta...@google.com>
                Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
                Gerrit-Reviewer: Kartar Singh <karta...@google.com>
                Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
                Gerrit-Comment-Date: Wed, 27 May 2026 19:53:11 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Haiyang Pan <hy...@google.com>
                Comment-In-Reply-To: Kartar Singh <karta...@google.com>
                satisfied_requirement
                open
                diffy

                Kartar Singh (Gerrit)

                unread,
                May 27, 2026, 4:03:29 PMMay 27
                to Haiyang Pan, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

                Kartar Singh 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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
                Gerrit-Change-Number: 7865914
                Gerrit-PatchSet: 5
                Gerrit-Owner: Kartar Singh <karta...@google.com>
                Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
                Gerrit-Reviewer: Kartar Singh <karta...@google.com>
                Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
                Gerrit-Comment-Date: Wed, 27 May 2026 20:03:09 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Chromium LUCI CQ (Gerrit)

                unread,
                May 27, 2026, 4:07:21 PMMay 27
                to Kartar Singh, Haiyang Pan, Mikhail Khokhlov, chromium...@chromium.org, agriev...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

                Chromium LUCI CQ submitted the change

                Change information

                Commit message:
                Android: Implement automatic trace pulling for gtests

                This CL implements host-side automatic pulling of generated Perfetto
                traces (*.pftrace) from Android devices to the host's
                TEST_RESULTS_*/traces/ folder.

                The change also rename default startup trace basename from
                "chrometrace.log" to "chrome.pftrace" to match the host-side pull filter
                for "*.pftrace" files.
                Bug: 517048010
                Change-Id: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
                Reviewed-by: Haiyang Pan <hy...@google.com>
                Commit-Queue: Kartar Singh <karta...@google.com>
                Reviewed-by: Mikhail Khokhlov <khok...@google.com>
                Cr-Commit-Position: refs/heads/main@{#1637178}
                Files:
                • M build/android/pylib/base/output_manager.py
                • M build/android/pylib/local/device/local_device_gtest_run.py
                • M components/tracing/common/tracing_switches.cc
                • M services/tracing/public/cpp/startup_tracing_controller.cc
                • M services/tracing/public/cpp/trace_startup_config.cc
                • M services/tracing/public/cpp/trace_startup_config.h
                Change size: M
                Delta: 6 files changed, 48 insertions(+), 10 deletions(-)
                Branch: refs/heads/main
                Submit Requirements:
                • requirement satisfiedCode-Review: +1 by Mikhail Khokhlov, +1 by Haiyang Pan
                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: Ie6744be29fd47c22b6874cfd9c6e67b0b184b128
                Gerrit-Change-Number: 7865914
                Gerrit-PatchSet: 6
                Gerrit-Owner: Kartar Singh <karta...@google.com>
                Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                Gerrit-Reviewer: Haiyang Pan <hy...@google.com>
                Gerrit-Reviewer: Kartar Singh <karta...@google.com>
                Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
                open
                diffy
                satisfied_requirement
                Reply all
                Reply to author
                Forward
                0 new messages