Currently we can overshoot the allocation limit if incremental marking is in progress. Investigate if there are better heuristics.
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/1b8fd0dd4ba7d50e664cf265273ef70e70c7cc52 commit 1b8fd0dd4ba7d50e664cf265273ef70e70c7cc52 Author: ulan <ulan@chromium.org> Date: Tue Aug 30 17:58:36 2016 Fix step size computation in IncrementalMarking::AdvanceIncrementalMarking. BUG= chromium:616434 LOG=NO Review-Url: https://codereview.chromium.org/2294783002 Cr-Commit-Position: refs/heads/master@{#39024} [modify] https://crrev.com/1b8fd0dd4ba7d50e664cf265273ef70e70c7cc52/src/heap/incremental-marking.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/71a793e4b1026e69d4009df0a419fe260fe1a235 commit 71a793e4b1026e69d4009df0a419fe260fe1a235 Author: ulan <ulan@chromium.org> Date: Thu Sep 01 08:31:56 2016 [heap] Simplify heuristics for incremental step size. This patch removes the code for speeding up marking. Now the step size depends on allocated bytes and invoked write barriers. We also ensure that the step size is large enough to justify the overhead of interrupting the generated code. BUG= chromium:616434 LOG=NO Review-Url: https://codereview.chromium.org/2290333002 Cr-Commit-Position: refs/heads/master@{#39067} [modify] https://crrev.com/71a793e4b1026e69d4009df0a419fe260fe1a235/src/heap/heap.cc [modify] https://crrev.com/71a793e4b1026e69d4009df0a419fe260fe1a235/src/heap/heap.h [modify] https://crrev.com/71a793e4b1026e69d4009df0a419fe260fe1a235/src/heap/incremental-marking.cc [modify] https://crrev.com/71a793e4b1026e69d4009df0a419fe260fe1a235/src/heap/incremental-marking.h
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/d09e026a9e5c5da7e6b7f2d4bc08f763cea36a18 commit d09e026a9e5c5da7e6b7f2d4bc08f763cea36a18 Author: ulan <ulan@chromium.org> Date: Thu Sep 01 17:28:46 2016 Revert of [heap] Simplify heuristics for incremental step size. (patchset #5 id:180001 of https://codereview.chromium.org/2290333002/ ) Reason for revert: Regressed GC times in v8.infinite_scroll_tbmv2 benchmarks. Original issue's description: > [heap] Simplify heuristics for incremental step size. > > This patch removes the code for speeding up marking. > > Now the step size depends on allocated bytes and > invoked write barriers. > > We also ensure that the step size is large enough to > justify the overhead of interrupting the generated code. > > BUG= chromium:616434 > LOG=NO > > Committed: https://crrev.com/71a793e4b1026e69d4009df0a419fe260fe1a235 > Cr-Commit-Position: refs/heads/master@{#39067} TBR=mlippautz@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= chromium:616434 Review-Url: https://codereview.chromium.org/2304613002 Cr-Commit-Position: refs/heads/master@{#39098} [modify] https://crrev.com/d09e026a9e5c5da7e6b7f2d4bc08f763cea36a18/src/heap/heap.cc [modify] https://crrev.com/d09e026a9e5c5da7e6b7f2d4bc08f763cea36a18/src/heap/heap.h [modify] https://crrev.com/d09e026a9e5c5da7e6b7f2d4bc08f763cea36a18/src/heap/incremental-marking.cc [modify] https://crrev.com/d09e026a9e5c5da7e6b7f2d4bc08f763cea36a18/src/heap/incremental-marking.h
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/eca8a5ebbdab6b3276fca3abead893fd721336a0 commit eca8a5ebbdab6b3276fca3abead893fd721336a0 Author: ulan <ulan@chromium.org> Date: Tue Sep 06 15:28:54 2016 [heap] Refactor incremental marking step. This patch - extracts the logic of keeping track of allocated bytes from the actual incremental marking step. - replaces OldSpaceStep with a check for incremental marking start. - removes the force_marking parameter of AdvanceIncrementalMarking. BUG= chromium:616434 LOG=NO Review-Url: https://codereview.chromium.org/2304123003 Cr-Commit-Position: refs/heads/master@{#39213} [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/src/heap/heap.cc [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/src/heap/heap.h [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/src/heap/incremental-marking-job.cc [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/src/heap/incremental-marking.cc [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/src/heap/incremental-marking.h [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/src/heap/memory-reducer.cc [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/src/heap/spaces.cc [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/test/cctest/heap/heap-utils.cc [modify] https://crrev.com/eca8a5ebbdab6b3276fca3abead893fd721336a0/test/cctest/heap/test-heap.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/6a1b49d79c610cc981ec35598a8a070951f8c3f7 commit 6a1b49d79c610cc981ec35598a8a070951f8c3f7 Author: ulan <ulan@chromium.org> Date: Mon Sep 12 11:46:14 2016 [heap] Do more incremental marking work in tasks. This patch changes incremental marking work scheduling from combination of idle/delayed tasks to ordinary short-running tasks and moves more marking work from V8.Execute to tasks by accounting how much bytes were marked in tasks. BUG= chromium:616434 LOG=NO Review-Url: https://codereview.chromium.org/2321553002 Cr-Commit-Position: refs/heads/master@{#39348} [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/src/heap/heap.cc [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/src/heap/incremental-marking-job.cc [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/src/heap/incremental-marking-job.h [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/src/heap/incremental-marking.cc [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/src/heap/incremental-marking.h [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/src/heap/memory-reducer.cc [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/test/cctest/heap/heap-utils.cc [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/test/cctest/heap/test-heap.cc [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/test/cctest/heap/test-incremental-marking.cc [modify] https://crrev.com/6a1b49d79c610cc981ec35598a8a070951f8c3f7/test/cctest/heap/test-spaces.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/672d079ccba686019fa1457c83b42c2e692ef88b commit 672d079ccba686019fa1457c83b42c2e692ef88b Author: ulan <ulan@chromium.org> Date: Tue Sep 13 08:53:56 2016 [heap] Decouple old generation allocation limit from external memory. We check for external memory limit in Heap::ReportExternalMemoryPressure. BUG= chromium:616434 Review-Url: https://codereview.chromium.org/2329993002 Cr-Commit-Position: refs/heads/master@{#39374} [modify] https://crrev.com/672d079ccba686019fa1457c83b42c2e692ef88b/src/heap/heap-inl.h [modify] https://crrev.com/672d079ccba686019fa1457c83b42c2e692ef88b/src/heap/heap.h [modify] https://crrev.com/672d079ccba686019fa1457c83b42c2e692ef88b/src/heap/incremental-marking.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/eeb4f28aed721c343d43be6e454fafba4c0f7ea6 commit eeb4f28aed721c343d43be6e454fafba4c0f7ea6 Author: ulan <ulan@chromium.org> Date: Thu Sep 15 10:13:40 2016 Revert of [heap] Decouple old generation allocation limit from external memory. (patchset #1 id:1 of https://codereview.chromium.org/2329993002/ ) Reason for revert: Regressions in telemetry benchmarks: crbug.com/646819 . Original issue's description: > [heap] Decouple old generation allocation limit from external memory. > > We check for external memory limit in Heap::ReportExternalMemoryPressure. > > BUG= chromium:616434 > > Committed: https://crrev.com/672d079ccba686019fa1457c83b42c2e692ef88b > Cr-Commit-Position: refs/heads/master@{#39374} TBR=hpayer@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG= chromium:616434 Review-Url: https://codereview.chromium.org/2339033005 Cr-Commit-Position: refs/heads/master@{#39442} [modify] https://crrev.com/eeb4f28aed721c343d43be6e454fafba4c0f7ea6/src/heap/heap-inl.h [modify] https://crrev.com/eeb4f28aed721c343d43be6e454fafba4c0f7ea6/src/heap/heap.h [modify] https://crrev.com/eeb4f28aed721c343d43be6e454fafba4c0f7ea6/src/heap/incremental-marking.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/1beb89f24cb01663843a7519921e7caf0910c760 commit 1beb89f24cb01663843a7519921e7caf0910c760 Author: ulan <ulan@chromium.org> Date: Wed Sep 28 13:27:44 2016 [heap] New heuristics for incremental marking step size. This patch simplifies code for speeding up marking and removes write barrier counter. The step size is now computed based in two parts: - bytes to mark in order to keep up with allocation, - bytes to mark in order to make progress. BUG= chromium:616434 , chromium:646139 , chromium:644819 LOG=NO Review-Url: https://codereview.chromium.org/2359903002 Cr-Commit-Position: refs/heads/master@{#39827} [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/src/arm/code-stubs-arm.cc [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/src/arm64/code-stubs-arm64.cc [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/src/heap/heap.cc [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/src/heap/heap.h [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/src/heap/incremental-marking.cc [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/src/heap/incremental-marking.h [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/src/ia32/code-stubs-ia32.cc [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/src/x64/code-stubs-x64.cc [modify] https://crrev.com/1beb89f24cb01663843a7519921e7caf0910c760/test/cctest/heap/test-heap.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/55683ddd2a32e0dfb8df66271fbf53e3618cce9d commit 55683ddd2a32e0dfb8df66271fbf53e3618cce9d Author: ulan <ulan@chromium.org> Date: Wed Sep 28 14:43:23 2016 [heap] New heuristics for starting of incremental marking. The motivation for this patch is to move more marking work to tasks. This is done by postponing the start of incremental marking until a marking task is running. This patch introduces a soft and a hard limits for incremental marking. When the soft limit is reached, the marking task is scheduled. If the hard limit is reached before the task is running, then incremental marking is started without waiting for the task. BUG= chromium:616434 LOG=NO Review-Url: https://codereview.chromium.org/2364923002 Cr-Commit-Position: refs/heads/master@{#39831} [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/src/heap/heap-inl.h [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/src/heap/heap.cc [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/src/heap/heap.h [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/src/heap/incremental-marking-job.cc [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/src/heap/incremental-marking.cc [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/src/heap/incremental-marking.h [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/src/heap/spaces.cc [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/test/cctest/heap/heap-tester.h [modify] https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d/test/cctest/heap/test-heap.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/a5440d11908d3a096aa570d62a01a9a018b8af48 commit a5440d11908d3a096aa570d62a01a9a018b8af48 Author: machenbach <machenbach@chromium.org> Date: Wed Sep 28 15:19:53 2016 Revert of [heap] New heuristics for starting of incremental marking. (patchset #9 id:160001 of https://codereview.chromium.org/2364923002/ ) Reason for revert: OOMs in nosnap debug: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/9572 Original issue's description: > [heap] New heuristics for starting of incremental marking. > > The motivation for this patch is to move more marking work to tasks. > This is done by postponing the start of incremental marking until > a marking task is running. > > This patch introduces a soft and a hard limits for incremental marking. > When the soft limit is reached, the marking task is scheduled. > If the hard limit is reached before the task is running, then > incremental marking is started without waiting for the task. > > BUG= chromium:616434 > LOG=NO > > Committed: https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d > Cr-Commit-Position: refs/heads/master@{#39831} TBR=hpayer@chromium.org,ulan@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= chromium:616434 Review-Url: https://codereview.chromium.org/2375983002 Cr-Commit-Position: refs/heads/master@{#39833} [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/src/heap/heap-inl.h [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/src/heap/heap.cc [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/src/heap/heap.h [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/src/heap/incremental-marking-job.cc [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/src/heap/incremental-marking.cc [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/src/heap/incremental-marking.h [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/src/heap/spaces.cc [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/test/cctest/heap/heap-tester.h [modify] https://crrev.com/a5440d11908d3a096aa570d62a01a9a018b8af48/test/cctest/heap/test-heap.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/7e652694a0bd29da4891ac7d7acf2f0e25930cd1 commit 7e652694a0bd29da4891ac7d7acf2f0e25930cd1 Author: ulan <ulan@chromium.org> Date: Wed Sep 28 17:51:48 2016 Reland "[heap] New heuristics for starting of incremental marking. (patchset #9 id:160001 of https://codereview.chromium.org/2364923002/ )" This reverts commit a5440d11908d3a096aa570d62a01a9a018b8af48. BUG= chromium:616434 TBR=hpayer@chromium.org LOG=NO Review-Url: https://codereview.chromium.org/2379663002 Cr-Commit-Position: refs/heads/master@{#39838} [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/src/heap/heap-inl.h [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/src/heap/heap.cc [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/src/heap/heap.h [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/src/heap/incremental-marking-job.cc [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/src/heap/incremental-marking.cc [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/src/heap/incremental-marking.h [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/src/heap/spaces.cc [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/test/cctest/heap/heap-tester.h [modify] https://crrev.com/7e652694a0bd29da4891ac7d7acf2f0e25930cd1/test/cctest/heap/test-heap.cc
Comment 1 by bugdroid1@chromium.org
, Aug 30 2016