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

Issue 1213133002: Oilpan: Reduce sizeof(Persistent) to 16 byte (Closed)

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

Description

Oilpan: Reduce sizeof(Persistent) to 16 byte This CL reduces sizeof(Persistent) from 32 byte to 16 byte, although the actual runtime size per Persistent handle stay the same (i.e., 32 byte). (Before) class PersistentNode { TraceCallback m_trace; PersistentNode* m_prev; PersistentNode* m_next; }; class Persistent : public PersistentNode { T* m_raw; }; (After) class Persistent { T* m_raw; PersistentNode* m_persistentNode; // Owns the PersistentNode. }; class PersistentNode { TraceCallback m_trace; void* m_self; // A back pointer to the Persistent. }; Even though this CL doesn't change the actual size per Persistent handle, this CL makes our situation better in the following points: - sizeof(Persistent) matters for performance because a Persistent handle is used as a part-of object in a DOM object. If sizeof(Persistent) decreases, we can pack more DOM objects in a given address space and thus improve the cache locality. This is important for ElementRareData, for example. - In practice, sizeof(Persistent) is important not to trigger the SameSize compile assert. - After this CL, m_raw is placed at the head address of the Persistent handle. This will reduce the overhead of dereferecing the Persistent handle. BUG=483380 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198131

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 12

Patch Set 5 : #

Patch Set 6 : #

Total comments: 3

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 1

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -221 lines) Patch
M Source/platform/heap/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/heap/Handle.h View 1 2 3 4 5 6 17 chunks +41 lines, -139 lines 0 comments Download
M Source/platform/heap/HeapTest.cpp View 1 2 3 4 5 6 7 1 chunk +19 lines, -53 lines 0 comments Download
A Source/platform/heap/PersistentNode.h View 1 2 3 4 5 6 1 chunk +183 lines, -0 lines 0 comments Download
A Source/platform/heap/PersistentNode.cpp View 1 2 3 4 5 1 chunk +93 lines, -0 lines 0 comments Download
M Source/platform/heap/ThreadState.h View 1 2 3 4 3 chunks +7 lines, -8 lines 0 comments Download
M Source/platform/heap/ThreadState.cpp View 8 5 chunks +8 lines, -21 lines 0 comments Download
M Source/platform/heap/blink_heap.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (10 generated)
haraken
I'll measure detailed performance from now, but feel free to take a first look.
5 years, 5 months ago (2015-06-29 10:16:31 UTC) #2
haraken
https://codereview.chromium.org/1213133002/diff/60001/Source/platform/heap/HeapTest.cpp File Source/platform/heap/HeapTest.cpp (right): https://codereview.chromium.org/1213133002/diff/60001/Source/platform/heap/HeapTest.cpp#newcode6272 Source/platform/heap/HeapTest.cpp:6272: TEST(HeapTest, PersistentPerfTest) This is a micro-benchmark to measure the ...
5 years, 5 months ago (2015-06-29 11:48:52 UTC) #3
sof
https://chromiumcodereview.appspot.com/1213133002/diff/60001/Source/platform/heap/PersistentNode.cpp File Source/platform/heap/PersistentNode.cpp (right): https://chromiumcodereview.appspot.com/1213133002/diff/60001/Source/platform/heap/PersistentNode.cpp#newcode29 Source/platform/heap/PersistentNode.cpp:29: ASSERT(persistentCount == m_persistentCount); Bots are complaining about this -- ...
5 years, 5 months ago (2015-06-30 09:19:40 UTC) #5
haraken
Thanks for review! https://chromiumcodereview.appspot.com/1213133002/diff/60001/Source/platform/heap/PersistentNode.cpp File Source/platform/heap/PersistentNode.cpp (right): https://chromiumcodereview.appspot.com/1213133002/diff/60001/Source/platform/heap/PersistentNode.cpp#newcode29 Source/platform/heap/PersistentNode.cpp:29: ASSERT(persistentCount == m_persistentCount); On 2015/06/30 09:19:39, ...
5 years, 5 months ago (2015-06-30 09:51:32 UTC) #6
sof
https://chromiumcodereview.appspot.com/1213133002/diff/100001/Source/platform/heap/Handle.h File Source/platform/heap/Handle.h (right): https://chromiumcodereview.appspot.com/1213133002/diff/100001/Source/platform/heap/Handle.h#newcode220 Source/platform/heap/Handle.h:220: state->persistentRegion()->freePersistentNode(m_persistentNode); Is this ASan friendly with lazy-sweeping enabled? https://chromiumcodereview.appspot.com/1213133002/diff/100001/Source/platform/heap/Handle.h#newcode409 ...
5 years, 5 months ago (2015-06-30 10:08:11 UTC) #7
haraken
On 2015/06/30 10:08:11, sof wrote: > https://chromiumcodereview.appspot.com/1213133002/diff/100001/Source/platform/heap/Handle.h > File Source/platform/heap/Handle.h (right): > > https://chromiumcodereview.appspot.com/1213133002/diff/100001/Source/platform/heap/Handle.h#newcode220 > ...
5 years, 5 months ago (2015-06-30 10:33:20 UTC) #8
haraken
On 2015/06/30 10:33:20, haraken wrote: > On 2015/06/30 10:08:11, sof wrote: > > > https://chromiumcodereview.appspot.com/1213133002/diff/100001/Source/platform/heap/Handle.h ...
5 years, 5 months ago (2015-06-30 13:51:17 UTC) #9
sof
thanks for verifying that; lgtm. if you want to land next, better have to it ...
5 years, 5 months ago (2015-06-30 14:01:13 UTC) #10
haraken
On 2015/06/30 14:01:13, sof wrote: > thanks for verifying that; lgtm. > > if you ...
5 years, 5 months ago (2015-06-30 14:02:21 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1213133002/120001
5 years, 5 months ago (2015-07-01 00:41:26 UTC) #14
commit-bot: I haz the power
Exceeded global retry quota
5 years, 5 months ago (2015-07-01 01:04:02 UTC) #16
haraken
https://codereview.chromium.org/1213133002/diff/160001/Source/platform/heap/HeapTest.cpp File Source/platform/heap/HeapTest.cpp (left): https://codereview.chromium.org/1213133002/diff/160001/Source/platform/heap/HeapTest.cpp#oldcode664 Source/platform/heap/HeapTest.cpp:664: DEFINE_INLINE_TRACE() It is invalid to modify the list of ...
5 years, 5 months ago (2015-07-01 07:43:44 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1213133002/160001
5 years, 5 months ago (2015-07-01 07:44:00 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_chromium_gn_rel/builds/40052)
5 years, 5 months ago (2015-07-01 08:15:37 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1213133002/180001
5 years, 5 months ago (2015-07-01 08:20:36 UTC) #25
commit-bot: I haz the power
5 years, 5 months ago (2015-07-01 10:46:31 UTC) #26
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198131

Powered by Google App Engine
This is Rietveld 408576698