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

Issue 1316873004: heap: make array buffer maps disjoint (Closed)

Created:
5 years, 3 months ago by fedor.indutny
Modified:
5 years, 3 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

heap: make array buffer maps disjoint Remove intersection from the `std::map`s representing current live ArrayBuffers. While being simpler to understand, it poses significant performance issue for the active ArrayBuffer users (like node.js). Store buffers separately, and process them together during mark-sweep phase. The results of benchmarks are: $ ./node-slow bench && ./node-fast bench 4997.4 ns/op 4685.7 ns/op NOTE: `fast` - was a patched node.js, `slow` - unpatched node.js with vanilla v8. BUG= Committed: https://crrev.com/9e3676da9ab1aaf7de3e8582cb3fdefcc3dbaf33 Cr-Commit-Position: refs/heads/master@{#30495}

Patch Set 1 #

Total comments: 13

Patch Set 2 : inline everything #

Total comments: 9

Patch Set 3 : completely disjoint sets #

Total comments: 4

Patch Set 4 : fix last nits #

Patch Set 5 : fix typo #

Patch Set 6 : remove useless code #

Patch Set 7 : fix double free #

Patch Set 8 : rebase #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -98 lines) Patch
M src/heap/heap.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -15 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 3 chunks +54 lines, -81 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -2 lines 3 comments Download

Messages

