Currently enabled on browser process only. Need to enable on Renderer process
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/685b914a3f55fe47863648086e3f4bedd4188814 commit 685b914a3f55fe47863648086e3f4bedd4188814 Author: sque <sque@chromium.org> Date: Fri May 27 21:13:29 2016 Leak detector posts notifications to task runner Instead of posting to the browser process' UI thread, pass in a generic TaskRunner and post the notifications to it. On the browser process, pass in the TaskRunner for the browser process' UI thread. On other processes, a different TaskRunner can be passed in. BUG= chromium:615223 TEST=unit tests pass R=asvitkine@chromium.org, primiano@chromium.org Review-Url: https://codereview.chromium.org/2012393002 Cr-Commit-Position: refs/heads/master@{#396560} [modify] https://crrev.com/685b914a3f55fe47863648086e3f4bedd4188814/chrome/browser/metrics/leak_detector_controller.cc [modify] https://crrev.com/685b914a3f55fe47863648086e3f4bedd4188814/components/metrics/BUILD.gn [modify] https://crrev.com/685b914a3f55fe47863648086e3f4bedd4188814/components/metrics/DEPS [modify] https://crrev.com/685b914a3f55fe47863648086e3f4bedd4188814/components/metrics/leak_detector/leak_detector.cc [modify] https://crrev.com/685b914a3f55fe47863648086e3f4bedd4188814/components/metrics/leak_detector/leak_detector.h [modify] https://crrev.com/685b914a3f55fe47863648086e3f4bedd4188814/components/metrics/leak_detector/leak_detector_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/51e4f33eae448bae4c95fde5a8f16d6d2e6e6960 commit 51e4f33eae448bae4c95fde5a8f16d6d2e6e6960 Author: sque <sque@chromium.org> Date: Tue May 31 04:09:09 2016 Mojo interface 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 in serialized proto format (strings) to the browser process, where they can be attached to the UMA protobuf. BUG= chromium:615223 TEST=Build successfully R=asvitkine@chromium.org Review-Url: https://codereview.chromium.org/2018983004 Cr-Commit-Position: refs/heads/master@{#396780} [modify] https://crrev.com/51e4f33eae448bae4c95fde5a8f16d6d2e6e6960/components/metrics.gypi [modify] https://crrev.com/51e4f33eae448bae4c95fde5a8f16d6d2e6e6960/components/metrics/BUILD.gn [add] https://crrev.com/51e4f33eae448bae4c95fde5a8f16d6d2e6e6960/components/metrics/leak_detector/leak_detector_remote.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/386a3c02dede8c906afd6dbda83e28da48c93f8f commit 386a3c02dede8c906afd6dbda83e28da48c93f8f Author: sque <sque@chromium.org> Date: Fri Jun 03 23:11:04 2016 Add Static Initializer for leak detector TLS This is optional for running leak detector on browser process, but later it will be necessary to run on renderer process. By initializing the pthread TLS system early, we avoid initializing it from within an alloc hook function, in which case it would go into a recursive call loop. BUG= chromium:615223 Review-Url: https://codereview.chromium.org/2023133003 Cr-Commit-Position: refs/heads/master@{#397834} [modify] https://crrev.com/386a3c02dede8c906afd6dbda83e28da48c93f8f/chrome/app/BUILD.gn [modify] https://crrev.com/386a3c02dede8c906afd6dbda83e28da48c93f8f/chrome/app/DEPS [modify] https://crrev.com/386a3c02dede8c906afd6dbda83e28da48c93f8f/chrome/app/chrome_main_delegate.cc [modify] https://crrev.com/386a3c02dede8c906afd6dbda83e28da48c93f8f/chrome/browser/BUILD.gn [modify] https://crrev.com/386a3c02dede8c906afd6dbda83e28da48c93f8f/components/metrics/leak_detector/leak_detector.cc [modify] https://crrev.com/386a3c02dede8c906afd6dbda83e28da48c93f8f/components/metrics/leak_detector/leak_detector.h [modify] https://crrev.com/386a3c02dede8c906afd6dbda83e28da48c93f8f/components/metrics/leak_detector/leak_detector_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/efd3f47e46c337720331c05fe023552ef093718c commit efd3f47e46c337720331c05fe023552ef093718c Author: sque <sque@chromium.org> Date: Wed Jun 08 20:04:53 2016 Move leak_detector_controller to its own directory This new directory will hold future code that relates to the leak detector as well. BUG= chromium:615223 TEST=unit tests pass Review-Url: https://codereview.chromium.org/2047163002 Cr-Commit-Position: refs/heads/master@{#398648} [modify] https://crrev.com/efd3f47e46c337720331c05fe023552ef093718c/chrome/browser/BUILD.gn [modify] https://crrev.com/efd3f47e46c337720331c05fe023552ef093718c/chrome/browser/metrics/chromeos_metrics_provider.h [add] https://crrev.com/efd3f47e46c337720331c05fe023552ef093718c/chrome/browser/metrics/leak_detector/OWNERS [rename] https://crrev.com/efd3f47e46c337720331c05fe023552ef093718c/chrome/browser/metrics/leak_detector/leak_detector_controller.cc [rename] https://crrev.com/efd3f47e46c337720331c05fe023552ef093718c/chrome/browser/metrics/leak_detector/leak_detector_controller.h [rename] https://crrev.com/efd3f47e46c337720331c05fe023552ef093718c/chrome/browser/metrics/leak_detector/leak_detector_controller_unittest.cc [modify] https://crrev.com/efd3f47e46c337720331c05fe023552ef093718c/chrome/chrome_browser.gypi [modify] https://crrev.com/efd3f47e46c337720331c05fe023552ef093718c/chrome/chrome_tests_unit.gypi
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/23bcb38936fddb66a15c02315d05d62e529756d4 commit 23bcb38936fddb66a15c02315d05d62e529756d4 Author: sque <sque@chromium.org> Date: Thu Jun 09 03:56:58 2016 Add LeakDetectorRemoteController as a Mojo service New class 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. The renderer process client will be implemented in a future CL. BUG= chromium:615223 Review-Url: https://codereview.chromium.org/2030883004 Cr-Commit-Position: refs/heads/master@{#398775} [modify] https://crrev.com/23bcb38936fddb66a15c02315d05d62e529756d4/chrome/browser/BUILD.gn [modify] https://crrev.com/23bcb38936fddb66a15c02315d05d62e529756d4/chrome/browser/metrics/leak_detector/leak_detector_controller.cc [modify] https://crrev.com/23bcb38936fddb66a15c02315d05d62e529756d4/chrome/browser/metrics/leak_detector/leak_detector_controller.h [add] https://crrev.com/23bcb38936fddb66a15c02315d05d62e529756d4/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc [add] https://crrev.com/23bcb38936fddb66a15c02315d05d62e529756d4/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h [modify] https://crrev.com/23bcb38936fddb66a15c02315d05d62e529756d4/chrome/chrome_browser.gypi
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/60265ec8d4f168ebb46a649613a5ee91715f7139 commit 60265ec8d4f168ebb46a649613a5ee91715f7139 Author: sque <sque@chromium.org> Date: Sat Jun 11 02:32:32 2016 Revert of Add LeakDetectorRemoteController as a Mojo service (patchset #6 id:100001 of https://codereview.chromium.org/2030883004/ ) Reason for revert: Need to re-submit mojom interface and implementation in single CL, and get security review from IPC owners. Original issue's description: > Add LeakDetectorRemoteController as a Mojo service > > New class 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. > > The renderer process client will be implemented in a future CL. > > BUG= chromium:615223 > > Committed: https://crrev.com/23bcb38936fddb66a15c02315d05d62e529756d4 > Cr-Commit-Position: refs/heads/master@{#398775} TBR=jochen@chromium.org,asvitkine@chromium.org,isherman@chromium.org,dcheng@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG= chromium:615223 Review-Url: https://codereview.chromium.org/2062483002 Cr-Commit-Position: refs/heads/master@{#399355} [modify] https://crrev.com/60265ec8d4f168ebb46a649613a5ee91715f7139/chrome/browser/BUILD.gn [modify] https://crrev.com/60265ec8d4f168ebb46a649613a5ee91715f7139/chrome/browser/metrics/leak_detector/leak_detector_controller.cc [modify] https://crrev.com/60265ec8d4f168ebb46a649613a5ee91715f7139/chrome/browser/metrics/leak_detector/leak_detector_controller.h [delete] https://crrev.com/e2b6b8c8c5376da73c94d01f0aa282067fcd14ec/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc [delete] https://crrev.com/e2b6b8c8c5376da73c94d01f0aa282067fcd14ec/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h [modify] https://crrev.com/60265ec8d4f168ebb46a649613a5ee91715f7139/chrome/chrome_browser.gypi
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9633249c6abb05f454533bf12b373e55f3020c09 commit 9633249c6abb05f454533bf12b373e55f3020c09 Author: sque <sque@chromium.org> Date: Sat Jun 11 03:24:22 2016 Revert of Mojo interface for Leak Detector on remote process (patchset #2 id:20001 of https://codereview.chromium.org/2018983004/ ) Reason for revert: Need to re-submit mojom interface and implementation in single CL, and get security review from IPC owners. Original issue's description: > Mojo interface 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 in serialized proto > format (strings) to the browser process, where they can be attached to > the UMA protobuf. > > BUG= chromium:615223 > TEST=Build successfully > R=asvitkine@chromium.org > > Committed: https://crrev.com/51e4f33eae448bae4c95fde5a8f16d6d2e6e6960 > Cr-Commit-Position: refs/heads/master@{#396780} TBR=asvitkine@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG= chromium:615223 Review-Url: https://codereview.chromium.org/2055393002 Cr-Commit-Position: refs/heads/master@{#399359} [modify] https://crrev.com/9633249c6abb05f454533bf12b373e55f3020c09/components/metrics.gypi [modify] https://crrev.com/9633249c6abb05f454533bf12b373e55f3020c09/components/metrics/BUILD.gn [delete] https://crrev.com/ab0b716911ec9c71be97e0c3b284accac4496c18/components/metrics/leak_detector/leak_detector_remote.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/64bedd689c873ecf51fe9511e03010895c06f405 commit 64bedd689c873ecf51fe9511e03010895c06f405 Author: sque <sque@chromium.org> Date: Thu Jun 16 07:37:09 2016 Add MemoryLeakReportProto enum/field for type of process This indicates whether the report was generated on a browser or a renderer process. BUG= chromium:615223 TEST=Build successfully R=isherman@chromium.org Review-Url: https://codereview.chromium.org/2067733002 Cr-Commit-Position: refs/heads/master@{#400103} [modify] https://crrev.com/64bedd689c873ecf51fe9511e03010895c06f405/components/metrics/proto/memory_leak_report.proto
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c21a6e92a02f064431b22aa52b136f4682778c06 commit c21a6e92a02f064431b22aa52b136f4682778c06 Author: sque <sque@chromium.org> Date: Wed Jul 20 02:24:21 2016 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 Review-Url: https://codereview.chromium.org/2064463002 Cr-Commit-Position: refs/heads/master@{#406466} [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/app/BUILD.gn [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/browser/BUILD.gn [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/browser/metrics/leak_detector/leak_detector_controller.cc [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/browser/metrics/leak_detector/leak_detector_controller.h [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/chrome_browser.gypi [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/chrome_renderer.gypi [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/renderer/BUILD.gn [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/renderer/DEPS [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/renderer/leak_detector/BUILD.gn [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/renderer/leak_detector/leak_detector_remote_client.cc [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/chrome/renderer/leak_detector/leak_detector_remote_client.h [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/components_tests.gyp [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/metrics.gypi [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/metrics/BUILD.gn [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/metrics/leak_detector/BUILD.gn [modify] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/metrics/leak_detector/OWNERS [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/metrics/leak_detector/leak_detector.mojom [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/metrics/leak_detector/protobuf_to_mojo_converter.cc [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/metrics/leak_detector/protobuf_to_mojo_converter.h [add] https://crrev.com/c21a6e92a02f064431b22aa52b136f4682778c06/components/metrics/leak_detector/protobuf_to_mojo_converter_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d149b80d547b9766d90159f80e931005acf1b433 commit d149b80d547b9766d90159f80e931005acf1b433 Author: sque <sque@chromium.org> Date: Wed Jul 20 04:19:54 2016 Add missing dependency to components_unittests GYP build It should have been added in http://crrev.com/2064463002 BUG= chromium:615223 TEST=build components_unittests with GYP, components_unittests passes TBR=hayato@chromium.org, wfh@chromium.org NOTRY=true NOTREECHECKS=true Review-Url: https://codereview.chromium.org/2160303004 Cr-Commit-Position: refs/heads/master@{#406478} [modify] https://crrev.com/d149b80d547b9766d90159f80e931005acf1b433/components/components_tests.gyp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/adb91a497c2a4624d4cf19f1b381e3df65b0a16d commit adb91a497c2a4624d4cf19f1b381e3df65b0a16d Author: achuith <achuith@chromium.org> Date: Wed Jul 20 07:27:17 2016 Revert of Mojo interface/service for Leak Detector on remote process (patchset #20 id:400001 of https://codereview.chromium.org/2064463002/ ) Reason for revert: crbug.com/629760 Original issue's 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} TBR=jochen@chromium.org,ben@chromium.org,dcheng@chromium.org,isherman@chromium.org,wfh@chromium.org,sque@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= chromium:615223 Review-Url: https://codereview.chromium.org/2166553003 Cr-Commit-Position: refs/heads/master@{#406511} [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/app/BUILD.gn [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/browser/BUILD.gn [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/browser/metrics/leak_detector/leak_detector_controller.cc [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/browser/metrics/leak_detector/leak_detector_controller.h [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/chrome_browser.gypi [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/chrome_renderer.gypi [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/renderer/BUILD.gn [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/chrome/renderer/DEPS [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/chrome/renderer/leak_detector/BUILD.gn [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/chrome/renderer/leak_detector/leak_detector_remote_client.cc [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/chrome/renderer/leak_detector/leak_detector_remote_client.h [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/components/components_tests.gyp [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/components/metrics.gypi [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/components/metrics/BUILD.gn [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/components/metrics/leak_detector/BUILD.gn [modify] https://crrev.com/adb91a497c2a4624d4cf19f1b381e3df65b0a16d/components/metrics/leak_detector/OWNERS [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/components/metrics/leak_detector/leak_detector.mojom [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/components/metrics/leak_detector/protobuf_to_mojo_converter.cc [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/components/metrics/leak_detector/protobuf_to_mojo_converter.h [delete] https://crrev.com/a1437d787ea11e04cde1462294c4b6fcb7de078a/components/metrics/leak_detector/protobuf_to_mojo_converter_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fb7824ff79e38d1de021d41c65474e6ff0cb8153 commit fb7824ff79e38d1de021d41c65474e6ff0cb8153 Author: engedy <engedy@chromium.org> Date: Wed Jul 20 12:27:49 2016 Revert of Add missing dependency to components_unittests GYP build (patchset #1 id:1 of https://codereview.chromium.org/2160303004/ ) Reason for revert: This was a follow-up for https://codereview.chromium.org/2064463002/, which has been reverted in the meantime in https://codereview.chromium.org/2166553003/, and now this second CL by its lonesome is causing compile error on "Linux Chromium OS ASan LSan Builder". Original issue's description: > Add missing dependency to components_unittests GYP build > > It should have been added in http://crrev.com/2064463002 > > BUG= chromium:615223 > TEST=build components_unittests with GYP, components_unittests passes > TBR=hayato@chromium.org, wfh@chromium.org > NOTRY=true > NOTREECHECKS=true > > Committed: https://crrev.com/d149b80d547b9766d90159f80e931005acf1b433 > Cr-Commit-Position: refs/heads/master@{#406478} TBR=hayato@chromium.org,llozano@google.com,wfh@chromium.org,sque@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= chromium:615223 Review-Url: https://codereview.chromium.org/2161013005 Cr-Commit-Position: refs/heads/master@{#406525} [modify] https://crrev.com/fb7824ff79e38d1de021d41c65474e6ff0cb8153/components/components_tests.gyp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0e57a1efd2a6f47e492c7d990eb397dfab5402a0 commit 0e57a1efd2a6f47e492c7d990eb397dfab5402a0 Author: sque <sque@chromium.org> Date: Thu Jul 21 21:53:09 2016 Reland of "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. ============================================== Fixes since previous commit: - Add missing dependency to components_unittests GYP build - Add dependency on Mojo C++ services code to renderer BUG= chromium:615223 TEST=Build successfully, unit tests pass R=wfh@chromium.org Review-Url: https://codereview.chromium.org/2064463002 Review-Url: https://codereview.chromium.org/2169763002 Cr-Original-Commit-Position: refs/heads/master@{#406466} Cr-Commit-Position: refs/heads/master@{#406959} [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/app/BUILD.gn [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/browser/BUILD.gn [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/browser/metrics/leak_detector/leak_detector_controller.cc [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/browser/metrics/leak_detector/leak_detector_controller.h [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/chrome_browser.gypi [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/chrome_renderer.gypi [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/renderer/BUILD.gn [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/renderer/DEPS [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/renderer/leak_detector/BUILD.gn [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/renderer/leak_detector/leak_detector_remote_client.cc [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/chrome/renderer/leak_detector/leak_detector_remote_client.h [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/components_tests.gyp [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/metrics.gypi [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/metrics/BUILD.gn [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/metrics/leak_detector/BUILD.gn [modify] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/metrics/leak_detector/OWNERS [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/metrics/leak_detector/leak_detector.mojom [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/metrics/leak_detector/protobuf_to_mojo_converter.cc [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/metrics/leak_detector/protobuf_to_mojo_converter.h [add] https://crrev.com/0e57a1efd2a6f47e492c7d990eb397dfab5402a0/components/metrics/leak_detector/protobuf_to_mojo_converter_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ebddf6df6607c9574adc4e78600bfd98ca5265c9 commit ebddf6df6607c9574adc4e78600bfd98ca5265c9 Author: sque <sque@chromium.org> Date: Mon Aug 08 21:18:16 2016 Randomly enable leak detector based on probability parameter Read in probability parameters from the variations system. Get a random double within the range [0, 1) and check it against the probability to decide whether to enable the leak detector for each browser and renderer process. By default, the probability is 0 (turned off). Also enables the sending of params to renderer process and receiving of leak reports from renderer process. BUG= chromium:615223 TEST=Run Chrome with variations seed, check that the proper params are read from variations system. Set probabilities to 50%. Add logging to browser and renderer process' LeakDetector modules and make sure that they are only enabled about half the time. Review-Url: https://codereview.chromium.org/2062743002 Cr-Commit-Position: refs/heads/master@{#410462} [modify] https://crrev.com/ebddf6df6607c9574adc4e78600bfd98ca5265c9/chrome/browser/metrics/leak_detector/leak_detector_controller.cc [modify] https://crrev.com/ebddf6df6607c9574adc4e78600bfd98ca5265c9/chrome/browser/metrics/leak_detector/leak_detector_controller.h [modify] https://crrev.com/ebddf6df6607c9574adc4e78600bfd98ca5265c9/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc [modify] https://crrev.com/ebddf6df6607c9574adc4e78600bfd98ca5265c9/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h [modify] https://crrev.com/ebddf6df6607c9574adc4e78600bfd98ca5265c9/chrome/renderer/chrome_content_renderer_client.cc [modify] https://crrev.com/ebddf6df6607c9574adc4e78600bfd98ca5265c9/chrome/renderer/chrome_content_renderer_client.h [modify] https://crrev.com/ebddf6df6607c9574adc4e78600bfd98ca5265c9/chrome/renderer/leak_detector/leak_detector_remote_client.cc [modify] https://crrev.com/ebddf6df6607c9574adc4e78600bfd98ca5265c9/chrome/renderer/leak_detector/leak_detector_remote_client.h
Comment 1 by sque@chromium.org
, May 26 2016