Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Issue 1004043002: Re-land: base: Implement browser process support for discardable memory. (Closed)

Created:
5 years, 9 months ago by reveman
Modified:
5 years, 9 months ago
CC:
chrome-apps-syd-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, erikwright+watch_chromium.org, gavinp+memory_chromium.org, jam, kalyank, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, sadrul, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Re-land: base: Implement browser process support for discardable memory. This implements support for in-process discardable memory. Each in-process discardable memory instance is associated with a discardable shared memory segment. This is hopefully efficient enough with the limited use of discardable memory in the browser process. DiscardableSharedMemoryHeap can be used if this is not enough. This also moves the test implementation of the discardable memory allocator into a TestDiscardableMemoryShmemAllocator class and requires tests that use discardable memory to explicitly use this test allocator. Browser tests uses the real discardable memory allocator. BUG=422953, 463250 Committed: https://crrev.com/2799f7fb3d3a2406b1608f0b9bc470ff76ad4ea0 Cr-Commit-Position: refs/heads/master@{#320764}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 4

Patch Set 5 : address review feedback #

Total comments: 5

Patch Set 6 : set allocator instance for blink tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+220 lines, -164 lines) Patch
M ash/test/test_suite.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M ash/test/test_suite.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M base/BUILD.gn View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M base/base.gyp View 1 2 chunks +2 lines, -1 line 0 comments Download
M base/memory/discardable_memory_shmem_allocator.cc View 2 chunks +1 line, -42 lines 0 comments Download
D base/memory/discardable_memory_unittest.cc View 1 1 chunk +0 lines, -64 lines 0 comments Download
M base/test/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A base/test/test_discardable_memory_shmem_allocator.h View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download
A base/test/test_discardable_memory_shmem_allocator.cc View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/test/base/chrome_unit_test_suite.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/test/base/chrome_unit_test_suite.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M content/common/host_discardable_shared_memory_manager.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/host_discardable_shared_memory_manager.cc View 1 2 3 8 chunks +105 lines, -54 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M content/test/blink_test_environment.cc View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
M ui/app_list/test/run_all_unittests.cc View 3 chunks +6 lines, -0 lines 0 comments Download
M ui/message_center/test/run_all_unittests.cc View 1 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (7 generated)
reveman
5 years, 9 months ago (2015-03-13 19:43:12 UTC) #2
Avi (use Gerrit)
LGTM with nits. https://codereview.chromium.org/1004043002/diff/60001/base/test/test_discardable_memory_shmem_allocator.cc File base/test/test_discardable_memory_shmem_allocator.cc (right): https://codereview.chromium.org/1004043002/diff/60001/base/test/test_discardable_memory_shmem_allocator.cc#newcode13 base/test/test_discardable_memory_shmem_allocator.cc:13: : memory_(new uint8[size]) {} As noted ...
5 years, 9 months ago (2015-03-13 21:05:26 UTC) #3
reveman
+danakj for base/ +oshima for ash/test/ +jcivelli for chrome/test/ +stevenjb for ui/ https://codereview.chromium.org/1004043002/diff/60001/base/test/test_discardable_memory_shmem_allocator.cc File base/test/test_discardable_memory_shmem_allocator.cc ...
5 years, 9 months ago (2015-03-13 21:31:24 UTC) #5
stevenjb
lgtm
5 years, 9 months ago (2015-03-13 21:42:41 UTC) #6
danakj
https://codereview.chromium.org/1004043002/diff/80001/base/test/test_discardable_memory_shmem_allocator.cc File base/test/test_discardable_memory_shmem_allocator.cc (right): https://codereview.chromium.org/1004043002/diff/80001/base/test/test_discardable_memory_shmem_allocator.cc#newcode18 base/test/test_discardable_memory_shmem_allocator.cc:18: bool Lock() override { return false; } lock returning ...
5 years, 9 months ago (2015-03-13 21:59:07 UTC) #7
oshima
ash rs lgtm
5 years, 9 months ago (2015-03-13 22:03:32 UTC) #8
reveman
https://codereview.chromium.org/1004043002/diff/80001/base/test/test_discardable_memory_shmem_allocator.cc File base/test/test_discardable_memory_shmem_allocator.cc (right): https://codereview.chromium.org/1004043002/diff/80001/base/test/test_discardable_memory_shmem_allocator.cc#newcode18 base/test/test_discardable_memory_shmem_allocator.cc:18: bool Lock() override { return false; } On 2015/03/13 ...
5 years, 9 months ago (2015-03-13 22:07:33 UTC) #9
danakj
LGTM https://codereview.chromium.org/1004043002/diff/80001/base/test/test_discardable_memory_shmem_allocator.cc File base/test/test_discardable_memory_shmem_allocator.cc (right): https://codereview.chromium.org/1004043002/diff/80001/base/test/test_discardable_memory_shmem_allocator.cc#newcode18 base/test/test_discardable_memory_shmem_allocator.cc:18: bool Lock() override { return false; } On ...
5 years, 9 months ago (2015-03-13 22:32:45 UTC) #10
reveman
+thakis,sky for chrome/test/
5 years, 9 months ago (2015-03-13 22:42:25 UTC) #12
sky
https://codereview.chromium.org/1004043002/diff/80001/chrome/test/base/chrome_unit_test_suite.cc File chrome/test/base/chrome_unit_test_suite.cc (right): https://codereview.chromium.org/1004043002/diff/80001/chrome/test/base/chrome_unit_test_suite.cc#newcode114 chrome/test/base/chrome_unit_test_suite.cc:114: base::DiscardableMemoryShmemAllocator::SetInstance( Do you need any cleanup code in Shutdown ...
5 years, 9 months ago (2015-03-13 22:54:12 UTC) #13
reveman
https://codereview.chromium.org/1004043002/diff/80001/chrome/test/base/chrome_unit_test_suite.cc File chrome/test/base/chrome_unit_test_suite.cc (right): https://codereview.chromium.org/1004043002/diff/80001/chrome/test/base/chrome_unit_test_suite.cc#newcode114 chrome/test/base/chrome_unit_test_suite.cc:114: base::DiscardableMemoryShmemAllocator::SetInstance( On 2015/03/13 22:54:12, sky wrote: > Do you ...
5 years, 9 months ago (2015-03-13 23:08:21 UTC) #14
Nico
lgtm
5 years, 9 months ago (2015-03-16 14:21:07 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1004043002/80001
5 years, 9 months ago (2015-03-16 14:21:57 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 9 months ago (2015-03-16 16:50:20 UTC) #19
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/ee5ad4b13cc36b7ee494bc2b04a356d73ad32e3a Cr-Commit-Position: refs/heads/master@{#320737}
5 years, 9 months ago (2015-03-16 16:51:09 UTC) #20
reveman
avi, fyi re-landing this with the change to content/test/blink_test_environment.cc, which is needed for webkit_unit_tests
5 years, 9 months ago (2015-03-16 18:02:46 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1004043002/100001
5 years, 9 months ago (2015-03-16 18:07:39 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 9 months ago (2015-03-16 19:06:42 UTC) #25
commit-bot: I haz the power
5 years, 9 months ago (2015-03-16 19:07:12 UTC) #26
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/2799f7fb3d3a2406b1608f0b9bc470ff76ad4ea0
Cr-Commit-Position: refs/heads/master@{#320764}

Powered by Google App Engine
This is Rietveld 408576698