Commit Graph

43 Commits

Author SHA1 Message Date
mlippautz
fdb0784d0a [heap] Remove LocalStoreBuffer and add slots in parallel
Now that we have page-local remembered sets (due to refilling in page
granularity) we can perform all updates on the sets during compaction in
parallel without caching slots locally.

BUG=chromium:524425
LOG=N
NOTRY=true

Review URL: https://codereview.chromium.org/1811573002

Cr-Commit-Position: refs/heads/master@{#34952}
2016-03-21 16:01:01 +00:00
ulan
01b8fc894b Reland "Replace slots buffer with remembered set. (patchset #14 id:250001 of https://codereview.chromium.org/1703823002/ )"
This reverts commit 9146bc5e20.

This contains a fix for the following crash:
1. We record slots for a fixed array.
2. We trim the fixed array, so that some recorded slots are now in free space.
3. During mark-compact we sweep the page with the fixed array. Now free list items contain memory with recorded slots.
4. We evacuate a byte array using the new free list items.
5. We iterate slots that are now inside the byte array and crash.

BUG=chromium:589413,chromium:578883
LOG=NO

Review URL: https://codereview.chromium.org/1735523002

Cr-Commit-Position: refs/heads/master@{#34302}
2016-02-25 17:29:22 +00:00
ulan
9146bc5e20 Revert of Replace slots buffer with remembered set. (patchset #14 id:250001 of https://codereview.chromium.org/1703823002/ )
Reason for revert:
Revert because of canary crashes: crbug.com/589413

Original issue's description:
> Replace slots buffer with remembered set.
>
> Slots pointing to evacuation candidates are now recorded in the new RememberedSet<OLD_TO_OLD>.
>
> The remembered set is extended to support typed slots.
>
> During parallel evacuation all migration slots are recorded in local slots buffers.
> After evacuation all local slots are added to the remembered set.
>
> BUG=chromium:578883
> LOG=NO
>
> Committed: https://crrev.com/2285a99ef6f7d52f4f0c4d88a7db4224443ee152
> Cr-Commit-Position: refs/heads/master@{#34212}

TBR=jochen@chromium.org,hpayer@chromium.org,mlippautz@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:578883

Review URL: https://codereview.chromium.org/1725073003

Cr-Commit-Position: refs/heads/master@{#34238}
2016-02-24 09:48:21 +00:00
ulan
2285a99ef6 Replace slots buffer with remembered set.
Slots pointing to evacuation candidates are now recorded in the new RememberedSet<OLD_TO_OLD>.

The remembered set is extended to support typed slots.

During parallel evacuation all migration slots are recorded in local slots buffers.
After evacuation all local slots are added to the remembered set.

BUG=chromium:578883
LOG=NO

Review URL: https://codereview.chromium.org/1703823002

Cr-Commit-Position: refs/heads/master@{#34212}
2016-02-23 13:53:02 +00:00
ulan
b238864d0e Activate memory reducer for small heaps in background tabs.
BUG=chromium:587574
LOG=NO

Review URL: https://codereview.chromium.org/1705183003

Cr-Commit-Position: refs/heads/master@{#34188}
2016-02-22 10:52:36 +00:00
ulan
017d128b6e Filter invalid slots after array trimming.
If sweeping is in progress then we need to filter out slots in free space after
array trimming, because the sweeper will add the free space into free list.

This CL also fixes a bug in SlotSet::RemoveRange.

BUG=chromium:587004
LOG=NO
TBR=hpayer@chromium.org

Review URL: https://codereview.chromium.org/1701963003

Cr-Commit-Position: refs/heads/master@{#34071}
2016-02-17 11:53:06 +00:00
ulan
bb883395a8 New page local store buffer.
This replaces the global remembered set with per-page remembered sets.

Each page in the old space, map space, and large object space keeps track of
the set of slots in the page pointing to the new space.

The data structure for storing slot sets is a two-level bitmap, which allows
us to remove the store buffer overflow and SCAN_ON_SCAVENGE logic.

Design doc: https://goo.gl/sMKCf7

BUG=chromium:578883
LOG=NO

Review URL: https://codereview.chromium.org/1608583002

Cr-Commit-Position: refs/heads/master@{#33806}
2016-02-08 08:51:38 +00:00
ulan
7ac5af5c12 Remove special handling of background idle notification in memory reducer.
BUG=chromium:490559
LOG=NO

Review URL: https://codereview.chromium.org/1420363004

Cr-Commit-Position: refs/heads/master@{#31600}
2015-10-27 12:35:56 +00:00
mlippautz
3feba64470 [heap] Fix mark bits for partially compacted pages.
See bug report.

R=ulan@chromium.org
BUG=chromium:538567
LOG=N

Review URL: https://codereview.chromium.org/1393293002

Cr-Commit-Position: refs/heads/master@{#31179}
2015-10-08 13:49:30 +00:00
ulan
7549792863 Fix Heap::ComputeHeapState after 057514 and 6256dc.
This restores size_of_objects and removed unused fields.

BUG=chromium:538539
LOG=NO

Review URL: https://codereview.chromium.org/1380953003

Cr-Commit-Position: refs/heads/master@{#31072}
2015-10-02 12:58:37 +00:00
ulan
6256dc53cc Perform scavenge in idle tasks.
BUG=chromium:490559
LOG=NO

Review URL: https://codereview.chromium.org/1352453004

Cr-Commit-Position: refs/heads/master@{#30944}
2015-09-25 14:49:23 +00:00
mstarzinger
ca5780690d [heap] No leakage of gc-idle-time-handler.h outside of heap.
This prevents the internal gc-idle-time-handler.h to be usable outisde
of the "heap" directory. The logic inside that component is only useful
within the GC and is now properly encapsulated.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/1368983002

Cr-Commit-Position: refs/heads/master@{#30939}
2015-09-25 13:55:30 +00:00
ulan
057514d3fa Use idle task to perform incremental marking steps.
This moves incremental marking steps from gc-idle-time-handler and heap to the new incremental marking task.

BUG=chromium:490559
LOG=NO

Review URL: https://codereview.chromium.org/1265423002

Cr-Commit-Position: refs/heads/master@{#30641}
2015-09-08 15:54:37 +00:00
hpayer
9df592c1c5 When allocation rate is low and we are close to the new space limit, we should perform a scavenge during idle time.
BUG=chromium:517395
LOG=n

Review URL: https://codereview.chromium.org/1272573006

Cr-Commit-Position: refs/heads/master@{#30044}
2015-08-06 12:10:42 +00:00
ulan
d8ad147944 Grow heap slowly after running memory reducer.
BUG=

Review URL: https://codereview.chromium.org/1261373006

Cr-Commit-Position: refs/heads/master@{#29987}
2015-08-03 18:45:53 +00:00
ulan
b4cfd60e07 Ensure the memory reduces makes progress.
BUG=

Review URL: https://codereview.chromium.org/1262363002

Cr-Commit-Position: refs/heads/master@{#29950}
2015-07-31 10:28:16 +00:00
ulan
fe8c8c3bc5 Start incremental marking in long idle notification for background tab
disregarding the allocation throughput.

BUG=chromium:506132
LOG=NO

Review URL: https://codereview.chromium.org/1213313004

Cr-Commit-Position: refs/heads/master@{#29515}
2015-07-07 12:30:58 +00:00
ulan
a7f62edb71 Reland "Replace reduce-memory mode in idle notification with delayed clean-up GC."
This reverts commit 269918927a.
This reverts commit 435b3c873a.

The failing test is fixing in chromium.

BUG=chromium:490559
LOG=NO
TBR=hpayer@chromium.org

Review URL: https://codereview.chromium.org/1208993009

Cr-Commit-Position: refs/heads/master@{#29512}
2015-07-07 11:37:53 +00:00
machenbach
269918927a Revert of Replace reduce-memory mode in idle notification with delayed clean-up GC. (patchset #17 id:320001 of https://codereview.chromium.org/1218863002/)
Reason for revert:
[Sheriff] Looks like it blocks the roll (bisected). Speculative revert.
https://codereview.chromium.org/1210293003/

Original issue's description:
> Replace reduce-memory mode in idle notification with delayed clean-up GC.
>
> BUG=490559
> LOG=NO
>
> Committed: https://crrev.com/0ecd9e1bd2c6b519d4e7285f46cb7e844bc2235c
> Cr-Commit-Position: refs/heads/master@{#29451}

TBR=hpayer@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=490559

Review URL: https://codereview.chromium.org/1226703002

Cr-Commit-Position: refs/heads/master@{#29470}
2015-07-05 18:19:03 +00:00
ulan
0ecd9e1bd2 Replace reduce-memory mode in idle notification with delayed clean-up GC.
BUG=490559
LOG=NO

Review URL: https://codereview.chromium.org/1218863002

Cr-Commit-Position: refs/heads/master@{#29451}
2015-07-02 15:41:36 +00:00
ulan
143a9e0431 Compute the heap growing factor based on mutator utilization and allocation throughput.
Doc: https://goo.gl/LLGvBs

BUG=

Review URL: https://codereview.chromium.org/1163143009

Cr-Commit-Position: refs/heads/master@{#29015}
2015-06-15 08:32:59 +00:00
ulan
f2f8001f1b Take freed handles into account when scheduling idle GCs.
BUG=

Review URL: https://codereview.chromium.org/1145103002

Cr-Commit-Position: refs/heads/master@{#28508}
2015-05-20 12:09:52 +00:00
ulan
39491c5168 Restore NothingOrDone action in idle time handler.
This also adjusts transitioning between modes so that crbug.com/460090 remains fixed.

BUG=chromium:489323, chromium:460090
LOG=NO

Review URL: https://codereview.chromium.org/1141393002

Cr-Commit-Position: refs/heads/master@{#28490}
2015-05-19 18:12:07 +00:00
hpayer
6ead193b51 Make sure that idle scavenges are just performed when enough objects are allocated in new space.
BUG=

Review URL: https://codereview.chromium.org/1138643003

Cr-Commit-Position: refs/heads/master@{#28428}
2015-05-15 16:06:08 +00:00
hpayer
bc9e53406e When context disposal rate is high and we cannot perform a full GC, we do nothing until the context disposal rate becomes lower.
BUG=chromium:473351
LOG=n

Review URL: https://codereview.chromium.org/1118303004

Cr-Commit-Position: refs/heads/master@{#28416}
2015-05-15 07:48:07 +00:00
ulan
bbca83c398 Make transition to reduce memory mode more conservative in idle time handler.
BUG=chromium:486005
LOG=NO

Review URL: https://codereview.chromium.org/1131943004

Cr-Commit-Position: refs/heads/master@{#28378}
2015-05-12 17:24:58 +00:00
ulan
ae6a0b8075 Add mode to reduce memory usage in idle notification.
While the mutator is active, the idle time handler optimizes for latency by doing only incremental steps and scavenges.

When the mutator becomes inactive, the idle time handler forces few incremental GCs to reclaim memory and then stops until mutator is active again.

BUG=460090
LOG=N

Review URL: https://codereview.chromium.org/1105293004

Cr-Commit-Position: refs/heads/master@{#28300}
2015-05-07 14:41:54 +00:00
machenbach
7898475e92 Revert of Make full GC reduce memory footprint an explicit event in the idle notification handler. (patchset #2 id:20001 of https://codereview.chromium.org/1072363002/)
Reason for revert:
[Sheriff] breaks nosnap with timeouts:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/2513
http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/6220

Original issue's description:
> Make full GC reduce memory footprint an explicit event in the idle notification handler.
>
> BUG=
>
> Committed: https://crrev.com/845705aa99b6bfa8d264cfda1c3b5f1229802ab5
> Cr-Commit-Position: refs/heads/master@{#27753}

TBR=ulan@chromium.org,rmcilroy@chromium.org,hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1081443002

Cr-Commit-Position: refs/heads/master@{#27755}
2015-04-10 18:21:43 +00:00
hpayer
845705aa99 Make full GC reduce memory footprint an explicit event in the idle notification handler.
BUG=

Review URL: https://codereview.chromium.org/1072363002

Cr-Commit-Position: refs/heads/master@{#27753}
2015-04-10 14:06:46 +00:00
rmcilroy
00477a5d72 Ensure that GC idle notifications either make progress or stop requesting more GCs.
The V8::IdleNotification will only return 'True' when the gc idle time handler
thinks there is no more GC which can be done. However, the gc idle task handler
can end up repeatedly making no progress (e.g., if it can't finalize a sweep)
which causes idle tasks to be repeatedly scheduled in Chrome which do nothing
but wake up Chrome. Fix this by returning Done if we can't make any progress
within an Idle Round.

BUG=chromium:470615
LOG=Y

Review URL: https://codereview.chromium.org/1042483002

Cr-Commit-Position: refs/heads/master@{#27529}
2015-03-30 17:05:02 +00:00
hpayer
bffde6f4ab Allow more scavenges in idle notification by increasing the new space limit distance.
BUG=chromium:468554
LOG=n

Review URL: https://codereview.chromium.org/1034403002

Cr-Commit-Position: refs/heads/master@{#27517}
2015-03-30 11:40:06 +00:00
hpayer
eda9a88f2f Finalize sweeping in idle notification when all pages are swept.
A follow-up CL will implement incremental sweeping during idle time.

BUG=

Review URL: https://codereview.chromium.org/1038283003

Cr-Commit-Position: refs/heads/master@{#27513}
2015-03-30 10:05:35 +00:00
hpayer
c293448f3e Simplified garbage collection idle handler.
The current GC idle time handling heuristics are getting too complicated. Moreover, with longer idle time we are getting more full garbage collections. This CL shrinks the idle round window and reduces complexity in the case where we cause a full garbage collection.

BUG=chromium:468554
LOG=n

Review URL: https://codereview.chromium.org/1024043003

Cr-Commit-Position: refs/heads/master@{#27493}
2015-03-27 08:00:51 +00:00
hpayer
297935b34f Use deadline in IdleNotification.
BUG=417668
LOG=n

Review URL: https://codereview.chromium.org/750813003

Cr-Commit-Position: refs/heads/master@{#25560}
2014-11-28 10:59:24 +00:00
Hannes Payer
5c3d1cbf75 Re-land: Distinguish beween final incremental mark-compact and full mark-compact event in IdleNotification.
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/765743002

Cr-Commit-Position: refs/heads/master@{#25545}
2014-11-27 12:39:57 +00:00
Benedikt Meurer
a01f4d871a Revert "Distinguish beween final incremental mark-compact and full mark-compact event in IdleNotification."
This reverts commit d15d453fa5 for
breaking cctest/test-api/Threading3.

TBR=hpayer@chromium.org

Review URL: https://codereview.chromium.org/758163003

Cr-Commit-Position: refs/heads/master@{#25506}
2014-11-26 05:12:36 +00:00
hpayer
d15d453fa5 Distinguish beween final incremental mark-compact and full mark-compact event in IdleNotification.
BUG=

Review URL: https://codereview.chromium.org/727323004

Cr-Commit-Position: refs/heads/master@{#25501}
2014-11-25 13:41:57 +00:00
hpayer@chromium.org
19c3296988 Remove heap size filter for context disposal garbage collection.
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/712563002

Cr-Commit-Position: refs/heads/master@{#25213}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 13:07:47 +00:00
hpayer@chromium.org
c0ac2ab9d0 Perform context disposal garbage collections only if contexts disposals happen at a high rate.
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/710603003

Cr-Commit-Position: refs/heads/master@{#25208}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 09:37:11 +00:00
jochen@chromium.org
2147d5a145 Use an idle notification of 0ms as hint that a GC after context disposal is triggerd
BUG=none
R=ulan@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/671513006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 12:56:52 +00:00
hpayer@chromium.org
d1e693a43a Check if there is still time before finalizing an incremental collection.
BUG=
R=erik.corry@gmail.com, ulan@chromium.org

Review URL: https://codereview.chromium.org/629903003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 16:27:55 +00:00
hpayer@chromium.org
ad6b41ffa7 Force scavenge in idle notification if we estimate that it will take long.
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/583593006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 07:21:53 +00:00
bmeurer@chromium.org
bfd37ab267 Move unit tests to test/unittests.
As per discussion on the V8 team, this is the place we want them to live,
not following the Chrome Style Guide for this.

BUG=v8:3489
LOG=y
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/615393002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 08:34:25 +00:00