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

Issue 1306243003: Add support to create memory allocator dump in base::DiscardableMemory (Closed)

Created:
5 years, 4 months ago by ssid
Modified:
5 years, 4 months ago
CC:
chromium-reviews, darin-cc_chromium.org, gavinp+memory_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support to create memory allocator dump in base::DiscardableMemory The clients that use discardable memory need to make a memory dump for tracing. But, the client do not know if the memory is purged or not. So, discardable manager dumps the live segments and the clients would dump all the allocations, without the knowledge from the manager. To make the memory dumps consistent, new api is added to the base::discardable memory interface to create a memory allocator. this method creates dump only if the memory is live according to the manager. Note: This still does not mean that the memory is resident in the system, and the OS could have purged this discardable segment. This method only helps to make the memory dumps consistent across all systems. Also, the clients may not keep track the size of each segment they allocate. So, this api adds the size when creating the dump. See doc https://goo.gl/AFSTRP. BUG=503168 Committed: https://crrev.com/3e37155aca48e63f0dcae697de6fd2b9cdf2782a Cr-Commit-Position: refs/heads/master@{#345332}

Patch Set 1 #

Patch Set 2 : Nits. #

Total comments: 23

Patch Set 3 : Addressing comments. #

Total comments: 8

Patch Set 4 : comments. #

Patch Set 5 : Nits. #

Total comments: 4

Patch Set 6 : Comment change. #

Patch Set 7 : Fixing gpu NonDiscardableMemory. #

Patch Set 8 : Adding const. #

