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

Issue 2350423003: [Tentaive patch for discussion] Add Purge+Suspend metrics as UMA.

Created:
4 years, 3 months ago by tasak
Modified:
4 years, 2 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, wfh+watch_chromium.org, jam, blink-reviews, dglazkov+blink, darin-cc_chromium.org, asvitkine+watch_chromium.org, tracing+reviews_chromium.org, kinuko+watch, blink-reviews-api_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Tentaive patch for discussion] Add Purge+Suspend metrics as UMA. Discussion point: - Do we need two UMA for each allocator, i.e. Shrink and Growth? - [partition alloc] is it better to use totalActiveBytes or totalResidentBytes? - [blinkGC] is it better to use totalBytes or totalAllocatedBytes? BUG=635419 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.perf:android_s5_perf_cq;master.tryserver.chromium.perf:linux_perf_cq;master.tryserver.chromium.perf:mac_retina_perf_cq;master.tryserver.chromium.perf:winx64_10_perf_cq

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add v8 heap usage #

Total comments: 4

Patch Set 3 : Add malloc_statistics #

Total comments: 3

Patch Set 4 : Add TODO #

Patch Set 5 : Fixed Windows build failure. #

Patch Set 6 : Add UMA to tab_manager #

Total comments: 2

Patch Set 7 : Fixed comment. #

Patch Set 8 : Fixing build error #

Patch Set 9 : Fixed Mac build failure #

Patch Set 10 : Fixed misuse of CanPurgeAndSuspend #

Unified diffs Side-by-side diffs Delta from patch set Stats (+401 lines, -3 lines) Patch
M chrome/browser/memory/tab_manager.h View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/memory/tab_manager.cc View 1 2 3 4 5 6 7 8 9 3 chunks +65 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M content/child/child_discardable_shared_memory_manager.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M content/child/child_discardable_shared_memory_manager.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_features.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_features.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +133 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/web/WebMemoryStatistics.cpp View 1 1 chunk +53 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/web/WebMemoryStatistics.h View 1 chunk +31 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 1 chunk +65 lines, -0 lines 0 comments Download

Messages

