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

Issue 2299753002: Made zone segments aligned in memory and included a pointer to the zone in the header. Larger objec…

Created:
4 years, 3 months ago by heimbuef
Modified:
4 years, 3 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Made zone segments aligned in memory and included a pointer to the zone in the header. Larger objects get their own segments. BUG=

Patch Set 1 : Made zone segments aligned in memory and included a pointer to the zone in the header. Larger objec… #

Total comments: 2

Patch Set 2 : Simplified Segment::size() and fixed ::is_big_object_segment() #

Total comments: 3

Patch Set 3 : Reaction to comments #

Total comments: 17

Patch Set 4 : Reaction to comments #

Total comments: 18

Patch Set 5 : Addressing review comments. #

Total comments: 2

Patch Set 6 : Added alignment code in Zone::NewSegment #

Total comments: 5

Patch Set 7 : Fix for windows #

Total comments: 8

Patch Set 8 : Deactivated malfuntioning test and added some zone unittests #

Patch Set 9 : Cast list->length() and list->capacity() to size_t #

Total comments: 10

Patch Set 10 : Only zap commited region #

Patch Set 11 : Reaction to Review comments #

Patch Set 12 : Added a zone segment pool for small segments to avoid frequent sys calls #

Unified diffs Side-by-side diffs Delta from patch set Stats (+598 lines, -171 lines) Patch
M src/base/accounting-allocator.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/base/accounting-allocator.cc View 1 2 1 chunk +12 lines, -8 lines 0 comments Download
M src/base/platform/platform.h View 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M src/base/platform/platform-aix.cc View 1 chunk +1 line, -3 lines 0 comments Download
M src/base/platform/platform-cygwin.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/base/platform/platform-freebsd.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/base/platform/platform-linux.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/base/platform/platform-macos.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/base/platform/platform-openbsd.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/base/platform/platform-qnx.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/base/platform/platform-solaris.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/base/platform/platform-win32.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/list.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/runtime/runtime-regexp.cc View 1 2 3 6 chunks +14 lines, -11 lines 0 comments Download
M src/zone.h View 1 2 3 9 chunks +59 lines, -15 lines 0 comments Download
M src/zone.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +371 lines, -91 lines 0 comments Download
M test/message/message.status View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M test/unittests/unittests.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A test/unittests/zone-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +122 lines, -0 lines 0 comments Download

Messages