Patch Set 9 : Fix html_viewer. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+177 lines, -1 line) Patch
M base/memory/discardable_memory.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -0 lines 0 comments Download
M base/test/test_discardable_memory_allocator.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M components/html_viewer/discardable_memory_allocator.cc View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -0 lines 0 comments Download
M content/child/child_discardable_shared_memory_manager.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/child/child_discardable_shared_memory_manager.cc View 1 2 3 4 5 6 7 2 chunks +15 lines, -0 lines 0 comments Download
M content/common/discardable_shared_memory_heap.h View 1 2 2 chunks +14 lines, -0 lines 0 comments Download
M content/common/discardable_shared_memory_heap.cc View 1 2 3 2 chunks +43 lines, -0 lines 0 comments Download
M content/common/discardable_shared_memory_heap_unittest.cc View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
M content/common/host_discardable_shared_memory_manager.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M gpu/skia_runner/in_process_graphics_system.cc View 1 2 3 4 5 6 7 8 2 chunks +21 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 29 (7 generated)
ssid
PTAL, Thanks.
5 years, 4 months ago (2015-08-21 17:08:31 UTC) #2
reveman
https://codereview.chromium.org/1306243003/diff/20001/base/memory/discardable_memory.h File base/memory/discardable_memory.h (right): https://codereview.chromium.org/1306243003/diff/20001/base/memory/discardable_memory.h#newcode68 base/memory/discardable_memory.h:68: // Returns nullptr if the memory is purged by ...
5 years, 4 months ago (2015-08-21 18:05:24 UTC) #3
ssid
Replies inline. Thanks. https://codereview.chromium.org/1306243003/diff/20001/base/memory/discardable_memory.h File base/memory/discardable_memory.h (right): https://codereview.chromium.org/1306243003/diff/20001/base/memory/discardable_memory.h#newcode68 base/memory/discardable_memory.h:68: // Returns nullptr if the memory ...
5 years, 4 months ago (2015-08-21 19:02:30 UTC) #4
reveman
https://codereview.chromium.org/1306243003/diff/20001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1306243003/diff/20001/content/common/discardable_shared_memory_heap.cc#newcode428 content/common/discardable_shared_memory_heap.cc:428: std::for_each( On 2015/08/21 at 19:02:30, ssid wrote: > On ...
5 years, 4 months ago (2015-08-22 14:21:16 UTC) #5
ssid
Thanks, one more concern in reply. https://codereview.chromium.org/1306243003/diff/20001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1306243003/diff/20001/content/common/discardable_shared_memory_heap.cc#newcode428 content/common/discardable_shared_memory_heap.cc:428: std::for_each( On 2015/08/22 ...
5 years, 4 months ago (2015-08-22 14:50:19 UTC) #6
reveman
https://codereview.chromium.org/1306243003/diff/20001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1306243003/diff/20001/content/common/discardable_shared_memory_heap.cc#newcode428 content/common/discardable_shared_memory_heap.cc:428: std::for_each( On 2015/08/22 at 14:50:19, ssid wrote: > On ...
5 years, 4 months ago (2015-08-22 15:04:07 UTC) #7
ssid
https://codereview.chromium.org/1306243003/diff/20001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1306243003/diff/20001/content/common/discardable_shared_memory_heap.cc#newcode428 content/common/discardable_shared_memory_heap.cc:428: std::for_each( On 2015/08/22 15:04:07, reveman wrote: > On 2015/08/22 ...
5 years, 4 months ago (2015-08-22 15:13:00 UTC) #8
ssid
Thanks, PTAL. https://codereview.chromium.org/1306243003/diff/20001/base/memory/discardable_memory.h File base/memory/discardable_memory.h (right): https://codereview.chromium.org/1306243003/diff/20001/base/memory/discardable_memory.h#newcode68 base/memory/discardable_memory.h:68: // Returns nullptr if the memory is ...
5 years, 4 months ago (2015-08-24 14:52:10 UTC) #9
reveman
https://codereview.chromium.org/1306243003/diff/40001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1306243003/diff/40001/content/common/discardable_shared_memory_heap.cc#newcode436 content/common/discardable_shared_memory_heap.cc:436: std::for_each( can you use find_if instead? I think that ...
5 years, 4 months ago (2015-08-24 16:50:06 UTC) #10
ssid
Thanks made changes. https://codereview.chromium.org/1306243003/diff/40001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1306243003/diff/40001/content/common/discardable_shared_memory_heap.cc#newcode436 content/common/discardable_shared_memory_heap.cc:436: std::for_each( On 2015/08/24 16:50:06, reveman wrote: ...
5 years, 4 months ago (2015-08-24 17:21:13 UTC) #12
reveman
lgtm
5 years, 4 months ago (2015-08-24 17:29:02 UTC) #13
ssid
+thakis for in base/memory +avi for content/ Thanks.
5 years, 4 months ago (2015-08-24 17:32:01 UTC) #15
Nico
base/ lgtm
5 years, 4 months ago (2015-08-24 17:36:29 UTC) #16
Avi (use Gerrit)
lgtm With nit. https://codereview.chromium.org/1306243003/diff/100001/base/memory/discardable_memory.h File base/memory/discardable_memory.h (right): https://codereview.chromium.org/1306243003/diff/100001/base/memory/discardable_memory.h#newcode13 base/memory/discardable_memory.h:13: namespace trace_event { newline before this ...
5 years, 4 months ago (2015-08-24 17:43:44 UTC) #17
ssid
Thanks. https://codereview.chromium.org/1306243003/diff/100001/base/memory/discardable_memory.h File base/memory/discardable_memory.h (right): https://codereview.chromium.org/1306243003/diff/100001/base/memory/discardable_memory.h#newcode13 base/memory/discardable_memory.h:13: namespace trace_event { On 2015/08/24 17:43:43, Avi wrote: ...
5 years, 4 months ago (2015-08-24 17:53:55 UTC) #18
ssid
+hendrikw for skia_runner/ PTAL. Thanks
5 years, 4 months ago (2015-08-24 19:35:36 UTC) #20
hendrikw
On 2015/08/24 19:35:36, ssid wrote: > +hendrikw for skia_runner/ > > PTAL. Thanks LGTM
5 years, 4 months ago (2015-08-24 22:00:31 UTC) #21
ssid
+jam for html_viewer/. PTAL, Thanks.
5 years, 4 months ago (2015-08-24 22:06:35 UTC) #23
jam
lgtm
5 years, 4 months ago (2015-08-25 15:27:18 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1306243003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1306243003/180001
5 years, 4 months ago (2015-08-25 15:27:58 UTC) #27
commit-bot: I haz the power
Committed patchset #9 (id:180001)
5 years, 4 months ago (2015-08-25 15:33:25 UTC) #28
commit-bot: I haz the power
5 years, 4 months ago (2015-08-25 15:35:02 UTC) #29
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/3e37155aca48e63f0dcae697de6fd2b9cdf2782a
Cr-Commit-Position: refs/heads/master@{#345332}

Powered by Google App Engine
This is Rietveld 408576698