[ResourceCoordinator] Improve os metrics gathering [chromium/src : main]

0 views
Skip to first unread message

gwsq (Gerrit)

unread,
Jul 12, 2024, 12:27:53 PM (5 days ago) Jul 12
to Dave Tapuska, Siddhartha S, Chromium LUCI CQ, chromium...@chromium.org, blundell+...@chromium.org, chrome-gr...@chromium.org, mac-r...@chromium.org
Attention needed from Siddhartha S

Message from gwsq

Warning: gwsq did not assign any reviewers.

Open in Gerrit

Related details

Attention is currently required from:
  • Siddhartha S
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: Iddb2a652ff837e16c2e10e3b62f155f98c213ef4
Gerrit-Change-Number: 5703536
Gerrit-PatchSet: 1
Gerrit-Owner: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Siddhartha S <ss...@chromium.org>
Gerrit-Comment-Date: Fri, 12 Jul 2024 16:27:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Siddhartha S (Gerrit)

unread,
Jul 15, 2024, 12:01:40 PM (2 days ago) Jul 15
to Dave Tapuska, Siddhartha S, Chromium LUCI CQ, chromium...@chromium.org, blundell+...@chromium.org, chrome-gr...@chromium.org, mac-r...@chromium.org
Attention needed from Dave Tapuska

Siddhartha S voted and added 1 comment

Votes added by Siddhartha S

Code-Review+1

1 comment

File services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc
Line 255, Patchset 2 (Latest): return false;
Siddhartha S . unresolved

can you do `CHECK(pid == null || pid = current)` ?

When you actually fix the caller to use this for child process, you can remove this check? for now this might help ensure that we do not accidentally break some flow that calls for child process.

Open in Gerrit

Related details

Attention is currently required from:
  • Dave Tapuska
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Iddb2a652ff837e16c2e10e3b62f155f98c213ef4
Gerrit-Change-Number: 5703536
Gerrit-PatchSet: 2
Gerrit-Owner: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
Gerrit-Comment-Date: Mon, 15 Jul 2024 16:01:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dave Tapuska (Gerrit)

unread,
Jul 15, 2024, 12:17:11 PM (2 days ago) Jul 15
to Siddhartha S, Chromium LUCI CQ, chromium...@chromium.org, blundell+...@chromium.org, chrome-gr...@chromium.org, mac-r...@chromium.org
Attention needed from Joe Mason and Siddhartha S

Dave Tapuska added 1 comment

File services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc
Siddhartha S . unresolved

can you do `CHECK(pid == null || pid = current)` ?

When you actually fix the caller to use this for child process, you can remove this check? for now this might help ensure that we do not accidentally break some flow that calls for child process.

Dave Tapuska

I think the ResourceCoordinator will actually fail for this...

https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resource_coordinator/tab_lifecycle_unit.cc;drc=34ad7f3844f882baf3d31a6bc6e300acaa0e3fc8;bpv=1;bpt=1;l=331

Actually calls this method but it was actually getting metrics from the parent process. Adding joenotcharles@ to comment.

Open in Gerrit

Related details

Attention is currently required from:
  • Joe Mason
  • Siddhartha S
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Iddb2a652ff837e16c2e10e3b62f155f98c213ef4
Gerrit-Change-Number: 5703536
Gerrit-PatchSet: 2
Gerrit-Owner: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Joe Mason <joenot...@google.com>
Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Siddhartha S <ss...@chromium.org>
Gerrit-Attention: Joe Mason <joenot...@google.com>
Gerrit-Comment-Date: Mon, 15 Jul 2024 16:16:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Siddhartha S <ss...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Siddhartha S (Gerrit)

unread,
Jul 15, 2024, 1:08:25 PM (2 days ago) Jul 15
to Dave Tapuska, Siddhartha S, Chromium LUCI CQ, chromium...@chromium.org, blundell+...@chromium.org, chrome-gr...@chromium.org, mac-r...@chromium.org
Attention needed from Dave Tapuska and Joe Mason

Siddhartha S added 1 comment

File services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc
Siddhartha S . unresolved

can you do `CHECK(pid == null || pid = current)` ?

When you actually fix the caller to use this for child process, you can remove this check? for now this might help ensure that we do not accidentally break some flow that calls for child process.