Total messages: 70 (52 generated)
tasak
4 years, 3 months ago (2016-09-20 11:50:34 UTC) #4
haraken
+isherman for a UMA question. See render_thread_impl.cc. For Blink GC, I'd use totalAllocatedObjectSize + totalMarkedObjectSize. ...
4 years, 3 months ago (2016-09-20 12:19:15 UTC) #8
tasak
https://codereview.chromium.org/2350423003/diff/1/third_party/WebKit/Source/web/WebMemoryStatistics.cpp File third_party/WebKit/Source/web/WebMemoryStatistics.cpp (right): https://codereview.chromium.org/2350423003/diff/1/third_party/WebKit/Source/web/WebMemoryStatistics.cpp#newcode50 third_party/WebKit/Source/web/WebMemoryStatistics.cpp:50: statistics.blinkGCTotalAllocatedBytes = ProcessHeap::totalMarkedObjectSize() + ProcessHeap::totalMarkedObjectSize(); On 2016/09/20 12:19:15, haraken ...
4 years, 3 months ago (2016-09-21 06:50:43 UTC) #14
haraken
Overall looks good. We might want to get a metric of V8's memory on the ...
4 years, 3 months ago (2016-09-21 07:37:49 UTC) #17
Ilya Sherman
https://codereview.chromium.org/2350423003/diff/1/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2350423003/diff/1/content/renderer/render_thread_impl.cc#newcode1817 content/renderer/render_thread_impl.cc:1817: UMA_HISTOGRAM_MEMORY_KB("PurgeAndSuspend.TotalGrowth", -total_diff); On 2016/09/20 12:19:14, haraken wrote: > > ...
4 years, 3 months ago (2016-09-21 21:15:48 UTC) #18
bashi
https://codereview.chromium.org/2350423003/diff/60001/base/trace_event/malloc_dump_provider.h File base/trace_event/malloc_dump_provider.h (right): https://codereview.chromium.org/2350423003/diff/60001/base/trace_event/malloc_dump_provider.h#newcode52 base/trace_event/malloc_dump_provider.h:52: static MallocStatistics GetStatistics(); I'd propose to have a separate ...
4 years, 3 months ago (2016-09-22 23:28:26 UTC) #19
Primiano Tucci (use gerrit)
Hmm honestly it looks to me this patch is adding a lot of churn here ...
4 years, 3 months ago (2016-09-23 09:24:34 UTC) #24
tasak
Thank you, Primiano. On 2016/09/23 09:24:34, Primiano Tucci wrote: > Hmm honestly it looks to ...
4 years, 3 months ago (2016-09-23 10:12:18 UTC) #25
Primiano Tucci (use gerrit)
> So is it possible to start purge+suspend experiment and the task in parallel? Well ...
4 years, 3 months ago (2016-09-23 19:31:09 UTC) #26
tasak
>Well at this point I wonder: can we just use the existing memory UMA (which ...
4 years, 2 months ago (2016-09-26 05:34:11 UTC) #27
Primiano Tucci (use gerrit)
On Mon, Sep 26, 2016 at 6:34 AM, tasak via tracing <tracing@chromium.org> wrote: > I ...
4 years, 2 months ago (2016-09-26 18:34:57 UTC) #36
Primiano Tucci (use gerrit)
On Mon, Sep 26, 2016 at 6:34 AM, tasak via tracing <tracing@chromium.org> wrote: > I ...
4 years, 2 months ago (2016-09-26 18:34:58 UTC) #37
tasak
I found that a finch experiment supports A/B testing. So I modified UMAs, i.e. replaced ...
4 years, 2 months ago (2016-09-28 09:55:04 UTC) #42
Primiano Tucci (use gerrit)
> So I would like to understand how the patch causes problems to other projects ...
4 years, 2 months ago (2016-09-28 15:29:28 UTC) #48
Sami
https://codereview.chromium.org/2350423003/diff/160001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2350423003/diff/160001/content/renderer/render_thread_impl.cc#newcode1764 content/renderer/render_thread_impl.cc:1764: base::TimeDelta::FromSeconds(15)); What if the renderer is unsuspended before this ...
4 years, 2 months ago (2016-09-28 16:01:08 UTC) #50
Ilya Sherman
Is this ready for me to review, or should I wait until some more basic ...
4 years, 2 months ago (2016-09-28 23:25:10 UTC) #51
tasak
Thank you for review. https://codereview.chromium.org/2350423003/diff/160001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2350423003/diff/160001/content/renderer/render_thread_impl.cc#newcode1764 content/renderer/render_thread_impl.cc:1764: base::TimeDelta::FromSeconds(15)); On 2016/09/28 16:01:08, Sami ...
4 years, 2 months ago (2016-09-29 02:37:51 UTC) #52
haraken
4 years, 2 months ago (2016-09-29 02:39:04 UTC) #53
On 2016/09/29 02:37:51, tasak wrote:
> Thank you for review.
> 
>
https://codereview.chromium.org/2350423003/diff/160001/content/renderer/rende...
> File content/renderer/render_thread_impl.cc (right):
> 
>
https://codereview.chromium.org/2350423003/diff/160001/content/renderer/rende...
> content/renderer/render_thread_impl.cc:1764:
base::TimeDelta::FromSeconds(15));
> On 2016/09/28 16:01:08, Sami wrote:
> > What if the renderer is unsuspended before this task runs?
> 
> OnDumpMemoryUsage checks is_renderer_suspended. So OnDumpMemoryUsage does
> nothing if is_renderer_suspended is false.
> 
> > Does purging involve multiple posted tasks? If not, we could post a regular
> > non-delayed task which runs after the current one.
> 
> Yeah, currently purging (depending on MemoryPressureListener) involves
multiple
> posted tasks and does not support reply callback.
> 
> > nit: comment says 5 seconds.
> 
> Thank you.
> Done.

If primiano and sami are fine with PS7, I'm fine with PS7.

Powered by Google App Engine
This is Rietveld 408576698