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

Issue 2064463002: Mojo interface/service for Leak Detector on remote process (Closed)

Created:
4 years, 6 months ago by Simon Que
Modified:
4 years, 5 months ago
CC:
Aaron Boodman, abarth-chromium, asvitkine+watch_chromium.org, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), dcheng, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo interface/service for Leak Detector on remote process This interface allows an instance of the Runtime Memory Leak Detector (components/metrics/leak_detector) to run on a non-browser process, such as a tab (renderer) process. The interface provides two function APIs: - GetParams(): Returns the profiling parameters used for initializing LeakDetector. - SendLeakReports(): Passes an array of leak reports to the browser process, where they can be attached to the UMA protobuf. Also added an implementation of the Mojo interface, LeakDetectorRemoteController, that implements the Mojo interface LeakDetectorRemote. This class provides a bridge between the browser and renderer processes. It also allows a single instance of LeakDetectorController to provide leak detector params to the renderer process and receive leak reports from the renderer process. BUG=chromium:615223 TEST=Build successfully, unit tests pass R=wfh@chromium.org Committed: https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06 Cr-Commit-Position: refs/heads/master@{#406466}

Patch Set 1 #

Patch Set 2 : Register service with Chrome browser #

Patch Set 3 : Add remote process shutdown function to mojo interface #

Patch Set 4 : LeakDetectorRemote comments #

Patch Set 5 : Delete shutdown function in mojo interface #

Total comments: 1

Patch Set 6 : Rebased #

Patch Set 7 : Add renderer-side client #

Total comments: 1

Patch Set 8 : Add comment about unretained binding; Decompose protobufs into mojo structs #

Total comments: 17

Patch Set 9 : Create BUILD.gn for components/metrics/leak_detector; update comments #

Patch Set 10 : Refactor to add source process type to incoming leak reports #

Patch Set 11 : Move mojom defs to metrics::mojom namespace #

Total comments: 2

Patch Set 12 : const GetParams; swap and clear stored_reports_ vector #

Total comments: 3

Patch Set 13 : Create new class for protobuf-mojo conversions, with unit test #

Patch Set 14 : Rebased; Use ipc/SECURITY_OWNERS for mojo; git cl format #

Patch Set 15 : Call SetToEmpty() for empty mojo fields; Fix Mojo-to-report conversion #

Patch Set 16 : Create BUILD.gn for chrome/renderer/leak_detector #

Total comments: 6

Patch Set 17 : Turn ProtobufToMojoConverter into namespace; Fix path in chrome_renderer.gypi #

Patch Set 18 : Rebased; leak_detector dependency on interfaces for Mojo #

Patch Set 19 : Rebased; Use new generated C++ bindings for Mojo arrays #

Patch Set 20 : Update ProtobufToMojoConverterTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+689 lines, -61 lines) Patch
M chrome/app/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/metrics/leak_detector/leak_detector_controller.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/metrics/leak_detector/leak_detector_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +27 lines, -6 lines 0 comments Download
A chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +66 lines, -0 lines 0 comments Download
A chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +71 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/renderer/leak_detector/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/renderer/leak_detector/leak_detector_remote_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/renderer/leak_detector/leak_detector_remote_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +55 lines, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M components/metrics.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +12 lines, -0 lines 0 comments Download
M components/metrics/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +1 line, -52 lines 0 comments Download
A components/metrics/leak_detector/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +65 lines, -0 lines 0 comments Download
M components/metrics/leak_detector/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
A components/metrics/leak_detector/leak_detector.mojom View 1 2 3 4 5 6 7 8 9 10 1 chunk +40 lines, -0 lines 0 comments Download
A components/metrics/leak_detector/protobuf_to_mojo_converter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +36 lines, -0 lines 0 comments Download
A components/metrics/leak_detector/protobuf_to_mojo_converter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +67 lines, -0 lines 0 comments Download
A components/metrics/leak_detector/protobuf_to_mojo_converter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +139 lines, -0 lines 0 comments Download

Messages

