Commit Graph

287 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
a4c4862ed8 Unify object groups iteration in global handles.
This unifies the iteration logic of objects groups iteration in global
handles. The scavenger as well as mark-and-compact now rely on the same
underlying logic.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-04 10:23:43 +00:00
hpayer@chromium.org
395db15950 Remove eager sweeping for lazy swept spaces. Try to find in SlowAllocateRaw a bounded number of times a big enough memory slot.
BUG=v8:2194

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-26 14:50:20 +00:00
mstarzinger@chromium.org
5dec1423a4 Implement progress bar for large objects.
This implements incremental scanning of large objects using a progress
bar in the page header of such objects. Note that this requires forward
white to gray transitions in the write barrier and hence is disabled by
default for now.

R=ulan@chromium.org,hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 17:57:40 +00:00
danno@chromium.org
bd4e114b8e Add code again to allow reclaiming old unexecuted functions.
When code objects in the heap for FUNCTIONs and OPTIMIZED_FUNCTIONs are marked by the GC, their prologue is patched with a call to a stub that removes the patch. This allows the collector to quickly identify code objects that haven't been executed since the last full collection (they are the ones that sill contain the patch). The functionality is currently disabled, but can be activated by specifying the "--age-code".

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 12:18:11 +00:00
mstarzinger@chromium.org
8e7ae24b40 Fix disabling of code flusher while marking.
This fixes a corner case when the code flusher is disabled while
incremental marking is running. The list of candidates needs to be
evicted to prevent list fragments without a head floating around.

R=ulan@chromium.org
BUG=chromium:159140

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 10:26:50 +00:00
mstarzinger@chromium.org
03ba764f3e Put incremental code flushing behind a flag.
This is used to disable incremental code flushing by default for now
until we can stabilize it and make it ready for production.

R=verwaest@chromium.org
BUG=chromium:159140

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 11:54:05 +00:00
mstarzinger@chromium.org
014f00fa51 Fix code flusher to process weak function links.
This fixes a corner case where weak function links of the code flushing
candidates list were destroyed by scavenges that happened during
incremental marking. Now those weak function links are updated while
scavenging happens.

R=ulan@chromium.org
TEST=cctest/test-heap/TestCodeFlushingIncrementalScavenge

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-26 09:44:34 +00:00
mstarzinger@chromium.org
cee59bf522 Enable incremental code flushing.
This enables code flushing even with incremental marking enabled and
fully shares the function link field in JSFunctions between candidates
for code flushing and the optimized functions list. If a candidate for
code flushing gets optimized, it will be evicted from the candidates
list.

R=ulan@chromium.org
BUG=v8:1609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 08:25:04 +00:00
danno@chromium.org
43e248d2e5 Use movw/movt instead of constant pool on ARMv7.
Some ARM architectures load 32-bit immediate constants more efficiently using movw/movt pairs rather than constant pool loads. This patch allows the assembler to generate one or the other load form at runtime depending on what is faster.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 12:21:42 +00:00
danno@chromium.org
9d43ff71b8 Avoid unnecessary code target changes during code compaction.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 12:01:36 +00:00
mstarzinger@chromium.org
d9e3d35c07 Switch code flushing to use different JSFunction field.
This is another preparation for incremental code flushing. Instead of
linking candidates using the code entry field, we use the next pointer
that is also used to link optimized functions together. Since we only
support flushing of unoptimized code, this field can be shared.

R=ulan@chromium.org
BUG=v8:1609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 14:43:57 +00:00
mstarzinger@chromium.org
3d0d211764 Ensure code flushing is disabled in incremental marking.
This fixes some test failures since r12714 which shared the code for
code flushing between full and incremental marking and is only a quick
fix until we can enable incremental code flushing.

R=jkummerow@chromium.org
BUG=v8:1609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 09:25:30 +00:00
mstarzinger@chromium.org
bf85da7441 Move code flushing support into shared visitor.
This is a first step towards incremental code flushing. The code
flushing support is now shared between full and incremental marking.
The code flusher itself is not yet activated in incremental mode and
will require some additional adaptations.