Dave Tapuska

I think the ResourceCoordinator will actually fail for this...

https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resource_coordinator/tab_lifecycle_unit.cc;drc=34ad7f3844f882baf3d31a6bc6e300acaa0e3fc8;bpv=1;bpt=1;l=331

Actually calls this method but it was actually getting metrics from the parent process. Adding joenotcharles@ to comment.

Siddhartha S

hm i guess the existing code was broken then. it always used to fetch mach_task_self(). This cl does not make this worse. So, fine with this change. but Joe can comment.

Open in Gerrit

Related details

Attention is currently required from:
  • Dave Tapuska
  • Joe Mason
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Iddb2a652ff837e16c2e10e3b62f155f98c213ef4
Gerrit-Change-Number: 5703536
Gerrit-PatchSet: 2
Gerrit-Owner: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Joe Mason <joenot...@google.com>
Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
Gerrit-Attention: Joe Mason <joenot...@google.com>
Gerrit-Comment-Date: Mon, 15 Jul 2024 17:08:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dave Tapuska <dtap...@chromium.org>
Comment-In-Reply-To: Siddhartha S <ss...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Dave Tapuska (Gerrit)

unread,
Jul 15, 2024, 2:01:15 PM (2 days ago) Jul 15
to Siddhartha S, Chromium LUCI CQ, chromium...@chromium.org, blundell+...@chromium.org, chrome-gr...@chromium.org, mac-r...@chromium.org
Attention needed from Joe Mason

Dave Tapuska voted and added 1 comment

Votes added by Dave Tapuska

Commit-Queue+2

1 comment

File services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc
Siddhartha S . resolved

can you do `CHECK(pid == null || pid = current)` ?

When you actually fix the caller to use this for child process, you can remove this check? for now this might help ensure that we do not accidentally break some flow that calls for child process.

Dave Tapuska

I think the ResourceCoordinator will actually fail for this...

https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resource_coordinator/tab_lifecycle_unit.cc;drc=34ad7f3844f882baf3d31a6bc6e300acaa0e3fc8;bpv=1;bpt=1;l=331

Actually calls this method but it was actually getting metrics from the parent process. Adding joenotcharles@ to comment.

Siddhartha S

hm i guess the existing code was broken then. it always used to fetch mach_task_self(). This cl does not make this worse. So, fine with this change. but Joe can comment.

Dave Tapuska

Chatted with Joe. I've created a bug (https://issues.chromium.org/u/1/issues/353039532) so they can track this.

Open in Gerrit

Related details

Attention is currently required from:
  • Joe Mason
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
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: Iddb2a652ff837e16c2e10e3b62f155f98c213ef4
Gerrit-Change-Number: 5703536
Gerrit-PatchSet: 2
Gerrit-Owner: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Joe Mason <joenot...@google.com>
Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Joe Mason <joenot...@google.com>
Gerrit-Comment-Date: Mon, 15 Jul 2024 18:01:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Siddhartha S <ss...@chromium.org>
Comment-In-Reply-To: Dave Tapuska <dtap...@chromium.org>
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Jul 15, 2024, 2:54:58 PM (2 days ago) Jul 15
to Dave Tapuska, Siddhartha S, chromium...@chromium.org, blundell+...@chromium.org, chrome-gr...@chromium.org, mac-r...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
[ResourceCoordinator] Improve os metrics gathering

Support passing a non-null pid in for Windows. Linux already
supported this.

Add a new API for querying metrics on Apple platforms passing
in a mach_port_t which allows the browser process to query
the metrics of a child process.
Bug: 348199030
Change-Id: Iddb2a652ff837e16c2e10e3b62f155f98c213ef4
Reviewed-by: Siddhartha S <ss...@chromium.org>
Commit-Queue: Dave Tapuska <dtap...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1327687}
Files:
  • M services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h
  • M services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_mac.cc
  • M services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_win.cc
Change size: S
Delta: 3 files changed, 32 insertions(+), 9 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Siddhartha S
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: Iddb2a652ff837e16c2e10e3b62f155f98c213ef4
Gerrit-Change-Number: 5703536
Gerrit-PatchSet: 3
Gerrit-Owner: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Joe Mason <joenot...@google.com>
Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
Gerrit-CC: gwsq
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages