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

Issue 23130004: Enforce a memory limit on MappedMemoryManager (Closed)

Created:
7 years, 4 months ago by kaanb
Modified:
7 years, 4 months ago
CC:
chromium-reviews, apatrick_chromium, klobag.chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Enforce a memory limit on MappedMemoryManager BUG=272591 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218693

Patch Set 1 #

Patch Set 2 : Minor fixes #

Total comments: 1

Patch Set 3 : Inject the memory_limit from GLES2Implementation and add a unit test #

Patch Set 4 : Remove unused enum #

Total comments: 14

Patch Set 5 : Incorporate code reviews #

Patch Set 6 : More code review feedback incorporated #

Total comments: 12

Patch Set 7 : pass mapped_memory_limit_ to GLES2Implementation #

Patch Set 8 : Incorporate code reviews #

Patch Set 9 : Set chunk size #

Total comments: 31

Patch Set 10 : Incorporate feedback #

Patch Set 11 : Revert FencedAllocator::InUse changes and add comments explaining its behavior #

Total comments: 2

Patch Set 12 : more feedback #

Patch Set 13 : more feedback #

Patch Set 14 : more feedback #

Patch Set 15 : rebase #

Patch Set 16 : Two minor syntax errors #

Patch Set 17 : fix syntax error #

Patch Set 18 : Add gpu::gles2:: before GLES2Implementation #