R=ulan@chromium.org
BUG=v8:1609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 12:41:29 +00:00
mvstanton@chromium.org
b3c0ed8245 Enable --verify-heap in release mode
R=mstarzinger@chromium.org
BUG=v8:2120

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 11:41:14 +00:00
mstarzinger@chromium.org
4887285da4 Make GDBJIT interface compile again.
R=ulan@chromium.org
BUG=v8:1804

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 08:24:58 +00:00
verwaest@chromium.org
6e1bafc808 Revert "Allow partial scanning of large arrays in order to avoid"
This reverts commit r12619.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11029023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-04 11:09:17 +00:00
mstarzinger@chromium.org
739c9f6f01 Fix slot recording of code target patches.
This makes sure that we only record relocation slots for code target
patches that happen in marked objects. Unmarked ones might be visited
again, whereas marked ones are alive and will not be visited again.

R=ulan@chromium.org
BUG=chromium:152615,chromium:144230

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 15:46:55 +00:00
erik.corry@gmail.com
aba09dcf2e Allow partial scanning of large arrays in order to avoid
mark stack overflow.  This is a reland of r12609 -
https://chromiumcodereview.appspot.com/10959011 - but
this time VisitPointers has been fixed (it used to assume
that the first slot was on the first page of a large object).
Review URL: https://chromiumcodereview.appspot.com/10996018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 12:17:24 +00:00
erik.corry@gmail.com
5547815daf Revert 12609 (Allow partial scanning of large arrays)
due to crashes in unbox-double-arrays.js test.
Review URL: https://chromiumcodereview.appspot.com/10996017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 08:55:19 +00:00
erik.corry@gmail.com
a54e007a95 Allow partial scanning of large arrays in order to avoid
mark stack overflow.
Review URL: https://chromiumcodereview.appspot.com/10959011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 08:33:15 +00:00
mstarzinger@chromium.org
3018b875b1 Integrate map marking into static marking visitor.
This refactors the specialized marking of map contents to be done by the
static marking visitor shared between full and incremental marking. This
also fixes an issue where some maps weren't accounted for in the object
stats tracker. But more importantly, it simplifies the code base.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 10:04:39 +00:00
verwaest@chromium.org
fb506e0864 Only count the descriptor array if it's owned by the map.
Review URL: https://chromiumcodereview.appspot.com/10918245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 13:37:41 +00:00
verwaest@chromium.org
ebd3241b05 Sharing of descriptor arrays.
This CL adds multiple things:
Transition arrays do not directly point at their descriptor array anymore, but rather do so via an indirect pointer (a JSGlobalPropertyCell).

An ownership bit is added to maps indicating whether it owns its own descriptor array or not.

Maps owning a descriptor array can pass on ownership if a transition from that map is generated; but only if the descriptor array stays exactly the same; or if a descriptor is added.

Maps that don't have ownership get ownership back if their direct child to which ownership was passed is cleared in ClearNonLiveTransitions.

To detect which descriptors in an array are valid, each map knows its own NumberOfOwnDescriptors. Since the descriptors are sorted in order of addition, if we search and find a descriptor with index bigger than this number, it is not valid for the given map.

We currently still build up an enumeration cache (although this may disappear). The enumeration cache is always built for the entire descriptor array, even if not all descriptors are owned by the map. Once a descriptor array has an enumeration cache for a given map; this invariant will always be true, even if the descriptor array was extended. The extended array will inherit the enumeration cache from the smaller descriptor array. If a map with more descriptors needs an enumeration cache, it's EnumLength will still be set to invalid, so it will have to recompute the enumeration cache. This new cache will also be valid for smaller maps since they have their own enumlength; and use this to loop over the cache. If the EnumLength is still invalid, but there is already a cache present that is big enough; we just initialize the EnumLength field for the map.

When we apply ClearNonLiveTransitions and descriptor ownership is passed back to a parent map, the descriptor array is trimmed in-place and resorted. At the same time, the enumeration cache is trimmed in-place.

Only transition arrays contain descriptor arrays. If we transition to a map and pass ownership of the descriptor array along, the child map will not store the descriptor array it owns. Rather its parent will keep the pointer. So for every leaf-map, we find the descriptor array by following the back pointer, reading out the transition array, and fetching the descriptor array from the JSGlobalPropertyCell. If a map has a transition array, we fetch it from there. If a map has undefined as its back-pointer and has no transition array; it is considered to have an empty descriptor array.

When we modify properties, we cannot share the descriptor array. To accommodate this, the child map will get its own transition array; even if there are not necessarily any transitions leaving from the child map. This is necessary since it's the only way to store its own descriptor array.