Total messages: 59 (20 generated)
Simon Que
4 years, 6 months ago (2016-06-11 03:41:08 UTC) #2
Simon Que
On 2016/06/11 03:41:08, Simon Que wrote: Will: I'm thinking that I should add another function ...
4 years, 6 months ago (2016-06-13 13:55:19 UTC) #3
Will Harris
I'm asking some other ipc reviewers whether it's okay to serialize a proto over mojo, ...
4 years, 6 months ago (2016-06-15 22:56:53 UTC) #5
Will Harris
You'll need to break out the proto into mojo fields. see http://www.chromium.org/Home/chromium-security/education/security-tips-for-ipc "don't implement your ...
4 years, 6 months ago (2016-06-16 15:53:48 UTC) #6
Simon Que
On 2016/06/16 15:53:48, Will Harris wrote: > You'll need to break out the proto into ...
4 years, 6 months ago (2016-06-16 19:58:06 UTC) #7
Will Harris
On 2016/06/16 19:58:06, Simon Que wrote: > On 2016/06/16 15:53:48, Will Harris wrote: > > ...
4 years, 6 months ago (2016-06-16 20:00:55 UTC) #8
Simon Que
https://codereview.chromium.org/2064463002/diff/120001/chrome/renderer/BUILD.gn File chrome/renderer/BUILD.gn (right): https://codereview.chromium.org/2064463002/diff/120001/chrome/renderer/BUILD.gn#newcode190 chrome/renderer/BUILD.gn:190: deps += [ Ilya was thinking that this should ...
4 years, 6 months ago (2016-06-17 01:42:40 UTC) #10
Simon Que
Now I need to fill in the |process_type| field of the protobuf to indicate whether ...
4 years, 6 months ago (2016-06-17 07:35:05 UTC) #12
Will Harris
On 2016/06/17 07:35:05, Simon Que wrote: > Now I need to fill in the |process_type| ...
4 years, 6 months ago (2016-06-17 17:53:40 UTC) #13
Ilya Sherman
FYI, I'll be OOO for the next week, so you'll likely want to ask another ...
4 years, 6 months ago (2016-06-17 22:18:20 UTC) #14
Ben Goodger (Google)
¡¡mojom drive-by!! https://codereview.chromium.org/2064463002/diff/140001/components/metrics/leak_detector/leak_detector_remote.mojom File components/metrics/leak_detector/leak_detector_remote.mojom (right): https://codereview.chromium.org/2064463002/diff/140001/components/metrics/leak_detector/leak_detector_remote.mojom#newcode35 components/metrics/leak_detector/leak_detector_remote.mojom:35: interface LeakDetectorRemote { Can we not use ...
4 years, 6 months ago (2016-06-17 22:22:03 UTC) #16
Simon Que
On 2016/06/17 17:53:40, Will Harris wrote: > On 2016/06/17 07:35:05, Simon Que wrote: > > ...
4 years, 6 months ago (2016-06-18 04:17:40 UTC) #17
Simon Que
https://codereview.chromium.org/2064463002/diff/140001/chrome/browser/metrics/leak_detector/leak_detector_controller.h File chrome/browser/metrics/leak_detector/leak_detector_controller.h (right): https://codereview.chromium.org/2064463002/diff/140001/chrome/browser/metrics/leak_detector/leak_detector_controller.h#newcode36 chrome/browser/metrics/leak_detector/leak_detector_controller.h:36: MemoryLeakReportProto::Params GetParams() override; On 2016/06/17 22:18:20, Ilya Sherman (Away ...
4 years, 6 months ago (2016-06-18 04:17:53 UTC) #18
dcheng
https://codereview.chromium.org/2064463002/diff/140001/components/metrics/leak_detector/leak_detector_remote.mojom File components/metrics/leak_detector/leak_detector_remote.mojom (right): https://codereview.chromium.org/2064463002/diff/140001/components/metrics/leak_detector/leak_detector_remote.mojom#newcode35 components/metrics/leak_detector/leak_detector_remote.mojom:35: interface LeakDetectorRemote { On 2016/06/18 04:17:53, Simon Que (Away ...
4 years, 6 months ago (2016-06-18 06:17:08 UTC) #20
Simon Que
On 2016/06/18 06:17:08, dcheng wrote: > https://codereview.chromium.org/2064463002/diff/140001/components/metrics/leak_detector/leak_detector_remote.mojom > File components/metrics/leak_detector/leak_detector_remote.mojom (right): > > https://codereview.chromium.org/2064463002/diff/140001/components/metrics/leak_detector/leak_detector_remote.mojom#newcode35 > ...
4 years, 5 months ago (2016-06-27 07:02:50 UTC) #21
Simon Que
I looked in //url/mojo and //services/shell/tests... the tests there seemed to be for the Mojo ...
4 years, 5 months ago (2016-06-27 16:02:12 UTC) #22
Ben Goodger (Google)
On 2016/06/27 16:02:12, Simon Que (Away June 20-24) wrote: > I looked in //url/mojo and ...
4 years, 5 months ago (2016-06-27 16:52:31 UTC) #23
Ilya Sherman
https://codereview.chromium.org/2064463002/diff/140001/chrome/browser/metrics/leak_detector/leak_detector_controller.h File chrome/browser/metrics/leak_detector/leak_detector_controller.h (right): https://codereview.chromium.org/2064463002/diff/140001/chrome/browser/metrics/leak_detector/leak_detector_controller.h#newcode36 chrome/browser/metrics/leak_detector/leak_detector_controller.h:36: MemoryLeakReportProto::Params GetParams() override; On 2016/06/18 04:17:53, Simon Que (Away ...
4 years, 5 months ago (2016-06-28 21:33:10 UTC) #24
Simon Que
https://codereview.chromium.org/2064463002/diff/140001/chrome/browser/metrics/leak_detector/leak_detector_controller.h File chrome/browser/metrics/leak_detector/leak_detector_controller.h (right): https://codereview.chromium.org/2064463002/diff/140001/chrome/browser/metrics/leak_detector/leak_detector_controller.h#newcode36 chrome/browser/metrics/leak_detector/leak_detector_controller.h:36: MemoryLeakReportProto::Params GetParams() override; On 2016/06/28 21:33:10, Ilya Sherman wrote: ...
4 years, 5 months ago (2016-06-29 02:30:47 UTC) #25
Ilya Sherman
LGTM % file placement nit, which is really not all that important -- mostly just ...
4 years, 5 months ago (2016-06-29 20:35:50 UTC) #26
Simon Que
https://codereview.chromium.org/2064463002/diff/220001/chrome/renderer/BUILD.gn File chrome/renderer/BUILD.gn (right): https://codereview.chromium.org/2064463002/diff/220001/chrome/renderer/BUILD.gn#newcode194 chrome/renderer/BUILD.gn:194: } On 2016/06/29 20:35:50, Ilya Sherman wrote: > I ...
4 years, 5 months ago (2016-06-30 03:15:01 UTC) #27
Simon Que
On 2016/06/27 16:52:31, Ben Goodger (Google) wrote: > On 2016/06/27 16:02:12, Simon Que (Away June ...
4 years, 5 months ago (2016-06-30 06:08:28 UTC) #28
Simon Que
On 2016/06/30 06:08:28, Simon Que wrote: > How about: I extract the conversion functions into ...
4 years, 5 months ago (2016-07-13 01:25:01 UTC) #29
Will Harris
lgtm just edit the TEST= line as you now have tests.
4 years, 5 months ago (2016-07-14 00:05:30 UTC) #30
Will Harris
you just need a chrome/ owner now
4 years, 5 months ago (2016-07-14 00:06:12 UTC) #31
Will Harris
hmm looks like this needs a rebase, I think https://codereview.chromium.org/2099063002 changed chrome/browser/chrome_content_browser_client.cc
4 years, 5 months ago (2016-07-14 00:15:17 UTC) #32
Simon Que
https://codereview.chromium.org/2064463002/diff/220001/chrome/renderer/BUILD.gn File chrome/renderer/BUILD.gn (right): https://codereview.chromium.org/2064463002/diff/220001/chrome/renderer/BUILD.gn#newcode194 chrome/renderer/BUILD.gn:194: } On 2016/06/30 03:15:01, Simon Que wrote: > On ...
4 years, 5 months ago (2016-07-15 22:44:15 UTC) #34
Simon Que
+jochen to review chrome/
4 years, 5 months ago (2016-07-15 22:47:25 UTC) #36
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2064463002/diff/320001/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc File chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc (right): https://codereview.chromium.org/2064463002/diff/320001/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc#newcode26 chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc:26: new LeakDetectorRemoteController(std::move(request)); who owns this? https://codereview.chromium.org/2064463002/diff/320001/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h File chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h (right): ...
4 years, 5 months ago (2016-07-18 11:40:55 UTC) #37
Simon Que
https://codereview.chromium.org/2064463002/diff/320001/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc File chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc (right): https://codereview.chromium.org/2064463002/diff/320001/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc#newcode26 chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc:26: new LeakDetectorRemoteController(std::move(request)); On 2016/07/18 11:40:55, jochen wrote: > who ...
4 years, 5 months ago (2016-07-18 18:50:21 UTC) #38
jochen (gone - plz use gerrit)
lgtm
4 years, 5 months ago (2016-07-19 12:21:25 UTC) #40
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/2064463002/340001
4 years, 5 months ago (2016-07-19 17:57:48 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/233063) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 5 months ago (2016-07-19 18:02:53 UTC) #45
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/2064463002/400001
4 years, 5 months ago (2016-07-20 02:19:34 UTC) #52
commit-bot: I haz the power
Committed patchset #20 (id:400001)
4 years, 5 months ago (2016-07-20 02:24:36 UTC) #54
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-20 02:24:53 UTC) #55
commit-bot: I haz the power
Patchset 20 (id:??) landed as https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06 Cr-Commit-Position: refs/heads/master@{#406466}
4 years, 5 months ago (2016-07-20 02:27:41 UTC) #57
achuithb
On 2016/07/20 02:27:41, commit-bot: I haz the power wrote: > Patchset 20 (id:??) landed as ...
4 years, 5 months ago (2016-07-20 07:23:49 UTC) #58
achuithb
4 years, 5 months ago (2016-07-20 07:24:48 UTC) #59
Message was sent while issue was closed.
A revert of this CL (patchset #20 id:400001) has been created in
https://codereview.chromium.org/2166553003/ by achuith@chromium.org.

The reason for reverting is: crbug.com/629760.

Powered by Google App Engine
This is Rietveld 408576698