New issue
Advanced search Search tips

Issue 639700 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 617492



Sign in to add a comment

Replace MemoryPressureListener with MemoryCoordinatorClient

Project Member Reported by bashi@chromium.org, Aug 22 2016

Issue description

Memory coordinator is a replacement of MemoryPressureMonitor and we are going to deprecate MemoryPresureListener. Existing listeners which purge/throttle memeory should be replaced with MemoryCoordinatorClients.

Design doc:
https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit#

In this issue, I don't intend to replace MPLs which report some metrics.
 

Comment 1 by bashi@chromium.org, Aug 22 2016

Labels: -Pri-3 Pri-1
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/953291ad42525b286dbf60be49cecd001c98b8e6

commit 953291ad42525b286dbf60be49cecd001c98b8e6
Author: bashi <bashi@chromium.org>
Date: Tue Aug 30 05:13:37 2016

Make HistoryBackend a client of memory coordinator

When memory coordinator is enabled, HistoryBackend becomes a
client of memory coordinator instead of installing
MemoryPressureListener.

Also MemoryCoordinator becomes a singleton so that any component
can access MemoryCoordinator to listen to memory events.

BUG= 639700 

Review-Url: https://codereview.chromium.org/2261073002
Cr-Commit-Position: refs/heads/master@{#415141}

[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/components/history/core/DEPS
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/components/history/core/browser/BUILD.gn
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/components/history/core/browser/history_backend.cc
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/components/history/core/browser/history_backend.h
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/components/memory_coordinator/browser/memory_coordinator.cc
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/components/memory_coordinator/browser/memory_coordinator.h
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/components/memory_coordinator/browser/memory_coordinator_unittest.cc
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/components/memory_coordinator/common/memory_coordinator_client.h
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/content/browser/browser_main_loop.cc
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/content/browser/browser_main_loop.h
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/content/browser/memory/memory_coordinator_browsertest.cc
[modify] https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6/content/browser/renderer_host/render_process_host_impl.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a517a220c9961d15c4f045ff3cabe03fa8e9af2c

commit a517a220c9961d15c4f045ff3cabe03fa8e9af2c
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Tue Sep 20 07:17:16 2016

Make DOMStorageContextWrapper a client of memory coordinator

When the memory coordinator is enabled, DOMStorageContextWrapper becomes
a client of the memory coordinator instead of installing
MemoryPressureListener.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2335933003
Cr-Commit-Position: refs/heads/master@{#419692}

[modify] https://crrev.com/a517a220c9961d15c4f045ff3cabe03fa8e9af2c/content/browser/dom_storage/dom_storage_context_wrapper.cc
[modify] https://crrev.com/a517a220c9961d15c4f045ff3cabe03fa8e9af2c/content/browser/dom_storage/dom_storage_context_wrapper.h

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8b5c3660468238feee6e9b2fa38690d2e34e86f7

commit 8b5c3660468238feee6e9b2fa38690d2e34e86f7
Author: bashi <bashi@chromium.org>
Date: Thu Sep 29 03:40:21 2016

MemoryCoordinatorClient's destructor should be protected-virtual

A public destructor on a pure-virtual interface is a signal that any
consumer of that interface is free to deallocate the structure.
That's not required of the API of MemoryCoordinatorClient. By making
the constructor protected-virtual, we are signaling that the API
contract of the MemoryCoordinatorClient makes no requirements on
the implementation.

BUG= 639700 

Review-Url: https://codereview.chromium.org/2374003003
Cr-Commit-Position: refs/heads/master@{#421736}

[modify] https://crrev.com/8b5c3660468238feee6e9b2fa38690d2e34e86f7/base/memory/memory_coordinator_client.h

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8156e7c5f7b94c717ccc4a97eb1dc09f8e6723a6

commit 8156e7c5f7b94c717ccc4a97eb1dc09f8e6723a6
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Thu Sep 29 06:17:52 2016

Make HttpNetworkSession a client of memory coordinator

When the memory coordinator is enabled, HttpNetworkSession becomes a
client of the memory coordinator instead of installing
MemoryPressureListener.

In the implmentation of this CL, both MemoryPressureListener and
MemoryCoordinatorClient are installed regardless of the flag, but as
default MemoryCoordinator is not enabled and when MemoryCoordinator is
enabled by a flag, we plan to suppress MemoryPressureMonitor features.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2359723006
Cr-Commit-Position: refs/heads/master@{#421761}

[modify] https://crrev.com/8156e7c5f7b94c717ccc4a97eb1dc09f8e6723a6/net/http/http_network_session.cc
[modify] https://crrev.com/8156e7c5f7b94c717ccc4a97eb1dc09f8e6723a6/net/http/http_network_session.h

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/15329677f4aca0761902b0f1513099d58ae1b566

commit 15329677f4aca0761902b0f1513099d58ae1b566
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Fri Sep 30 04:42:47 2016

Make HostDiscardableSharedMemoryManager a client of memory coordinator

When the memory coordinator is enabled,
HostDiscardableSharedMemoryManager becomes a client of the memory
coordinator instead of installing MemoryPressureListener.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2357603002
Cr-Commit-Position: refs/heads/master@{#422030}

[modify] https://crrev.com/15329677f4aca0761902b0f1513099d58ae1b566/content/common/host_discardable_shared_memory_manager.cc
[modify] https://crrev.com/15329677f4aca0761902b0f1513099d58ae1b566/content/common/host_discardable_shared_memory_manager.h

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e10e500bba646fdeb77b2ae6b9b4927d311968d9

commit e10e500bba646fdeb77b2ae6b9b4927d311968d9
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Tue Oct 04 03:54:31 2016

Make SSLClientSessionCache a client of memory coordinator

When the memory coordinator is enabled, SSLClientSessionCache becomes a
client of the memory coordinator instead of installing
MemoryPressureListener.

In the implmentation of this CL, both MemoryPressureListener and
MemoryCoordinatorClient are installed regardless of the flag, but as
default MemoryCoordinator is not enabled and when MemoryCoordinator is
enabled by a flag, it is planed to suppress MemoryPressureMonitor
features.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2384703002
Cr-Commit-Position: refs/heads/master@{#422697}

[modify] https://crrev.com/e10e500bba646fdeb77b2ae6b9b4927d311968d9/net/ssl/ssl_client_session_cache.cc
[modify] https://crrev.com/e10e500bba646fdeb77b2ae6b9b4927d311968d9/net/ssl/ssl_client_session_cache.h

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/651a10b49a97e21f805aca384d734f3879cd66db

commit 651a10b49a97e21f805aca384d734f3879cd66db
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Tue Oct 04 03:55:17 2016

Make SdchOwner a client of memory coordinator

When the memory coordinator is enabled, SdchOwner becomes a client of
the memory coordinator instead of installing MemoryPressureListener.

In the implmentation of this CL, both MemoryPressureListener and
MemoryCoordinatorClient are installed regardless of the flag, but as
default MemoryCoordinator is not enabled and when MemoryCoordinator is
enabled by a flag, it is planed to suppress MemoryPressureMonitor
features.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2390603002
Cr-Commit-Position: refs/heads/master@{#422698}

[modify] https://crrev.com/651a10b49a97e21f805aca384d734f3879cd66db/net/sdch/sdch_owner.cc
[modify] https://crrev.com/651a10b49a97e21f805aca384d734f3879cd66db/net/sdch/sdch_owner.h

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7bb39585012ce3c383e880bc43b710226326a026

commit 7bb39585012ce3c383e880bc43b710226326a026
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Wed Oct 12 04:30:57 2016

Make RenderThreadImpl a client of memory coordinator

When the memory coordinator is enabled, RenderThreadImpl becomes a
client of the memory coordinator instead of installing
MemoryPressureListener.

In the implmentation of this CL, both MemoryPressureListener and
MemoryCoordinatorClient are installed regardless of the flag, but as
default MemoryCoordinator is not enabled and when MemoryCoordinator is
enabled by a flag, it is planed to suppress MemoryPressureMonitor
features.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2402643002
Cr-Commit-Position: refs/heads/master@{#424668}

[modify] https://crrev.com/7bb39585012ce3c383e880bc43b710226326a026/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/7bb39585012ce3c383e880bc43b710226326a026/content/renderer/render_thread_impl.h
[modify] https://crrev.com/7bb39585012ce3c383e880bc43b710226326a026/third_party/WebKit/Source/platform/MemoryCoordinator.cpp
[modify] https://crrev.com/7bb39585012ce3c383e880bc43b710226326a026/third_party/WebKit/Source/platform/MemoryCoordinator.h
[modify] https://crrev.com/7bb39585012ce3c383e880bc43b710226326a026/third_party/WebKit/Source/platform/exported/WebMemoryCoordinator.cpp
[modify] https://crrev.com/7bb39585012ce3c383e880bc43b710226326a026/third_party/WebKit/public/BUILD.gn
[modify] https://crrev.com/7bb39585012ce3c383e880bc43b710226326a026/third_party/WebKit/public/platform/WebMemoryCoordinator.h
[add] https://crrev.com/7bb39585012ce3c383e880bc43b710226326a026/third_party/WebKit/public/platform/WebMemoryState.h

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3524bd796cb8b8c57815dfa324e4cc66a74f5336

commit 3524bd796cb8b8c57815dfa324e4cc66a74f5336
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Mon Oct 24 07:54:45 2016

Introduce MemoryCoordinatorProxy in base

This CL instroduces a new class MemoryCoordinatorProxy that is the proxy
of MemoryCoordinator in content/browser. MemoryCoordinator::
GetCurrentMemoryState to get the current memory state is now not
accessible by some MemoryCoordinatorClients, and MemoryCoordinatorProxy
offers the proxy function to access this.

This is used to get the current memory state by e.g. TabLoader in
chrome/browser or components in net.

BUG= 639700 

Review-Url: https://codereview.chromium.org/2434353003
Cr-Commit-Position: refs/heads/master@{#427027}

[modify] https://crrev.com/3524bd796cb8b8c57815dfa324e4cc66a74f5336/base/BUILD.gn
[add] https://crrev.com/3524bd796cb8b8c57815dfa324e4cc66a74f5336/base/memory/memory_coordinator_proxy.cc
[add] https://crrev.com/3524bd796cb8b8c57815dfa324e4cc66a74f5336/base/memory/memory_coordinator_proxy.h
[modify] https://crrev.com/3524bd796cb8b8c57815dfa324e4cc66a74f5336/content/browser/browser_main_loop.cc
[modify] https://crrev.com/3524bd796cb8b8c57815dfa324e4cc66a74f5336/content/browser/memory/memory_coordinator.cc
[modify] https://crrev.com/3524bd796cb8b8c57815dfa324e4cc66a74f5336/content/browser/memory/memory_coordinator.h
[modify] https://crrev.com/3524bd796cb8b8c57815dfa324e4cc66a74f5336/content/browser/memory/memory_coordinator_browsertest.cc
[modify] https://crrev.com/3524bd796cb8b8c57815dfa324e4cc66a74f5336/content/browser/memory/memory_coordinator_impl_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/30b8b607a1d2ac63038383685d8eedf44acb0447

commit 30b8b607a1d2ac63038383685d8eedf44acb0447
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Wed Oct 26 05:54:27 2016

Make TabLoader a client of memory coordinator

When the memory coordinator is enabled, TabLoader becomes a client of
the memory coordinator instead of installing MemoryPressureListener.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2370753002
Cr-Commit-Position: refs/heads/master@{#427603}

[modify] https://crrev.com/30b8b607a1d2ac63038383685d8eedf44acb0447/chrome/browser/sessions/tab_loader.cc
[modify] https://crrev.com/30b8b607a1d2ac63038383685d8eedf44acb0447/chrome/browser/sessions/tab_loader.h

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5ebca45f1d3a2a62bafb887229a29ae0ec5a83bd

commit 5ebca45f1d3a2a62bafb887229a29ae0ec5a83bd
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Wed Oct 26 07:30:19 2016

Make RendererFrameManager a client of memory coordinator

When the memory coordinator is enabled, RendererFrameManager becomes
a client of the memory coordinator instead of installing
MemoryPressureListener.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2358433003
Cr-Commit-Position: refs/heads/master@{#427627}

[modify] https://crrev.com/5ebca45f1d3a2a62bafb887229a29ae0ec5a83bd/content/browser/renderer_host/renderer_frame_manager.cc
[modify] https://crrev.com/5ebca45f1d3a2a62bafb887229a29ae0ec5a83bd/content/browser/renderer_host/renderer_frame_manager.h

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41c89184c969af97c6b9ac9f262f051b5557fdfc

commit 41c89184c969af97c6b9ac9f262f051b5557fdfc
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Wed Oct 26 08:34:51 2016

Add MemoryCoordinatorProxy::SetCurrentMemoryStateForTesting

This CL instroduces MemoryCoordinatorProxy::
SetCurrentMemoryStateForTesting to set the current memory state for
testing. This is needed to cover MemoryCoordinatorClients functions in
tests.

BUG= 639700 
TEST=content_unittests --gtest_filter=MemoryCoordinatorImplTest.*

Review-Url: https://codereview.chromium.org/2448953002
Cr-Commit-Position: refs/heads/master@{#427636}

[modify] https://crrev.com/41c89184c969af97c6b9ac9f262f051b5557fdfc/base/memory/memory_coordinator_proxy.cc
[modify] https://crrev.com/41c89184c969af97c6b9ac9f262f051b5557fdfc/base/memory/memory_coordinator_proxy.h
[modify] https://crrev.com/41c89184c969af97c6b9ac9f262f051b5557fdfc/content/browser/browser_main_loop.cc
[modify] https://crrev.com/41c89184c969af97c6b9ac9f262f051b5557fdfc/content/browser/memory/memory_coordinator.cc
[modify] https://crrev.com/41c89184c969af97c6b9ac9f262f051b5557fdfc/content/browser/memory/memory_coordinator.h
[modify] https://crrev.com/41c89184c969af97c6b9ac9f262f051b5557fdfc/content/browser/memory/memory_coordinator_impl.cc
[modify] https://crrev.com/41c89184c969af97c6b9ac9f262f051b5557fdfc/content/browser/memory/memory_coordinator_impl.h
[modify] https://crrev.com/41c89184c969af97c6b9ac9f262f051b5557fdfc/content/browser/memory/memory_coordinator_impl_unittest.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71fa1218175050b39812872fc707f97250860b5e

commit 71fa1218175050b39812872fc707f97250860b5e
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Mon Oct 31 07:24:24 2016

Make ResourceReporter a client of memory coordinator

When the memory coordinator is enabled, ResourceReporter becomes a
client of the memory coordinator instead of installing
MemoryPressureListener.

In the implmentation of this CL, both MemoryPressureListener and
MemoryCoordinatorClient are installed regardless of the flag, but as
default MemoryCoordinator is not enabled and when MemoryCoordinator is
enabled by a flag, it is planed to suppress MemoryPressureMonitor
features.

Design Doc: https://docs.google.com/document/d/1a69mMr7jI7qK0OfKNlrZ350xiXizVMCCe8orGX7K8Uo/edit?ts=57d7968b#

BUG= 639700 

Review-Url: https://codereview.chromium.org/2388933003
Cr-Commit-Position: refs/heads/master@{#428664}

[modify] https://crrev.com/71fa1218175050b39812872fc707f97250860b5e/chrome/browser/chromeos/resource_reporter/resource_reporter.cc
[modify] https://crrev.com/71fa1218175050b39812872fc707f97250860b5e/chrome/browser/chromeos/resource_reporter/resource_reporter.h

Cc: bashi@chromium.org
Owner: hajimehoshi@chromium.org
hajimehoshi@: Could you take over the ownership? IIUC we can close this when https://codereview.chromium.org/2466883002/ lands.
No problem.
Status: Fixed (was: Assigned)

Sign in to add a comment