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

Issue 1427973006: [heap] make inline allocation step size dynamic (Closed)

Created:
5 years, 1 month ago by ofrobots
Modified:
5 years, 1 month ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[heap] make inline allocation step size dynamic Presently the inline allocation step is a static value defined to be the minimum of the step sizes over all the observers. The step occur every (approx.) step byte. This is unfair to observers whose steps are not evenly divisible by the min step size. For example, consider two observers with steps sizes of 512 and 576 bytes. Across 16kb allocated, you would expect the first observer to be hit approximately 32 times, and the second observer to be hit approximately 28 times. In reality, the observers get notified 30 and 15 times respectively. The reason is that each step is 512 bytes, and since 576 is not evenly divisible by 512, it gets notified much less frequently. This CL fixes the problem by making the next step size be the minimum (over all observers) of the remaining bytes to get to the step, making the steps fair. BUG= R=hpayer@chromium.org,ulan@chromium.org Committed: https://crrev.com/f5836617843cb4749c82954d0788f64736803509 Cr-Commit-Position: refs/heads/master@{#31948}

Patch Set 1 #

Total comments: 4

Patch Set 2 : address code review comments #

Total comments: 2

Patch Set 3 : only assert non-zero next_step when there are > 0 listeners #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -15 lines) Patch
M src/heap/heap.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/heap/spaces.h View 1 6 chunks +3 lines, -4 lines 0 comments Download
M src/heap/spaces.cc View 1 2 3 chunks +17 lines, -10 lines 0 comments Download
M test/cctest/test-spaces.cc View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
ofrobots
5 years, 1 month ago (2015-11-09 18:15:19 UTC) #1
Hannes Payer (out of office)
lgtm https://codereview.chromium.org/1427973006/diff/1/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1427973006/diff/1/src/heap/spaces.cc#newcode1521 src/heap/spaces.cc:1521: for (int i = 0; i < inline_allocation_observers_.length(); ...
5 years, 1 month ago (2015-11-09 19:26:39 UTC) #2
ofrobots
https://codereview.chromium.org/1427973006/diff/1/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1427973006/diff/1/src/heap/spaces.cc#newcode1521 src/heap/spaces.cc:1521: for (int i = 0; i < inline_allocation_observers_.length(); ++i) ...
5 years, 1 month ago (2015-11-09 23:00:32 UTC) #3
Hannes Payer (out of office)
https://codereview.chromium.org/1427973006/diff/20001/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1427973006/diff/20001/src/heap/spaces.cc#newcode1618 src/heap/spaces.cc:1618: DCHECK(next_step != 0); If no observers are registered, the ...
5 years, 1 month ago (2015-11-10 17:36:24 UTC) #4
ofrobots
https://codereview.chromium.org/1427973006/diff/20001/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1427973006/diff/20001/src/heap/spaces.cc#newcode1618 src/heap/spaces.cc:1618: DCHECK(next_step != 0); On 2015/11/10 17:36:24, Hannes Payer wrote: ...
5 years, 1 month ago (2015-11-11 01:46:11 UTC) #5
Hannes Payer (out of office)
lgtm
5 years, 1 month ago (2015-11-11 18:55:54 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1427973006/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1427973006/40001
5 years, 1 month ago (2015-11-11 19:14:48 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/9987) v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 1 month ago (2015-11-11 19:15:48 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1427973006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1427973006/60001
5 years, 1 month ago (2015-11-11 20:23:32 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-11-11 20:55:27 UTC) #14
commit-bot: I haz the power
5 years, 1 month ago (2015-11-14 23:20:15 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f5836617843cb4749c82954d0788f64736803509
Cr-Commit-Position: refs/heads/master@{#31948}

Powered by Google App Engine
This is Rietveld 408576698