Review URL: https://chromiumcodereview.appspot.com/10909007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 16:43:57 +00:00
erik.corry@gmail.com
1987542825 Fix invariant so that we cannot record relocation slots for
white objects when compacting.  Add flag for incremental code
compaction.
Review URL: https://chromiumcodereview.appspot.com/10907174

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 14:01:39 +00:00
rossberg@chromium.org
55e6227817 Rename JSGlobalProxy::context to native_context,
for clarity and consistency with GlobalObject::native_context.

R=svenpanne@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10861007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 11:35:50 +00:00
rossberg@chromium.org
984d0b0925 Rename Context::global to Context::global_object,
in preparation for global lexical scope.

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10832365

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 12:59:00 +00:00
rossberg@chromium.org
42552808ab Rename "global context" to "native context",
in anticipation of the upcoming lexical global scope.

Mostly automatised as:

for FILE in `egrep -ril "global[ _]?context" src test/cctest`
do
  echo $FILE
  sed "s/Global context/Native context/g" <$FILE >$FILE.0
  sed "s/global context/native context/g" <$FILE.0 >$FILE.1
  sed "s/global_context/native_context/g" <$FILE.1 >$FILE.2
  sed "s/GLOBAL_CONTEXT/NATIVE_CONTEXT/g" <$FILE.2 >$FILE.3
  sed "s/GlobalContext/NativeContext/g" <$FILE.3 >$FILE
  rm $FILE.[0-9]
done

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10832342

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 09:03:08 +00:00
verwaest@chromium.org
d53de0590a Swapped transition array and descriptor array.
Now a map points to a transition array which contains the descriptor array. The descriptor array is now immutable. The next step is to share the descriptor array with all back-pointed maps as long as there is a single line of extension. Maps that require a descriptor array but don't need transitions will still need a pseudo-empty transition array to contain the descriptor array.

Review URL: https://chromiumcodereview.appspot.com/10816005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 08:43:16 +00:00
erik.corry@gmail.com
9b3068bedd Fix intermittent failure in ReleaseOverReservedPages on x64.
BUG=v8:2216
Review URL: https://chromiumcodereview.appspot.com/10828253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 13:45:22 +00:00
mstarzinger@chromium.org
6cfc3f4c18 Remove obsolete SLOT_ADDR macro usages.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10823254

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 12:25:03 +00:00
mstarzinger@chromium.org
235d8b4f94 Fix integer division truncation error.
Review URL: https://chromiumcodereview.appspot.com/10831148
Patch from Nico Weber <thakis@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 13:23:52 +00:00
mstarzinger@chromium.org
81a43b5607 Make incremental marking clear ICs.
This extends the existing clearing of ICs during GC to incremental
marking in order to prevent cross-context retention that would last
until the next non-incremental GC.

R=erik.corry@gmail.com
TEST=cctest/test-heap/IncrementalMarkingClears[Mono,Poly]morhpicIC

Review URL: https://chromiumcodereview.appspot.com/10831123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 10:35:48 +00:00
mstarzinger@chromium.org
d4e6aa33fc Refactor marking to share embedded pointer visitor.
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10826079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 11:29:48 +00:00
mstarzinger@chromium.org
7dd2e9777c Make incremental marking clear type feedback cells.
This extends the existing clearing of type feedback cells during GC to
incremental marking in order to prevent cross-context retention that
would last until the next non-incremental GC.

R=erik.corry@gmail.com
TEST=cctest/test-heap/IncrementalMarkingClearsTypeFeedbackCells

Review URL: https://chromiumcodereview.appspot.com/10823082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 11:24:14 +00:00
mstarzinger@chromium.org
76fe67b092 Implement verification of context separation.
This adds the --verify-global-context-separation flag which can be used
to verify that no code object embeds pointers to more than one global
context after a full GC. It uses an object visitor that just performs
shallow traversal of the object graph spanned by one code object, and
breaks at points where application objects are encountered. So it will
not trip on cross-context leaks introduced by the application itself.

R=verwaest@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10830049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 10:47:04 +00:00
yangguo@chromium.org
4d1d1eb53e Fix building with GCC 3.x
R=yangguo@chromium.org
BUG=v8:2016, v8:2017
TEST=

Review URL: https://chromiumcodereview.appspot.com/10823034
Patch from James Pike <g00gle@chilon.net>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 09:18:09 +00:00
mstarzinger@chromium.org
abede994d9 Refactor incremental marking to use static visitor.
This is a refactoring only change that switches incremental marking to
use a static object visitor. It also shares the common code between the
non-incremental and the incremental marker. Sharing that would require
semantical changes will be done later.

