[tracing] Fold CPUFreqMonitor into SystemMetricsSampler [chromium/src : main]

0 views
Skip to first unread message

Etienne Pierre-Doray (Gerrit)

unread,
Dec 9, 2025, 1:23:44 PM (11 days ago) Dec 9
to Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Joe Mason

Etienne Pierre-Doray voted and added 1 comment

Votes added by Etienne Pierre-Doray

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 15 (Latest):
Etienne Pierre-Doray . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Joe Mason
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: I4fe068f43dcadf2a674714f6939fbbb68edb89eb
Gerrit-Change-Number: 7239491
Gerrit-PatchSet: 15
Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Joe Mason <joenot...@google.com>
Gerrit-Attention: Joe Mason <joenot...@google.com>
Gerrit-Comment-Date: Tue, 09 Dec 2025 18:23:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Joe Mason (Gerrit)

unread,
Dec 9, 2025, 2:49:22 PM (11 days ago) Dec 9
to Etienne Pierre-Doray, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Etienne Pierre-Doray

Joe Mason voted and added 41 comments

Votes added by Joe Mason

Code-Review+1

41 comments

Patchset-level comments
Joe Mason . unresolved

Nit: please fix the clang-tidy warnings.

Lots of nits, but nothing blocking.

File components/system_cpu/cpu_freq_android.h
Line 54, Patchset 15 (Latest): std::vector<std::pair<unsigned int, base::ScopedFD>> file_descriptors_;
Joe Mason . unresolved

Nit: please #include <utility> for IWYU.

Line 37, Patchset 15 (Latest): virtual std::string GetScalingCurFreqPathString(unsigned int cpu_id) const;
Joe Mason . unresolved

Nit: please #include <string> for IWYU.

Line 34, Patchset 15 (Latest): virtual unsigned int GetKernelMaxCPUs() const;
Joe Mason . unresolved

