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

Issue 1338573003: Restrict registered PersistentNodes to non-empty ones. (Closed)

Created:
5 years, 3 months ago by sof
Modified:
5 years, 3 months ago
Reviewers:
haraken
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Restrict registered PersistentNodes to non-empty ones. It is not uncommon for Persistent<> members to be left as empty/null upon construction, but possibly written to later during the object's lifetime. Hence delaying the allocation and registeration of the Persistent<>'s PersistentNode until it is initialized with a non-null value avoids the alloc/free overhead for Persistent<>s that are never initialized. And reduces the number of PersistentNode roots that the GC has to iterate over. By adopting that scheme here, the number of PersistentNodes allocated when loading google.com is (approx) halved. Similar reductions consistently seen elsewhere. Dually, we also introduce the deallocation of the PersistentNode upon updating the Persistent<> with nullptr. This is done so as to allow a thread to cleanly shut down by first only clearing the persistents it has allocated (and not require it to somehow separately destruct these first -- that happens upon clearing.) R=haraken BUG=483380 Committed: https://crrev.com/b119d7e4f458aeaf3d53c5e50facac4abf4a2742 git-svn-id: svn://svn.chromium.org/blink/trunk@202197 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Patch Set 1 #

Patch Set 2 : tidy #

Total comments: 6

Patch Set 3 : introduce PersistentBase::assign() #

Total comments: 1

Patch Set 4 : add back missing m_raw nullcheck that ps#3 incorrectly dropped #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -23 lines) Patch
M Source/platform/heap/Handle.h View 1 2 3 5 chunks +33 lines, -20 lines 0 comments Download
M Source/platform/heap/PersistentNode.cpp View 2 chunks +7 lines, -3 lines 0 comments Download

Messages

Total messages: 26 (5 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338573003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338573003/20001
5 years, 3 months ago (2015-09-13 12:16:56 UTC) #2
haraken
I like this change but am a bit concerned about a performance impact, since the ...
5 years, 3 months ago (2015-09-13 12:36:56 UTC) #4
sof
On 2015/09/13 12:36:56, haraken wrote: > I like this change but am a bit concerned ...
5 years, 3 months ago (2015-09-13 12:47:46 UTC) #5
sof
On 2015/09/13 12:47:46, sof wrote: > On 2015/09/13 12:36:56, haraken wrote: > > I like ...
5 years, 3 months ago (2015-09-13 12:50:25 UTC) #6
haraken
On 2015/09/13 12:50:25, sof wrote: > On 2015/09/13 12:47:46, sof wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-13 13:20:35 UTC) #7
sof
On 2015/09/13 13:20:35, haraken wrote: > On 2015/09/13 12:50:25, sof wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-13 13:27:03 UTC) #8
haraken
On 2015/09/13 13:27:03, sof wrote: > On 2015/09/13 13:20:35, haraken wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-13 13:35:15 UTC) #9
sof
On 2015/09/13 13:35:15, haraken wrote: > On 2015/09/13 13:27:03, sof wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-13 14:46:55 UTC) #10
haraken
On 2015/09/13 14:46:55, sof wrote: > On 2015/09/13 13:35:15, haraken wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-13 14:53:33 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/133158) linux_chromium_rel_ng on ...
5 years, 3 months ago (2015-09-13 15:17:21 UTC) #13
sof
On 2015/09/13 14:53:33, haraken wrote: > On 2015/09/13 14:46:55, sof wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-13 20:46:07 UTC) #14
haraken
On 2015/09/13 20:46:07, sof wrote: > On 2015/09/13 14:53:33, haraken wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-13 23:23:24 UTC) #15
haraken
On 2015/09/13 23:23:24, haraken wrote: > On 2015/09/13 20:46:07, sof wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-14 01:02:55 UTC) #16
sof
On 2015/09/13 12:50:25, sof wrote: > On 2015/09/13 12:47:46, sof wrote: > > On 2015/09/13 ...
5 years, 3 months ago (2015-09-14 05:35:39 UTC) #17
sof
btw, SelfKeepAlive<> can be simplified following this one -- it no longer needs to maintain ...
5 years, 3 months ago (2015-09-14 06:34:04 UTC) #18
sof
On 2015/09/14 01:02:55, haraken wrote: > ... > > (Also please add more explanations to ...
5 years, 3 months ago (2015-09-14 06:34:37 UTC) #19
haraken
LGTM
5 years, 3 months ago (2015-09-14 06:43:07 UTC) #20
sof
https://codereview.chromium.org/1338573003/diff/40001/Source/platform/heap/Handle.h File Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1338573003/diff/40001/Source/platform/heap/Handle.h#newcode212 Source/platform/heap/Handle.h:212: ASSERT(!m_persistentNode); Of course we need a !m_raw test here ...
5 years, 3 months ago (2015-09-14 09:51:59 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338573003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338573003/60001
5 years, 3 months ago (2015-09-14 11:52:15 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=202197
5 years, 3 months ago (2015-09-14 11:56:59 UTC) #25
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:31:43 UTC) #26
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/b119d7e4f458aeaf3d53c5e50facac4abf4a2742

Powered by Google App Engine
This is Rietveld 408576698