R=verwaest@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10816007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 15:23:07 +00:00
danno@chromium.org
0fb5189a32 Refine object stats for FixedArrays.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10797008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 14:06:24 +00:00
verwaest@chromium.org
26afeb6ea5 Don't record elements transition slots since it will contain a map.
Additionally removed unused code.

Review URL: https://chromiumcodereview.appspot.com/10802039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 07:24:50 +00:00
sanjoy@chromium.org
693c7643d2 Optimize functions on a second thread.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10807024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 18:58:23 +00:00
danno@chromium.org
1ab272ab36 Track counts/sizes of CODE sub types with --track-gc-object-stats
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10792014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 11:58:49 +00:00
verwaest@chromium.org
11e5c9e281 Removed transitions from the accessor pair descriptors.
AccessorPair related transitions are now also stored as single map links, simplifying the code that handles transitions. AccessorPairs can now be shared between descriptor arrays, since they can only be mutated after another transition anyway; during which the pair is copied before writing.

Review URL: https://chromiumcodereview.appspot.com/10784014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 14:02:50 +00:00
danno@chromium.org
aae81e125b Add counters that automatically track object sizes and counts.
Review URL: https://chromiumcodereview.appspot.com/10702168

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 12:22:09 +00:00
verwaest@chromium.org
45419ee145 Swap bitfield3 and backpointer.
Bitfield3 now has its own field, while the backpointer shares the field with the descriptor array; which will become the transition array.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10692130

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-10 13:31:36 +00:00
verwaest@chromium.org
75407ae2b7 Moving prototype transitions into the header of the transition array.
Review URL: https://chromiumcodereview.appspot.com/10692026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-10 07:53:00 +00:00
verwaest@chromium.org
d7a5b7d5e2 Separating transitions from descriptors.
In this design maps contain descriptor arrays, which in turn can contain transition arrays. If transitions are needed when no descriptor array is present, a descriptor array without real descriptors is inserted just so it can point at the transition array.

The transition array does not contain details about the field it transitions to. In order to weed out transitions to FIELDs from CONSTANT_FUNCTION (what used to be MAP_TRANSITION vs CONSTANT_TRANSITION), the transition needs to be followed and the details need to be looked up in the target map. CALLBACKS transitions are still easy to recognize since the transition targets are stored as an AccessorPair containing the maps, rather than the maps directly.

Currently AccessorPairs containing a transition and an accessor are shared between the descriptor array and the transition array. This simplifies lookup since we only have to look in one of both arrays. This will change in subsequent revisions, when descriptor arrays will become shared between multiple maps, since transitions cannot be shared.

Review URL: https://chromiumcodereview.appspot.com/10697015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-05 13:54:20 +00:00
verwaest@chromium.org
68c944c265 In-place shrinking of descriptor arrays with non-live transitions.
Instead of overwriting non-live transitions with NULL_DESCRIPTORs, we remove them from the array by compacting the array (shifting live values to the left) and in-place trimming the array. If the final descriptor array contains no live values (only contained transitions which are now all cleared), we move bit_field3 back from the descriptor array to the map. The descriptor array itself will be collected in the next GC.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10575032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-25 13:10:54 +00:00
mstarzinger@chromium.org
776493ab42 Fix lazy sweeping heuristics to prevent old-space expansion.
This is a temporary fix to prevent excessive expansion of old-space
caused by inaccuracies in lazy sweeper advancing. We actually don't
intend to sweep any pages eagerly, but that requires further changes
to lazy sweeping.

R=ulan@chromium.org,erik.corry@gmail.com
BUG=v8:2194

Review URL: https://chromiumcodereview.appspot.com/10640002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-22 11:47:30 +00:00
yangguo@chromium.org
47be3e8231 Fix lint.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10640018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-22 10:11:19 +00:00
mstarzinger@chromium.org
6cf640ab6c Adapt fragmentation heuristics for over reserved pages.
This adapts the heuristics that detect fragmented pages to reduce memory
footprint for spaces with over reserved memory. This minimizes external
fragmentation caused by pages that cannot be released to the OS because
of just a few live objects on them.

R=erik.corry@gmail.com
TEST=cctest/test-heap/ReleaseOverReservedPages

Review URL: https://chromiumcodereview.appspot.com/10629004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-22 09:29:49 +00:00