Patch Set 19 : fix another namespace error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -50 lines) Patch
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/image_transport_factory_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -1 line 0 comments Download
M content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc View 1 2 3 4 5 6 7 5 chunks +9 lines, -4 lines 0 comments Download
M gpu/command_buffer/client/buffer_tracker_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/client/fenced_allocator.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/fenced_allocator.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +15 lines, -2 lines 0 comments Download
M gpu/command_buffer/client/gl_in_process_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +6 lines, -3 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +4 lines, -9 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/client/mapped_memory.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +23 lines, -5 lines 0 comments Download
M gpu/command_buffer/client/mapped_memory.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +40 lines, -15 lines 0 comments Download
M gpu/command_buffer/client/mapped_memory_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +79 lines, -1 line 0 comments Download
M gpu/command_buffer/client/query_tracker_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -1 line 0 comments Download
M gpu/gles2_conform_support/egl/display.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -1 line 0 comments Download
M ppapi/shared_impl/ppb_graphics_3d_shared.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 41 (0 generated)
kaanb
7 years, 4 months ago (2013-08-14 01:52:07 UTC) #1
no sievers
https://codereview.chromium.org/23130004/diff/2001/gpu/command_buffer/client/mapped_memory.cc File gpu/command_buffer/client/mapped_memory.cc (right): https://codereview.chromium.org/23130004/diff/2001/gpu/command_buffer/client/mapped_memory.cc#newcode30 gpu/command_buffer/client/mapped_memory.cc:30: #if defined(OS_ANDROID) can we avoid ifdefs? Can't we just ...
7 years, 4 months ago (2013-08-14 02:05:51 UTC) #2
kaanb
On 2013/08/14 02:05:51, sievers wrote: > https://codereview.chromium.org/23130004/diff/2001/gpu/command_buffer/client/mapped_memory.cc > File gpu/command_buffer/client/mapped_memory.cc (right): > > https://codereview.chromium.org/23130004/diff/2001/gpu/command_buffer/client/mapped_memory.cc#newcode30 > ...
7 years, 4 months ago (2013-08-15 00:39:26 UTC) #3
no sievers
https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc#newcode156 gpu/command_buffer/client/gles2_implementation.cc:156: #if defined(OS_ANDROID) there is an ifdef android in a ...
7 years, 4 months ago (2013-08-15 01:07:15 UTC) #4
kaanb
https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc#newcode156 gpu/command_buffer/client/gles2_implementation.cc:156: #if defined(OS_ANDROID) On 2013/08/15 01:07:15, sievers wrote: > there ...
7 years, 4 months ago (2013-08-15 01:21:04 UTC) #5
no sievers
On 2013/08/15 01:21:04, kaanb wrote: > https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc > File gpu/command_buffer/client/gles2_implementation.cc (right): > > https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc#newcode156 > ...
7 years, 4 months ago (2013-08-15 01:22:47 UTC) #6
kaanb
On 2013/08/15 01:22:47, sievers wrote: > On 2013/08/15 01:21:04, kaanb wrote: > > > https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc ...
7 years, 4 months ago (2013-08-15 01:30:13 UTC) #7
no sievers
On 2013/08/15 01:30:13, kaanb wrote: > On 2013/08/15 01:22:47, sievers wrote: > > On 2013/08/15 ...
7 years, 4 months ago (2013-08-15 01:32:27 UTC) #8
no sievers
https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/mapped_memory_unittest.cc File gpu/command_buffer/client/mapped_memory_unittest.cc (right): https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/mapped_memory_unittest.cc#newcode337 gpu/command_buffer/client/mapped_memory_unittest.cc:337: ASSERT_TRUE(mem3); I think this test shows that your patch ...
7 years, 4 months ago (2013-08-15 01:43:42 UTC) #9
no sievers
https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/mapped_memory_unittest.cc File gpu/command_buffer/client/mapped_memory_unittest.cc (right): https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/mapped_memory_unittest.cc#newcode337 gpu/command_buffer/client/mapped_memory_unittest.cc:337: ASSERT_TRUE(mem3); On 2013/08/15 01:43:42, sievers wrote: > I think ...
7 years, 4 months ago (2013-08-15 01:49:06 UTC) #10
piman
https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc#newcode156 gpu/command_buffer/client/gles2_implementation.cc:156: #if defined(OS_ANDROID) On 2013/08/15 01:21:05, kaanb wrote: > On ...
7 years, 4 months ago (2013-08-15 02:49:03 UTC) #11
kaanb
https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/23130004/diff/11001/gpu/command_buffer/client/gles2_implementation.cc#newcode156 gpu/command_buffer/client/gles2_implementation.cc:156: #if defined(OS_ANDROID) On 2013/08/15 02:49:03, piman wrote: > On ...
7 years, 4 months ago (2013-08-16 22:50:43 UTC) #12
piman
LGTM + one thing. https://codereview.chromium.org/23130004/diff/27001/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc File content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc (right): https://codereview.chromium.org/23130004/diff/27001/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc#newcode303 content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc:303: mapped_memory_limit_ = mapped_memory_limit; This is ...
7 years, 4 months ago (2013-08-19 21:44:21 UTC) #13
kaanb
https://codereview.chromium.org/23130004/diff/27001/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc File content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc (right): https://codereview.chromium.org/23130004/diff/27001/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc#newcode303 content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc:303: mapped_memory_limit_ = mapped_memory_limit; On 2013/08/19 21:44:21, piman wrote: > ...
7 years, 4 months ago (2013-08-19 21:56:15 UTC) #14
no sievers
https://codereview.chromium.org/23130004/diff/27001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (left): https://codereview.chromium.org/23130004/diff/27001/gpu/command_buffer/client/gles2_implementation.cc#oldcode152 gpu/command_buffer/client/gles2_implementation.cc:152: SetSharedMemoryChunkSizeMultiple(1024 * 1024 * 2); Why are you removing ...
7 years, 4 months ago (2013-08-19 21:57:44 UTC) #15
epenner
Quick drive-by, and one extra meta comment: This limit is probably good to have, but ...
7 years, 4 months ago (2013-08-19 22:05:52 UTC) #16
kaanb
https://codereview.chromium.org/23130004/diff/27001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (left): https://codereview.chromium.org/23130004/diff/27001/gpu/command_buffer/client/gles2_implementation.cc#oldcode152 gpu/command_buffer/client/gles2_implementation.cc:152: SetSharedMemoryChunkSizeMultiple(1024 * 1024 * 2); On 2013/08/19 21:57:44, sievers ...
7 years, 4 months ago (2013-08-20 01:23:43 UTC) #17
kaanb
+raymes for ppapi/ changes PTAL
7 years, 4 months ago (2013-08-20 01:28:54 UTC) #18
no sievers
lgtm with a few nits an suggestions. thanks! I think I like it a bit ...
7 years, 4 months ago (2013-08-20 02:46:54 UTC) #19
piman
2 nits left for me https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/fenced_allocator.cc File gpu/command_buffer/client/fenced_allocator.cc (right): https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/fenced_allocator.cc#newcode97 gpu/command_buffer/client/fenced_allocator.cc:97: if (blocks_[index].state == IN_USE) ...
7 years, 4 months ago (2013-08-20 02:56:16 UTC) #20
raymes
lgtm On Tue, Aug 20, 2013 at 11:28 AM, <kaanb@chromium.org> wrote: > +raymes for ppapi/ ...
7 years, 4 months ago (2013-08-20 03:01:41 UTC) #21
no sievers
https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/mapped_memory.cc File gpu/command_buffer/client/mapped_memory.cc (right): https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/mapped_memory.cc#newcode41 gpu/command_buffer/client/mapped_memory.cc:41: GPU_DCHECK(shm_offset); Can you put 'if (size <= allocated_memory_)' around ...
7 years, 4 months ago (2013-08-20 15:59:17 UTC) #22
epenner
https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/mapped_memory.cc File gpu/command_buffer/client/mapped_memory.cc (right): https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/mapped_memory.cc#newcode61 gpu/command_buffer/client/mapped_memory.cc:61: (allocated_memory_ - total_bytes_in_use) >= max_free_bytes_) { Please add a ...
7 years, 4 months ago (2013-08-20 18:02:03 UTC) #23
kaanb
https://codereview.chromium.org/23130004/diff/46001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/23130004/diff/46001/content/browser/renderer_host/compositor_impl_android.cc#newcode394 content/browser/renderer_host/compositor_impl_android.cc:394: 64 * 1024 // mapped memory limit On 2013/08/20 ...
7 years, 4 months ago (2013-08-20 22:15:46 UTC) #24
piman
https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/fenced_allocator.cc File gpu/command_buffer/client/fenced_allocator.cc (right): https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/fenced_allocator.cc#newcode166 gpu/command_buffer/client/fenced_allocator.cc:166: return blocks_.size() != 1 || blocks_[0].state != FREE; On ...
7 years, 4 months ago (2013-08-20 22:26:13 UTC) #25
no sievers
https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/fenced_allocator.cc File gpu/command_buffer/client/fenced_allocator.cc (right): https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/fenced_allocator.cc#newcode166 gpu/command_buffer/client/fenced_allocator.cc:166: return blocks_.size() != 1 || blocks_[0].state != FREE; On ...
7 years, 4 months ago (2013-08-20 22:39:37 UTC) #26
kaanb
https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/fenced_allocator.cc File gpu/command_buffer/client/fenced_allocator.cc (right): https://codereview.chromium.org/23130004/diff/46001/gpu/command_buffer/client/fenced_allocator.cc#newcode166 gpu/command_buffer/client/fenced_allocator.cc:166: return blocks_.size() != 1 || blocks_[0].state != FREE; On ...
7 years, 4 months ago (2013-08-20 22:40:52 UTC) #27
no sievers
lgtm https://codereview.chromium.org/23130004/diff/42003/gpu/command_buffer/client/mapped_memory.h File gpu/command_buffer/client/mapped_memory.h (right): https://codereview.chromium.org/23130004/diff/42003/gpu/command_buffer/client/mapped_memory.h#newcode118 gpu/command_buffer/client/mapped_memory.h:118: size_t memory_limit); nit: also unused_memory_reclaim_limit here and move ...
7 years, 4 months ago (2013-08-20 22:48:10 UTC) #28
piman
lgtm
7 years, 4 months ago (2013-08-20 22:48:29 UTC) #29
kaanb
https://codereview.chromium.org/23130004/diff/42003/gpu/command_buffer/client/mapped_memory.h File gpu/command_buffer/client/mapped_memory.h (right): https://codereview.chromium.org/23130004/diff/42003/gpu/command_buffer/client/mapped_memory.h#newcode118 gpu/command_buffer/client/mapped_memory.h:118: size_t memory_limit); On 2013/08/20 22:48:10, sievers wrote: > nit: ...
7 years, 4 months ago (2013-08-20 22:56:01 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kaanb@chromium.org/23130004/93001
7 years, 4 months ago (2013-08-20 22:59:30 UTC) #31
commit-bot: I haz the power
Failed to apply patch for gpu/command_buffer/client/gles2_implementation.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 4 months ago (2013-08-20 22:59:51 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kaanb@chromium.org/23130004/73001
7 years, 4 months ago (2013-08-20 23:10:15 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kaanb@chromium.org/23130004/76001
7 years, 4 months ago (2013-08-21 00:04:17 UTC) #34
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 4 months ago (2013-08-21 01:05:24 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kaanb@chromium.org/23130004/110001
7 years, 4 months ago (2013-08-21 04:43:43 UTC) #36
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 4 months ago (2013-08-21 06:41:10 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kaanb@chromium.org/23130004/129001
7 years, 4 months ago (2013-08-21 07:07:23 UTC) #38
commit-bot: I haz the power
Failed to trigger a try job on win_x64_rel HTTP Error 400: Bad Request
7 years, 4 months ago (2013-08-21 08:04:55 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kaanb@chromium.org/23130004/120001
7 years, 4 months ago (2013-08-21 08:05:26 UTC) #40
commit-bot: I haz the power
7 years, 4 months ago (2013-08-21 10:51:54 UTC) #41
Message was sent while issue was closed.
Change committed as 218693

Powered by Google App Engine
This is Rietveld 408576698