Total messages: 87 (58 generated)
heimbuef
PTAL
4 years, 3 months ago (2016-09-01 09:03:01 UTC) #2
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2299753002/diff/20001/src/zone.h File src/zone.h (right): https://codereview.chromium.org/2299753002/diff/20001/src/zone.h#newcode39 src/zone.h:39: friend class Segment; nit. please move those declarations down ...
4 years, 3 months ago (2016-09-01 12:04:52 UTC) #4
jochen (gone - plz use gerrit)
another problem I see is that the accounting allocator no longer correctly keeps track of ...
4 years, 3 months ago (2016-09-01 12:05:50 UTC) #5
heimbuef
On 2016/09/01 12:05:50, jochen wrote: > another problem I see is that the accounting allocator ...
4 years, 3 months ago (2016-09-01 12:12:13 UTC) #6
heimbuef
On 2016/09/01 12:12:13, heimbuef wrote: > On 2016/09/01 12:05:50, jochen wrote: > > another problem ...
4 years, 3 months ago (2016-09-01 15:15:09 UTC) #7
jochen (gone - plz use gerrit)
+jkummerow to get more eyes on this. After this change, nothing allocates through AccountingAllocator anymore, ...
4 years, 3 months ago (2016-09-02 11:53:42 UTC) #9
heimbuef
On 2016/09/02 11:53:42, jochen wrote: > +jkummerow to get more eyes on this. > > ...
4 years, 3 months ago (2016-09-02 13:18:24 UTC) #10
jochen (gone - plz use gerrit)
lgtm let's see how this will perform esp. on android where getting virtual address space ...
4 years, 3 months ago (2016-09-02 13:21:28 UTC) #11
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/2299753002/80001
4 years, 3 months ago (2016-09-02 13:24:19 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_gcc_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/22326) v8_linux_nodcheck_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 3 months ago (2016-09-02 13:28:06 UTC) #15
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/2299753002/100001
4 years, 3 months ago (2016-09-02 13:39:52 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_arm_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm_rel_ng/builds/7880) v8_linux_dbg_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 3 months ago (2016-09-02 13:42:22 UTC) #20
Jakob Kummerow
https://codereview.chromium.org/2299753002/diff/80001/src/zone.cc File src/zone.cc (right): https://codereview.chromium.org/2299753002/diff/80001/src/zone.cc#newcode80 src/zone.cc:80: vm.TakeControl(&virtual_memory_); Why is this dance necessary, as opposed to ...
4 years, 3 months ago (2016-09-02 14:11:49 UTC) #21
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/2299753002/140001
4 years, 3 months ago (2016-09-05 11:53:28 UTC) #24
jochen (gone - plz use gerrit)
please wait for approval from Jakob since you changed the CL since my review
4 years, 3 months ago (2016-09-05 11:55:02 UTC) #26
Jakob Kummerow
https://codereview.chromium.org/2299753002/diff/120001/src/zone.cc File src/zone.cc (right): https://codereview.chromium.org/2299753002/diff/120001/src/zone.cc#newcode81 src/zone.cc:81: vm.TakeControl(&virtual_memory_); Question still stands: why do you need |vm| ...
4 years, 3 months ago (2016-09-05 12:05:24 UTC) #27
heimbuef
https://codereview.chromium.org/2299753002/diff/20001/src/zone.h File src/zone.h (right): https://codereview.chromium.org/2299753002/diff/20001/src/zone.h#newcode39 src/zone.h:39: friend class Segment; On 2016/09/01 12:04:52, jochen wrote: > ...
4 years, 3 months ago (2016-09-05 12:38:15 UTC) #28
Jakob Kummerow
OK, LGTM.
4 years, 3 months ago (2016-09-05 12:40:00 UTC) #29
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/2299753002/160001
4 years, 3 months ago (2016-09-05 13:41:20 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_asan_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel_ng/builds/8185) v8_linux64_asan_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
4 years, 3 months ago (2016-09-05 14:10:51 UTC) #34
Jakob Kummerow
https://codereview.chromium.org/2299753002/diff/160001/src/zone.cc File src/zone.cc (right): https://codereview.chromium.org/2299753002/diff/160001/src/zone.cc#newcode267 src/zone.cc:267: auto start = nit: don't use auto, make the ...
4 years, 3 months ago (2016-09-05 14:46:27 UTC) #35
Jakob Kummerow
https://codereview.chromium.org/2299753002/diff/160001/src/zone.cc File src/zone.cc (right): https://codereview.chromium.org/2299753002/diff/160001/src/zone.cc#newcode270 src/zone.cc:270: if (start != reinterpret_cast<uintptr_t>(vm.address())) { Actually, can this happen? ...
4 years, 3 months ago (2016-09-05 15:15:55 UTC) #36
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/2299753002/180001
4 years, 3 months ago (2016-09-05 15:35:29 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: v8_android_arm_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/builds/23925) v8_linux64_asan_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 3 months ago (2016-09-05 15:36:59 UTC) #41
heimbuef
https://codereview.chromium.org/2299753002/diff/160001/src/zone.cc File src/zone.cc (right): https://codereview.chromium.org/2299753002/diff/160001/src/zone.cc#newcode270 src/zone.cc:270: if (start != reinterpret_cast<uintptr_t>(vm.address())) { Long story short: On ...
4 years, 3 months ago (2016-09-05 15:48:27 UTC) #42
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/2299753002/200001
4 years, 3 months ago (2016-09-05 15:48:50 UTC) #45
Jakob Kummerow
Unaddressed comments -> not lgtm currently. The workflow is: if you get an lg-tm and ...
4 years, 3 months ago (2016-09-05 16:04:04 UTC) #47
heimbuef
PTAL https://codereview.chromium.org/2299753002/diff/200001/src/zone.cc File src/zone.cc (right): https://codereview.chromium.org/2299753002/diff/200001/src/zone.cc#newcode123 src/zone.cc:123: // The beginning of the aligned memory of ...
4 years, 3 months ago (2016-09-07 11:54:23 UTC) #76
Jakob Kummerow
4 years, 3 months ago (2016-09-07 12:49:03 UTC) #81
https://codereview.chromium.org/2299753002/diff/360001/src/zone.cc
File src/zone.cc (right):

https://codereview.chromium.org/2299753002/diff/360001/src/zone.cc#newcode272
src/zone.cc:272: auto base = Address(reinterpret_cast<uintptr_t>(vm.address()) &
Again: please don't use "auto".

The style guide says "auto" can be used when doing so increases readability, the
canonical example being overly verbose stdlib iterator types. However, "auto
base" is not any more readable than "Address base", but instead requires the
reader to invest a little more effort to understand what this code does.

I insist.

https://codereview.chromium.org/2299753002/diff/360001/src/zone.cc#newcode282
src/zone.cc:282: auto end = Address(reinterpret_cast<uintptr_t>(vm.address()) +
vm.size());
Same here.

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
File test/unittests/zone-unittest.cc (right):

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
test/unittests/zone-unittest.cc:1: // Copyright 2014 the V8 project authors. All
rights reserved.
nit: 2016

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
test/unittests/zone-unittest.cc:9: #include "src/objects.h"
nit: when you #include foo-inl.h, you don't need to #include foo.h.

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
test/unittests/zone-unittest.cc:10: 
nit: no empty line necessary here. Instead, sort #includes alphabetically.

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
test/unittests/zone-unittest.cc:12: #include "src/handles.h"
again

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
test/unittests/zone-unittest.cc:23: data[i] = static_cast<byte>(i % 100);
how about s/i % 100/i & 0xFF/ ?

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
test/unittests/zone-unittest.cc:34: void empty_alloc() {
Any reason this is a separate function? I'd prefer to just inline it into its
single callsite for simplicity.

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
test/unittests/zone-unittest.cc:49: const size_t kNumberOfChunks = 10000;
How long does it take to run these tests?

https://codereview.chromium.org/2299753002/diff/360001/test/unittests/zone-un...
test/unittests/zone-unittest.cc:114: auto list = new (&zone) ZoneList<byte>(0,
&zone);
s/auto/ZoneList<byte>/

Powered by Google App Engine
This is Rietveld 408576698