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

Issue 1472943004: Split up leak detector into two stages for better leak reporting. (Closed)

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

Description

Split up leak detector into two stages for better leak reporting. The leak detector clears out resources along with issuing a sequence of GCs before taking object census. It then counting up resources that are left and reporting these as leaking. With Oilpan enabled, RenderViewTest needs to carefully orchestrate its shutdown to reliably not report the frame(s) attached to the view as leaking. (With Oilpan enabled, frames will delayed'ly release resources upon frame close()ing requiring a follow-on GC to clear out those resources.) Accommodate that by splitting out the leak detector into two -- with RenderViewTest injecting the clearing of its view in between those. R=haraken, jochen, hajimehoshi BUG=561293 Committed: https://crrev.com/e6c4efc01a4e1d50713542460d69d64ae5e76094 Cr-Commit-Position: refs/heads/master@{#361638}

Patch Set 1 #

Patch Set 2 : delay final leak detector GCs until ready #

Patch Set 3 : test with enable_oilpan=1 #

Patch Set 4 : restore enable_oilpan=0 default #

Total comments: 5

Patch Set 5 : rephrase WebLeakDetector as two-phased #

Total comments: 2

Patch Set 6 : retire collectGarbageAndGetDOMCounts() #

Patch Set 7 : call clearScriptRegexpContext() in prepareForLeakDetection() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -10 lines) Patch
M content/public/test/render_view_test.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M content/shell/renderer/layout_test/leak_detector.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLeakDetector.cpp View 1 2 3 4 5 6 3 chunks +9 lines, -5 lines 0 comments Download
M third_party/WebKit/public/web/WebLeakDetector.h View 1 2 3 4 5 1 chunk +26 lines, -3 lines 0 comments Download

Messages

Total messages: 28 (8 generated)
haraken
https://codereview.chromium.org/1472943004/diff/60001/content/public/test/render_view_test.cc File content/public/test/render_view_test.cc (right): https://codereview.chromium.org/1472943004/diff/60001/content/public/test/render_view_test.cc#newcode296 content/public/test/render_view_test.cc:296: leak_detector->delayFinalGarbageCollection(); Would you elaborate on why we need to ...
5 years ago (2015-11-24 23:54:51 UTC) #2
sof
https://codereview.chromium.org/1472943004/diff/60001/content/public/test/render_view_test.cc File content/public/test/render_view_test.cc (right): https://codereview.chromium.org/1472943004/diff/60001/content/public/test/render_view_test.cc#newcode296 content/public/test/render_view_test.cc:296: leak_detector->delayFinalGarbageCollection(); On 2015/11/24 23:54:51, haraken wrote: > > Would ...
5 years ago (2015-11-25 06:20:50 UTC) #3
haraken
https://codereview.chromium.org/1472943004/diff/60001/content/public/test/render_view_test.cc File content/public/test/render_view_test.cc (right): https://codereview.chromium.org/1472943004/diff/60001/content/public/test/render_view_test.cc#newcode296 content/public/test/render_view_test.cc:296: leak_detector->delayFinalGarbageCollection(); On 2015/11/25 06:20:50, sof wrote: > On 2015/11/24 ...
5 years ago (2015-11-25 07:39:38 UTC) #4
sof
please take a look. Addressing reported frame "leaks" from http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Oilpan/builds/31362
5 years ago (2015-11-25 07:59:54 UTC) #6
sof
On 2015/11/25 07:39:38, haraken wrote: > https://codereview.chromium.org/1472943004/diff/60001/content/public/test/render_view_test.cc > File content/public/test/render_view_test.cc (right): > > https://codereview.chromium.org/1472943004/diff/60001/content/public/test/render_view_test.cc#newcode296 > ...
5 years ago (2015-11-25 08:01:10 UTC) #7
sof
+Cc: oilpan-reviews
5 years ago (2015-11-25 08:01:47 UTC) #8
haraken
Thanks, LGTM with nits. https://codereview.chromium.org/1472943004/diff/80001/third_party/WebKit/public/web/WebLeakDetector.h File third_party/WebKit/public/web/WebLeakDetector.h (right): https://codereview.chromium.org/1472943004/diff/80001/third_party/WebKit/public/web/WebLeakDetector.h#newcode76 third_party/WebKit/public/web/WebLeakDetector.h:76: virtual void collectGarbageAndGetDOMCounts(WebLocalFrame*) = 0; ...
5 years ago (2015-11-25 08:16:30 UTC) #9
jochen (gone - plz use gerrit)
lgtm
5 years ago (2015-11-25 08:35:38 UTC) #10
sof
https://codereview.chromium.org/1472943004/diff/80001/third_party/WebKit/public/web/WebLeakDetector.h File third_party/WebKit/public/web/WebLeakDetector.h (right): https://codereview.chromium.org/1472943004/diff/80001/third_party/WebKit/public/web/WebLeakDetector.h#newcode76 third_party/WebKit/public/web/WebLeakDetector.h:76: virtual void collectGarbageAndGetDOMCounts(WebLocalFrame*) = 0; On 2015/11/25 08:16:30, haraken ...
5 years ago (2015-11-25 08:40:21 UTC) #11
hajimehoshi
lgtm
5 years ago (2015-11-25 08:41:29 UTC) #12
haraken
On 2015/11/25 08:40:21, sof wrote: > https://codereview.chromium.org/1472943004/diff/80001/third_party/WebKit/public/web/WebLeakDetector.h > File third_party/WebKit/public/web/WebLeakDetector.h (right): > > https://codereview.chromium.org/1472943004/diff/80001/third_party/WebKit/public/web/WebLeakDetector.h#newcode76 > ...
5 years ago (2015-11-25 08:41:48 UTC) #13
sof
thanks, added a description giving details + filed the tracking bug http://code.google.com/p/chromium/issues/detail?id=561293
5 years ago (2015-11-25 08:51:45 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943004/100001
5 years ago (2015-11-25 08:52:25 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/83724)
5 years ago (2015-11-25 10:10:02 UTC) #20
sof
aww, introduced a leak of ScriptRegExpContexts. Adjusting & retesting.
5 years ago (2015-11-25 10:51:28 UTC) #21
sof
On 2015/11/25 10:51:28, sof wrote: > aww, introduced a leak of ScriptRegExpContexts. Adjusting & retesting. ...
5 years ago (2015-11-25 11:45:59 UTC) #22
haraken
LGTM
5 years ago (2015-11-25 11:53:40 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472943004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472943004/120001
5 years ago (2015-11-25 12:11:52 UTC) #26
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years ago (2015-11-25 13:13:29 UTC) #27
commit-bot: I haz the power
5 years ago (2015-11-25 13:14:13 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e6c4efc01a4e1d50713542460d69d64ae5e76094
Cr-Commit-Position: refs/heads/master@{#361638}

Powered by Google App Engine
This is Rietveld 408576698