Nit: call this `GetKernelMaxCPUId()` so that it's clear that it's returning an ID, not a count. (Otherwise I'd expect it to return 8 on an 8-core CPU.)

Line 30, Patchset 15 (Latest): virtual std::vector<unsigned int> GetCPUIds() const;
Joe Mason . unresolved

Optional: should wrap this in `base::IdType` so that it can't be confused with a different id. Can skip this if it would be a lot of work to convert back and forth. (Or switch to IdType in a followup.)

Line 13, Patchset 15 (Latest):#include "base/memory/scoped_refptr.h"
Joe Mason . unresolved

Nit: unused.

Line 11, Patchset 15 (Latest):#include "base/base_export.h"
Joe Mason . unresolved

Nit: not used. (And should be COMPONENT_EXPORT in components/ if it's needed. But I don't think it is.)

File components/system_cpu/cpu_freq_android.cc
Line 9, Patchset 15 (Latest):#include "base/compiler_specific.h"
Joe Mason . unresolved

Nit: unused?

Line 12, Patchset 15 (Latest):#include "base/functional/bind.h"
Joe Mason . unresolved

Nit: unused

Line 13, Patchset 15 (Latest):#include "base/memory/scoped_refptr.h"
Joe Mason . unresolved

Nit: unused

Line 14, Patchset 15 (Latest):#include "base/no_destructor.h"
Joe Mason . unresolved

Nit: unused

Line 24, Patchset 15 (Latest): std::string str;
Joe Mason . unresolved

Nit: please #include <string> for IWYU.

Line 26, Patchset 15 (Latest): base::FilePath("/sys/devices/system/cpu/kernel_max"), &str)) {
Joe Mason . unresolved

Nit: please #include "base/files/file_path.h" for IWYU.

Line 38, Patchset 15 (Latest): return base::StringPrintf(
Joe Mason . unresolved

Nit: prefer `absl::StrFormat`.

Line 48, Patchset 15 (Latest):std::vector<unsigned int> CPUFreqMonitor::Delegate::GetCPUIds() const {
Joe Mason . unresolved

Nit: please sort these function definitions in the same order as the header. (So this one should be first.)

Line 53, Patchset 15 (Latest): base::FixedArray<bool> cpus_to_monitor(kernel_max_cpu + 1, true);
Joe Mason . resolved

TIL about `FixedArray`.

Line 95, Patchset 15 (Latest): : delegate_(std::move(delegate)) {
Joe Mason . unresolved

Nit: please #include <utility> for IWYU.

Line 115, Patchset 15 (Latest): for (auto& id_fd : file_descriptors_) {
Joe Mason . unresolved

Optional nit: this could be `const auto& [id, fd] : file_descriptors_` (and then use `lseek(fd.get(), ...)`, etc)

Line 120, Patchset 15 (Latest): lseek(fd, 0L, SEEK_SET);
Joe Mason . unresolved

Nit: please #include <unistd.h> for IWYU.

Line 125, Patchset 15 (Latest): std::string_view content(data, bytes_read);
Joe Mason . unresolved

Nit: please #include <string_view> for IWYU.

Line 125, Patchset 15 (Latest): std::string_view content(data, bytes_read);
Joe Mason . resolved

Thanks for fixing the UNSAFE_TODO from the original!

File components/system_cpu/cpu_freq_android_unittest.cc
Line 9, Patchset 15 (Latest):#include <list>
Joe Mason . unresolved

Nit: unused.

Line 16, Patchset 15 (Latest):#include "base/task/single_thread_task_runner.h"
Joe Mason . unresolved

Nit: unused.

Line 17, Patchset 15 (Latest):#include "base/time/time.h"
Joe Mason . unresolved

Nit: unused.

Line 24, Patchset 15 (Latest): TestDelegate(const std::string& temp_dir_path)
Joe Mason . unresolved

Nit: please #include <string> for IWYU.

Line 36, Patchset 15 (Latest): std::vector<unsigned int> GetCPUIds() const override {
Joe Mason . unresolved

Nit: please #include <vector> for IWYU.

Line 46, Patchset 15 (Latest): return base::StringPrintf("%s/scaling_cur_freq%d", temp_dir_path_.c_str(),
Joe Mason . unresolved

Nit: prefer absl::StrFormat.

Line 55, Patchset 15 (Latest): unsigned int GetKernelMaxCPUs() const override { return kernel_max_cpu_; }
Joe Mason . unresolved

Nit: please put these in the same order as the header (so this should come right after GetCPUIds.)

Line 69, Patchset 15 (Latest): temp_dir_ = std::make_unique<base::ScopedTempDir>();
Joe Mason . unresolved

Nit: please #include <memory> for IWYU.

Line 82, Patchset 15 (Latest): const std::vector<std::pair<unsigned int, unsigned int>>& frequencies) {
Joe Mason . unresolved

Nit: please #include <utility> for IWYU.

Line 83, Patchset 15 (Latest): for (auto& pair : frequencies) {
Joe Mason . unresolved

Nit: prefer `const auto& [var1, var2]`. I guess that's `id, freq`? But hard to tell without var names.

Line 86, Patchset 15 (Latest): std::string str_freq = base::StringPrintf("%d\n", pair.second);
Joe Mason . unresolved

Nit: prefer absl::StrFormat.

Line 87, Patchset 15 (Latest): base::WriteFile(base::FilePath(file_path), str_freq);
Joe Mason . unresolved

Nit: please #include "base/files/file_path.h" for IWYU.

Line 99, Patchset 15 (Latest): void InitBasicCPUInfo() {
Joe Mason . unresolved

Nit: this whole method is unused.

Line 137, Patchset 15 (Latest): std::string file_path = base::StringPrintf(
Joe Mason . unresolved

Nit: prefer absl::StrFormat.

Line 146, Patchset 15 (Latest): write(fd, str_freq.c_str(), str_freq.length());
Joe Mason . unresolved

Nit: please #include <unistd.h> for IWYU.

You might want to ASSERT that the result of write is str_freq.length(), so that if the test fails due to a write error the cause is obvious.

Line 151, Patchset 15 (Latest): // Sample() will end early.
Joe Mason . unresolved

Nit: this comment is obsolete since Start() and Sample() don't exist anymore.

Line 173, Patchset 15 (Latest): EXPECT_EQ(cpu_ids.size(), 2U);
Joe Mason . unresolved

Nit: Should be ASSERT_EQ so that the test will fail cleanly and not crash if the result size is wrong.

Line 181, Patchset 15 (Latest): std::vector<unsigned int> cpu_ids = delegate()->GetCPUIds();
Joe Mason . unresolved

Nit: it took me a minute to realize why this test is valid. It's easy to assume it's falling back to the production impls of all the delegate methods, not just GetCPUIds().

It could use a comment that `GetCPUIds` reads from the overridden `GetRelatedCPUsPathString()` from the test delegate, but the test hasn't written anything at that string.

Line 182, Patchset 15 (Latest): EXPECT_EQ(cpu_ids.size(), 1U);
Joe Mason . unresolved

Nit: should be ASSERT_EQ.

File services/tracing/public/cpp/system_metrics_sampler.h
Line 17, Patchset 15 (Latest):#if BUILDFLAG(IS_ANDROID)
Joe Mason . unresolved

Nit: please #include "build/build_config.h" for IWYU.

Open in Gerrit

Related details

Attention is currently required from:
  • Etienne Pierre-Doray
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: I4fe068f43dcadf2a674714f6939fbbb68edb89eb
    Gerrit-Change-Number: 7239491
    Gerrit-PatchSet: 15
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Joe Mason <joenot...@google.com>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 19:49:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Etienne Pierre-Doray (Gerrit)

    unread,
    Dec 10, 2025, 11:58:47 AM (10 days ago) Dec 10
    to Dave Tapuska, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Dave Tapuska

    Etienne Pierre-Doray added 39 comments

    Patchset-level comments
    File-level comment, Patchset 16 (Latest):
    Etienne Pierre-Doray . resolved

    +dtapuska@ for content/browser/

    File components/system_cpu/cpu_freq_android.h
    Line 54, Patchset 15: std::vector<std::pair<unsigned int, base::ScopedFD>> file_descriptors_;
    Joe Mason . resolved

    Nit: please #include <utility> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 37, Patchset 15: virtual std::string GetScalingCurFreqPathString(unsigned int cpu_id) const;
    Joe Mason . resolved

    Nit: please #include <string> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 34, Patchset 15: virtual unsigned int GetKernelMaxCPUs() const;
    Joe Mason . resolved

    Nit: call this `GetKernelMaxCPUId()` so that it's clear that it's returning an ID, not a count. (Otherwise I'd expect it to return 8 on an 8-core CPU.)

    Etienne Pierre-Doray

    Done

    Line 30, Patchset 15: virtual std::vector<unsigned int> GetCPUIds() const;
    Joe Mason . resolved

    Optional: should wrap this in `base::IdType` so that it can't be confused with a different id. Can skip this if it would be a lot of work to convert back and forth. (Or switch to IdType in a followup.)

    Etienne Pierre-Doray

    Done

    Line 13, Patchset 15:#include "base/memory/scoped_refptr.h"
    Joe Mason . resolved

    Nit: unused.

    Etienne Pierre-Doray

    Done

    Line 11, Patchset 15:#include "base/base_export.h"
    Joe Mason . resolved

    Nit: not used. (And should be COMPONENT_EXPORT in components/ if it's needed. But I don't think it is.)

    Etienne Pierre-Doray

    Done

    File components/system_cpu/cpu_freq_android.cc
    Line 9, Patchset 15:#include "base/compiler_specific.h"
    Joe Mason . resolved

    Nit: unused?

    Etienne Pierre-Doray

    Done

    Line 12, Patchset 15:#include "base/functional/bind.h"
    Joe Mason . resolved

    Nit: unused

    Etienne Pierre-Doray

    Done

    Line 13, Patchset 15:#include "base/memory/scoped_refptr.h"
    Joe Mason . resolved

    Nit: unused

    Etienne Pierre-Doray

    Done

    Line 14, Patchset 15:#include "base/no_destructor.h"
    Joe Mason . resolved

    Nit: unused

    Etienne Pierre-Doray

    Done

    Line 24, Patchset 15: std::string str;
    Joe Mason . resolved

    Nit: please #include <string> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 26, Patchset 15: base::FilePath("/sys/devices/system/cpu/kernel_max"), &str)) {
    Joe Mason . resolved

    Nit: please #include "base/files/file_path.h" for IWYU.

    Etienne Pierre-Doray

    Done

    Line 38, Patchset 15: return base::StringPrintf(
    Joe Mason . resolved

    Nit: prefer `absl::StrFormat`.

    Etienne Pierre-Doray

    Done

    Line 48, Patchset 15:std::vector<unsigned int> CPUFreqMonitor::Delegate::GetCPUIds() const {
    Joe Mason . resolved

    Nit: please sort these function definitions in the same order as the header. (So this one should be first.)

    Etienne Pierre-Doray

    Done

    Line 95, Patchset 15: : delegate_(std::move(delegate)) {
    Joe Mason . resolved

    Nit: please #include <utility> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 115, Patchset 15: for (auto& id_fd : file_descriptors_) {
    Joe Mason . resolved

    Optional nit: this could be `const auto& [id, fd] : file_descriptors_` (and then use `lseek(fd.get(), ...)`, etc)

    Etienne Pierre-Doray

    Done

    Line 120, Patchset 15: lseek(fd, 0L, SEEK_SET);
    Joe Mason . resolved

    Nit: please #include <unistd.h> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 125, Patchset 15: std::string_view content(data, bytes_read);
    Joe Mason . resolved

    Nit: please #include <string_view> for IWYU.

    Etienne Pierre-Doray

    Done

    File components/system_cpu/cpu_freq_android_unittest.cc
    Line 9, Patchset 15:#include <list>
    Joe Mason . resolved

    Nit: unused.

    Etienne Pierre-Doray

    Done

    Line 16, Patchset 15:#include "base/task/single_thread_task_runner.h"
    Joe Mason . resolved

    Nit: unused.

    Etienne Pierre-Doray

    Done

    Line 17, Patchset 15:#include "base/time/time.h"
    Joe Mason . resolved

    Nit: unused.

    Etienne Pierre-Doray

    Done

    Line 24, Patchset 15: TestDelegate(const std::string& temp_dir_path)
    Joe Mason . resolved

    Nit: please #include <string> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 36, Patchset 15: std::vector<unsigned int> GetCPUIds() const override {
    Joe Mason . resolved

    Nit: please #include <vector> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 46, Patchset 15: return base::StringPrintf("%s/scaling_cur_freq%d", temp_dir_path_.c_str(),
    Joe Mason . resolved

    Nit: prefer absl::StrFormat.

    Etienne Pierre-Doray

    Done

    Line 55, Patchset 15: unsigned int GetKernelMaxCPUs() const override { return kernel_max_cpu_; }
    Joe Mason . resolved

    Nit: please put these in the same order as the header (so this should come right after GetCPUIds.)

    Etienne Pierre-Doray

    Done

    Line 69, Patchset 15: temp_dir_ = std::make_unique<base::ScopedTempDir>();
    Joe Mason . resolved

    Nit: please #include <memory> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 82, Patchset 15: const std::vector<std::pair<unsigned int, unsigned int>>& frequencies) {
    Joe Mason . resolved

    Nit: please #include <utility> for IWYU.

    Etienne Pierre-Doray

    Done

    Line 83, Patchset 15: for (auto& pair : frequencies) {
    Joe Mason . resolved

    Nit: prefer `const auto& [var1, var2]`. I guess that's `id, freq`? But hard to tell without var names.

    Etienne Pierre-Doray

    Done

    Line 86, Patchset 15: std::string str_freq = base::StringPrintf("%d\n", pair.second);
    Joe Mason . resolved

    Nit: prefer absl::StrFormat.

    Etienne Pierre-Doray

    Done

    Line 87, Patchset 15: base::WriteFile(base::FilePath(file_path), str_freq);
    Joe Mason . resolved

    Nit: please #include "base/files/file_path.h" for IWYU.

    Etienne Pierre-Doray

    Done

    Line 99, Patchset 15: void InitBasicCPUInfo() {
    Joe Mason . resolved

    Nit: this whole method is unused.

    Etienne Pierre-Doray

    Done

    Line 137, Patchset 15: std::string file_path = base::StringPrintf(
    Joe Mason . resolved

    Nit: prefer absl::StrFormat.

    Etienne Pierre-Doray

    Done

    Line 146, Patchset 15: write(fd, str_freq.c_str(), str_freq.length());
    Joe Mason . resolved

    Nit: please #include <unistd.h> for IWYU.

    You might want to ASSERT that the result of write is str_freq.length(), so that if the test fails due to a write error the cause is obvious.

    Etienne Pierre-Doray

    Done

    Line 151, Patchset 15: // Sample() will end early.
    Joe Mason . resolved

    Nit: this comment is obsolete since Start() and Sample() don't exist anymore.

    Etienne Pierre-Doray

    Done

    Line 173, Patchset 15: EXPECT_EQ(cpu_ids.size(), 2U);
    Joe Mason . resolved

    Nit: Should be ASSERT_EQ so that the test will fail cleanly and not crash if the result size is wrong.

    Etienne Pierre-Doray

    Done

    Line 181, Patchset 15: std::vector<unsigned int> cpu_ids = delegate()->GetCPUIds();
    Joe Mason . resolved

    Nit: it took me a minute to realize why this test is valid. It's easy to assume it's falling back to the production impls of all the delegate methods, not just GetCPUIds().

    It could use a comment that `GetCPUIds` reads from the overridden `GetRelatedCPUsPathString()` from the test delegate, but the test hasn't written anything at that string.

    Etienne Pierre-Doray

    Done

    Line 182, Patchset 15: EXPECT_EQ(cpu_ids.size(), 1U);
    Joe Mason . resolved

    Nit: should be ASSERT_EQ.

    Etienne Pierre-Doray

    Done

    File services/tracing/public/cpp/system_metrics_sampler.h
    Line 17, Patchset 15:#if BUILDFLAG(IS_ANDROID)
    Joe Mason . resolved

    Nit: please #include "build/build_config.h" for IWYU.

    Etienne Pierre-Doray

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dave Tapuska
    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: I4fe068f43dcadf2a674714f6939fbbb68edb89eb
    Gerrit-Change-Number: 7239491
    Gerrit-PatchSet: 16
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Joe Mason <joenot...@google.com>
    Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
    Gerrit-Comment-Date: Wed, 10 Dec 2025 16:58:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Joe Mason <joenot...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dave Tapuska (Gerrit)

    unread,
    Dec 10, 2025, 12:13:30 PM (10 days ago) Dec 10
    to Etienne Pierre-Doray, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Etienne Pierre-Doray

    Dave Tapuska voted and added 1 comment

    Votes added by Dave Tapuska

    Code-Review+1

    1 comment

    Patchset-level comments
    Dave Tapuska . resolved

    content lgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Etienne Pierre-Doray
    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: I4fe068f43dcadf2a674714f6939fbbb68edb89eb
    Gerrit-Change-Number: 7239491
    Gerrit-PatchSet: 16
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Joe Mason <joenot...@google.com>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Comment-Date: Wed, 10 Dec 2025 17:13:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Etienne Pierre-Doray (Gerrit)

    unread,
    Dec 10, 2025, 1:05:15 PM (10 days ago) Dec 10
    to Dave Tapuska, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

    Etienne Pierre-Doray added 1 comment

    Patchset-level comments
    File-level comment, Patchset 15:
    Joe Mason . resolved

    Nit: please fix the clang-tidy warnings.

    Lots of nits, but nothing blocking.

    Etienne Pierre-Doray

    Done

    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: I4fe068f43dcadf2a674714f6939fbbb68edb89eb
      Gerrit-Change-Number: 7239491
      Gerrit-PatchSet: 16
      Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Joe Mason <joenot...@google.com>
      Gerrit-Comment-Date: Wed, 10 Dec 2025 18:05:05 +0000
      satisfied_requirement
      open
      diffy

      Etienne Pierre-Doray (Gerrit)

      unread,
      Dec 10, 2025, 1:05:21 PM (10 days ago) Dec 10
      to Dave Tapuska, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

      Etienne Pierre-Doray 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: I4fe068f43dcadf2a674714f6939fbbb68edb89eb
      Gerrit-Change-Number: 7239491
      Gerrit-PatchSet: 17
      Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Joe Mason <joenot...@google.com>
      Gerrit-Comment-Date: Wed, 10 Dec 2025 18:05:13 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Dec 10, 2025, 2:18:40 PM (10 days ago) Dec 10
      to Etienne Pierre-Doray, Dave Tapuska, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

      Chromium LUCI CQ submitted the change with unreviewed changes

      Unreviewed changes

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

      ```
      The name of the file: components/system_cpu/cpu_freq_android.cc
      Insertions: 2, Deletions: 2.

      @@ -54,13 +54,13 @@
      }
      }
      }
      - result.push_back(CpuId(i));
      + result.emplace_back(i);
      }

      // If none of the files were readable, we assume CPU0 exists and fall back to
      // using that.
      if (result.size() == 0) {
      - result.push_back(CpuId(0));
      + result.emplace_back(0);
      }
      return result;
      }
      ```
      ```
      The name of the file: components/system_cpu/cpu_freq_android_unittest.cc
      Insertions: 1, Deletions: 1.

      @@ -70,7 +70,7 @@

      class CPUFreqMonitorTest : public testing::Test {
      public:
      - CPUFreqMonitorTest() {}
      + CPUFreqMonitorTest() = default;

      void SetUp() override {

      temp_dir_ = std::make_unique<base::ScopedTempDir>();
      ```

      Change information

      Commit message:
      [tracing] Fold CPUFreqMonitor into SystemMetricsSampler

      A lot of complexity in CPUFreqMonitor come from integration with
      tracing. This CL extracts the code to sample the frequency, move
      it to components/system_cpu (where similar classes live), and
      reuses it in existing SystemMetricsSampler which already handles
      the integration for such things.
      Change-Id: I4fe068f43dcadf2a674714f6939fbbb68edb89eb
      Reviewed-by: Dave Tapuska <dtap...@chromium.org>
      Reviewed-by: Joe Mason <joenot...@google.com>
      Commit-Queue: Etienne Pierre-Doray <etie...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1556877}
      Files:
      • M base/BUILD.gn
      • D base/trace_event/cpufreq_monitor_android.cc
      • D base/trace_event/cpufreq_monitor_android.h
      • D base/trace_event/cpufreq_monitor_android_unittest.cc
      • M components/system_cpu/BUILD.gn
      • A components/system_cpu/cpu_freq_android.cc
      • A components/system_cpu/cpu_freq_android.h
      • A components/system_cpu/cpu_freq_android_unittest.cc
      • M content/browser/browser_main_loop.cc
      • M services/tracing/public/cpp/system_metrics_sampler.cc
      • M services/tracing/public/cpp/system_metrics_sampler.h
      Change size: XL
      Delta: 11 files changed, 412 insertions(+), 689 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Dave Tapuska, +1 by Joe Mason
      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: I4fe068f43dcadf2a674714f6939fbbb68edb89eb
      Gerrit-Change-Number: 7239491
      Gerrit-PatchSet: 18
      Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Joe Mason <joenot...@google.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages