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

Issue 2734193002: memory-infra: Finish moving to Mojo (2nd attempt) (Closed)

Created:
3 years, 9 months ago by chiniforooshan
Modified:
3 years, 9 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, vmpstr+watch_chromium.org, wfh+watch_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, tracing+reviews_chromium.org, darin (slow to review), chrome-grc-reviews_chromium.org, hjd
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

memory-infra: Finish moving to Mojo (2nd attempt) This was originally landed in https://codereview.chromium.org/2694083005. But, it broke webview perf tests, and so, it was reverted. It turned out that in some scenarios, the memory dump manager is not initialized early enough (in the browser process). So, now, I initialize it as soon as the UI thread is created. Modifications since the original CL are: - The Coordinator service is created when the UI thread is created (browser_main_loop.cc). - When Coordinator is created, it initializes memory dump manager's TPID (memory_dump_manager_delegate_impl.cc). - To avoid dependency from //services/resource_coordinator to //content the definition of the service TPID is moved from child_process_host.h to constants.mojom. I tested the CL by building for Android and running the following with an android device attached: run_benchmark memory.top_10_mobile --browser=android-webview --also-run-disabled-tests In the original reverted CL, the above command results in 'Unable to obtain memory dump' exceptions. With this CL the test runs successfully. An example interaction diagram (to see the large image, click on it): https://docs.google.com/document/d/1Mz64egjuZ4WsYw9AKKWdTvl0Il706EWdCy24V87R_F4/edit#heading=h.1ku5wcoxqifr BUG=679830, 697773, 697384, 697062 Review-Url: https://codereview.chromium.org/2734193002 Cr-Commit-Position: refs/heads/master@{#455866} Committed: https://chromium.googlesource.com/chromium/src/+/0a3a302b6df6458b21b3ce0951c5251413cadc48

Patch Set 1 : original CL #

Patch Set 2 : original CL, rebased #

Patch Set 3 : fixed CL #

Total comments: 22

Patch Set 4 : review #

Patch Set 5 : doc #

Patch Set 6 : rebase #

Patch Set 7 : nit #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+403 lines, -954 lines) Patch
M base/trace_event/memory_dump_manager.h View 6 chunks +15 lines, -11 lines 0 comments Download
M base/trace_event/memory_dump_manager.cc View 5 chunks +3 lines, -21 lines 0 comments Download
M base/trace_event/memory_dump_manager_unittest.cc View 6 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 3 chunks +17 lines, -0 lines 0 comments Download
M components/BUILD.gn View 1 1 chunk +0 lines, -1 line 0 comments Download
M components/tracing/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
D components/tracing/child/child_memory_dump_manager_delegate_impl.h View 1 chunk +0 lines, -85 lines 0 comments Download
D components/tracing/child/child_memory_dump_manager_delegate_impl.cc View 1 chunk +0 lines, -114 lines 0 comments Download
M components/tracing/child/child_trace_message_filter.h View 4 chunks +0 lines, -17 lines 0 comments Download
M components/tracing/child/child_trace_message_filter.cc View 7 chunks +14 lines, -63 lines 0 comments Download
D components/tracing/child/child_trace_message_filter_browsertest.cc View 1 chunk +0 lines, -326 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_main.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/gpu/browser_gpu_channel_host_factory.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/tracing/trace_message_filter.h View 3 chunks +0 lines, -8 lines 0 comments Download
M content/browser/tracing/trace_message_filter.cc View 3 chunks +0 lines, -29 lines 0 comments Download
M content/browser/tracing/tracing_controller_impl.h View 1 2 3 4 5 6 chunks +0 lines, -33 lines 0 comments Download
M content/browser/tracing/tracing_controller_impl.cc View 4 chunks +0 lines, -172 lines 0 comments Download
M content/child/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/child/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/common/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/common/child_process_host_impl.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/child_process_host_impl.cc View 1 2 3 chunks +2 lines, -4 lines 0 comments Download
M content/public/app/mojo/content_browser_manifest.json View 1 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/common/child_process_host.h View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M services/resource_coordinator/BUILD.gn View 2 chunks +4 lines, -0 lines 0 comments Download
M services/resource_coordinator/memory/coordinator/coordinator_impl.h View 1 2 3 4 5 6 4 chunks +9 lines, -4 lines 0 comments Download
M services/resource_coordinator/memory/coordinator/coordinator_impl.cc View 1 2 3 4 chunks +18 lines, -18 lines 0 comments Download
M services/resource_coordinator/memory/coordinator/coordinator_impl_unittest.cc View 1 2 3 7 chunks +12 lines, -8 lines 0 comments Download
M services/resource_coordinator/public/cpp/memory/memory_dump_manager_delegate_impl.h View 1 2 3 4 2 chunks +56 lines, -8 lines 0 comments Download
M services/resource_coordinator/public/cpp/memory/memory_dump_manager_delegate_impl.cc View 1 2 3 2 chunks +72 lines, -11 lines 0 comments Download
A services/resource_coordinator/public/cpp/memory/memory_dump_manager_delegate_impl_unittest.cc View 1 2 3 1 chunk +136 lines, -0 lines 0 comments Download
M services/resource_coordinator/public/interfaces/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A services/resource_coordinator/public/interfaces/memory/constants.mojom View 1 2 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (11 generated)
chiniforooshan
Please review this CL that has the old CL for ease of comparison. I will ...
3 years, 9 months ago (2017-03-07 16:52:03 UTC) #2
kenrb
ipc lgtm
3 years, 9 months ago (2017-03-08 00:52:50 UTC) #3
Primiano Tucci (use gerrit)
LGTM with some comments, would feel a bit safer if ssid did a 2nd pass ...
3 years, 9 months ago (2017-03-08 12:05:43 UTC) #4
ssid
Thanks for uploading both patch sets side by side. I do not quite understand how ...
3 years, 9 months ago (2017-03-08 18:37:13 UTC) #5
chiniforooshan
Thanks Primiano. I added a brief doc to the beginning of memory_dump_manager_delegate_impl.h. I'll add an ...
3 years, 9 months ago (2017-03-08 19:03:43 UTC) #6
chiniforooshan
Added an example interaction diagram here: https://docs.google.com/document/d/1Mz64egjuZ4WsYw9AKKWdTvl0Il706EWdCy24V87R_F4/edit#heading=h.1ku5wcoxqifr Please click on the image to see the ...
3 years, 9 months ago (2017-03-08 21:10:55 UTC) #8
chiniforooshan
About the fix: my understanding of https://cs.chromium.org/chromium/src/content/app/content_main_runner.cc?dr=C&l=485 is that BrowserMain does not run on Android. ...
3 years, 9 months ago (2017-03-08 22:39:03 UTC) #9
ssid
lgtm, thanks https://codereview.chromium.org/2734193002/diff/40001/services/resource_coordinator/public/cpp/memory/memory_dump_manager_delegate_impl.cc File services/resource_coordinator/public/cpp/memory/memory_dump_manager_delegate_impl.cc (right): https://codereview.chromium.org/2734193002/diff/40001/services/resource_coordinator/public/cpp/memory/memory_dump_manager_delegate_impl.cc#newcode79 services/resource_coordinator/public/cpp/memory/memory_dump_manager_delegate_impl.cc:79: mojom::kServiceTracingProcessId); On 2017/03/08 22:39:03, chiniforooshan wrote: > ...
3 years, 9 months ago (2017-03-09 00:23:16 UTC) #10
jam
lgtm
3 years, 9 months ago (2017-03-09 16:40:48 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2734193002/120001
3 years, 9 months ago (2017-03-09 17:36:53 UTC) #14
commit-bot: I haz the power
Failed to apply patch for services/resource_coordinator/public/interfaces/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-03-09 19:06:09 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2734193002/140001
3 years, 9 months ago (2017-03-09 19:25:39 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/364124)
3 years, 9 months ago (2017-03-09 19:45:18 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2734193002/140001
3 years, 9 months ago (2017-03-09 20:34:15 UTC) #23
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://chromium.googlesource.com/chromium/src/+/0a3a302b6df6458b21b3ce0951c5251413cadc48
3 years, 9 months ago (2017-03-09 21:20:56 UTC) #26
msw
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/2738093003/ by msw@chromium.org. ...
3 years, 9 months ago (2017-03-09 23:30:39 UTC) #27
Geoff Lang
3 years, 9 months ago (2017-03-09 23:32:54 UTC) #28
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/2741723003/ by geofflang@chromium.org.

The reason for reverting is: Causing assertion failures on the GPU FYI
waterfall:
https://build.chromium.org/p/chromium.gpu.fyi/builders/Mac%20Debug%20%28Intel....

Powered by Google App Engine
This is Rietveld 408576698