Total messages: 49 (10 generated)
indutny
5 years, 3 months ago (2015-08-26 23:55:01 UTC) #2
fedor.indutny
I'm no longer sure, which account was used to submit this CL. Emailing from the ...
5 years, 3 months ago (2015-08-27 05:34:29 UTC) #3
Michael Lippautz
-svenpanne, -indutny, +hpayer Generally fine; How about factoring out the whole logic into an ArrayBufferTracker ...
5 years, 3 months ago (2015-08-27 11:22:13 UTC) #5
fedor.indutny
Thank you, Michael! I don't mind moving it into a separate class. But maybe I ...
5 years, 3 months ago (2015-08-27 18:38:37 UTC) #6
Michael Lippautz
Hej, Thanks for highlighting hickups and taking the effort to improve on this! Let's leave ...
5 years, 3 months ago (2015-08-28 08:05:02 UTC) #7
fedor.indutny
Hello again, Thanks for the thorough review! Will fix everything mentioned as soon as possible, ...
5 years, 3 months ago (2015-08-28 09:48:40 UTC) #8
fedor.indutny
https://codereview.chromium.org/1316873004/diff/1/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/1316873004/diff/1/src/heap/heap.cc#newcode1784 src/heap/heap.cc:1784: void Heap::TearDownArrayBuffersHelper( On 2015/08/28 08:05:02, Michael Lippautz wrote: > ...
5 years, 3 months ago (2015-08-28 10:02:37 UTC) #9
Michael Lippautz
On 2015/08/28 09:48:40, fedor.indutny wrote: > Hello again, > > Thanks for the thorough review! ...
5 years, 3 months ago (2015-08-28 10:47:17 UTC) #10
Michael Lippautz
On 2015/08/28 10:02:37, fedor.indutny wrote: > https://codereview.chromium.org/1316873004/diff/1/src/heap/heap.cc > File src/heap/heap.cc (right): > > https://codereview.chromium.org/1316873004/diff/1/src/heap/heap.cc#newcode1784 > ...
5 years, 3 months ago (2015-08-28 10:48:10 UTC) #11
fedor.indutny
Inlined everything, thank you again! (Sorry, going to sleep now. Hope it looks good now ...
5 years, 3 months ago (2015-08-28 11:03:34 UTC) #12
Michael Lippautz
Fedor, Getting there! Now we can actually see what's happening :) The code will get ...
5 years, 3 months ago (2015-08-28 14:25:31 UTC) #13
fedor.indutny
The results of benchmarks are: ./node-slow 1 && ./node-no-inline-fast 1 && ./node-fast 1 4997.4 ns/op ...
5 years, 3 months ago (2015-08-28 20:49:41 UTC) #14
Michael Lippautz
On 2015/08/28 20:49:41, fedor.indutny wrote: > The results of benchmarks are: > > ./node-slow 1 ...
5 years, 3 months ago (2015-08-31 06:31:58 UTC) #15
Michael Lippautz
lgtm with comments. The next step would be moving the logic out of Heap into ...
5 years, 3 months ago (2015-08-31 06:33:45 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316873004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316873004/60001
5 years, 3 months ago (2015-08-31 06:40:07 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/9247) v8_win_nosnap_shared_compile_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 3 months ago (2015-08-31 06:42:51 UTC) #21
fedor.indutny
On 2015/08/31 06:31:58, Michael Lippautz wrote: > On 2015/08/28 20:49:41, fedor.indutny wrote: > > The ...
5 years, 3 months ago (2015-08-31 06:45:29 UTC) #22
fedor.indutny
Made a typo in debug-only line. Going to rebuild it on my machine, and resubmit ...
5 years, 3 months ago (2015-08-31 06:46:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316873004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316873004/80001
5 years, 3 months ago (2015-08-31 06:54:27 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/builds/6081)
5 years, 3 months ago (2015-08-31 07:05:20 UTC) #28
Michael Lippautz
On 2015/08/31 06:45:29, fedor.indutny wrote: > On 2015/08/31 06:31:58, Michael Lippautz wrote: > > On ...
5 years, 3 months ago (2015-08-31 07:16:39 UTC) #29
fedor.indutny
Michael, Looks like there is some issue on linux buildbot. I will investigate it, and ...
5 years, 3 months ago (2015-08-31 07:16:50 UTC) #30
fedor.indutny
On 2015/08/31 07:16:39, Michael Lippautz wrote: > On 2015/08/31 06:45:29, fedor.indutny wrote: > > On ...
5 years, 3 months ago (2015-08-31 07:21:23 UTC) #31
Michael Lippautz
On 2015/08/31 07:21:23, fedor.indutny wrote: > On 2015/08/31 07:16:39, Michael Lippautz wrote: > > On ...
5 years, 3 months ago (2015-08-31 08:09:44 UTC) #32
Michael Lippautz
Besides fixing the double free, please also rebase on master. We had to land https://codereview.chromium.org/1325643002/ ...
5 years, 3 months ago (2015-08-31 16:08:14 UTC) #33
fedor.indutny
On 2015/08/31 16:08:14, Michael Lippautz wrote: > Besides fixing the double free, please also rebase ...
5 years, 3 months ago (2015-08-31 20:50:01 UTC) #34
fedor.indutny
On 2015/08/31 20:50:01, fedor.indutny wrote: > On 2015/08/31 16:08:14, Michael Lippautz wrote: > > Besides ...
5 years, 3 months ago (2015-08-31 20:51:32 UTC) #35
fedor.indutny
register new_space 0x1031335d0 register new_space 0x103560110 live inc 0x102381a30 live inc 0x102381970 live inc 0x103560110 ...
5 years, 3 months ago (2015-09-01 01:19:19 UTC) #36
fedor.indutny
Michael, I have figured out the problem. See my changes to mark-compact.cc. The buffers from ...
5 years, 3 months ago (2015-09-01 06:19:38 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316873004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316873004/140001
5 years, 3 months ago (2015-09-01 06:26:06 UTC) #40
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 3 months ago (2015-09-01 06:51:59 UTC) #41
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/9e3676da9ab1aaf7de3e8582cb3fdefcc3dbaf33 Cr-Commit-Position: refs/heads/master@{#30495}
5 years, 3 months ago (2015-09-01 06:52:21 UTC) #42
Michael Lippautz
Please wait next time when doing a change in another component, even if l-g-t-m-ed already. ...
5 years, 3 months ago (2015-09-01 08:30:06 UTC) #43
fedor.indutny
Sorry for pushing it out without your ack. I hope this patch looks ok, if ...
5 years, 3 months ago (2015-09-01 08:50:08 UTC) #44
Michael Lippautz
https://codereview.chromium.org/1316873004/diff/140001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1316873004/diff/140001/src/heap/mark-compact.cc#newcode4436 src/heap/mark-compact.cc:4436: // NOTE: ArrayBuffers must be evacuated first, before freeing ...
5 years, 3 months ago (2015-09-01 09:01:36 UTC) #45
fedor.indutny
On 2015/09/01 09:01:36, Michael Lippautz wrote: > https://codereview.chromium.org/1316873004/diff/140001/src/heap/mark-compact.cc > File src/heap/mark-compact.cc (right): > > https://codereview.chromium.org/1316873004/diff/140001/src/heap/mark-compact.cc#newcode4436 ...
5 years, 3 months ago (2015-09-01 09:08:14 UTC) #46
fedor.indutny
Ok, you are definitely right. Looking through the logs that I have collected I see ...
5 years, 3 months ago (2015-09-01 09:15:46 UTC) #47
Michael Lippautz
On 2015/09/01 09:15:46, fedor.indutny wrote: > Ok, you are definitely right. Looking through the logs ...
5 years, 3 months ago (2015-09-01 09:56:52 UTC) #48
Michael Lippautz
5 years, 3 months ago (2015-09-01 09:58:07 UTC) #49
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/1302233007/ by mlippautz@chromium.org.

The reason for reverting is: Precautionary revert. The change is incomplete..

Powered by Google App Engine
This is Rietveld 408576698