Commit Graph

34 Commits

Author SHA1 Message Date
ager@chromium.org
ed05df0053 Shrink new space on compacting collections.
Review URL: http://codereview.chromium.org/174219

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 13:14:53 +00:00
ager@chromium.org
94a3009b04 Go back to doubling the size when growing new space.
Our memory tests show little improvement by only growing by 50%.

Review URL: http://codereview.chromium.org/174133

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 08:12:30 +00:00
ager@chromium.org
469259cd88 Reapply the semispace growth policy change in isolation.
Additionally fix NewSpace capacity bug by removing the duplicated
capacity and maximum capacity book keeping.  The capacity and maximum
capacity of NewSpace is the capacity and maximum capacity of one of
it's semispaces.

Review URL: http://codereview.chromium.org/174052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 10:36:19 +00:00
ager@chromium.org
5e0a513e29 Temporarily revert the reduction of semispace sizes and the growth
policy change.

I will put the changes back one at a time so we can see the effect of
them in isolation.  Also, there is a bug in the growth policy change
that I will fix before putting it back again.

Review URL: http://codereview.chromium.org/174050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 08:12:12 +00:00
bak@chromium.org
f1f776f947 Changed Heap::Shrink to free as many pages as possible.
As a benefit, this eliminates an ifdef ARDROID.

Review URL: http://codereview.chromium.org/165453

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 14:58:35 +00:00
bak@chromium.org
6d98b0ba66 Changed semi space Grow to be rounded to OS page size.
Review URL: http://codereview.chromium.org/164469

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:13:50 +00:00
bak@chromium.org
d7449ddebf - Reduced the maximum capacity of a semi space from 8MB to 4MB.
- Changed the semi space growth policy from doubling to increasing by 50%.
This slows down V8BenchmarkSuite with 1.32% but reduces the memory footprint with 8MB per V8 instance.

Review URL: http://codereview.chromium.org/164397

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 13:54:43 +00:00
kmillikin@chromium.org
270c0e8b8f Change a few style issues (dead code, unitialized members) flagged by
Coverity Prevent.  All are benign.

Review URL: http://codereview.chromium.org/159264

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 12:51:49 +00:00
feng@chromium.org
9b58a0c856 Adjust kPagesPerChunk to 16 instead of 64 on Android.
Renamed some macros to ANDROID.

Review URL: http://codereview.chromium.org/155538

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 22:38:06 +00:00
ager@chromium.org
00cdc3f1a3 Remove the descriptor stream abstractions.
The abstractions have led to bugs because it looks like descriptor
streams are GC safe but they are not.

I have moved the descriptor stream helper functions to descriptor
arrays and I find most of the code just as readable now as it was
before.
Review URL: http://codereview.chromium.org/149458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 19:25:18 +00:00
kmillikin@chromium.org
726c29c0be Skip the write barrier for global property cell writes. The heap
verification code was refactored to avoid verifying that property
cells have correct remembered sets.

Review URL: http://codereview.chromium.org/149392

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 14:34:08 +00:00
kmillikin@chromium.org
525601be88 Fix free list construction for global property cells on x64.
Review URL: http://codereview.chromium.org/155287

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 12:20:04 +00:00
kmillikin@chromium.org
d0c35af612 Create a new paged heap space for global property cells. The new
space is similar to map space in that it has fixed-size objects.  A
common superclass for a space with fixed size objects is used for the
map space and cell space.

Allocate all cells in cell space.  Handle it during all GCs.  Modify
the free-list node representation (so that the size is not at a fixed
offset in all cells) to allow two-pointer free-list nodes.  Clean up
some stuff in the MC collector.

Review URL: http://codereview.chromium.org/155211

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:13:08 +00:00
erik.corry@gmail.com
8f73ae0325 * Move almost all roots into an array ready for use by a constant-pool
register on ARM.
* Make some compile-time loops into run-time loops for compactness.
Review URL: http://codereview.chromium.org/149324

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 19:12:58 +00:00
lrn@chromium.org
df135415ea X64: Fix bad value in stack layout constants.
Remove references to Array:kHeaderSize.

Review URL: http://codereview.chromium.org/150098


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 11:09:57 +00:00
erik.corry@gmail.com
a196a9c0d9 Never use the freelists when always compacting.
Review URL: http://codereview.chromium.org/113825

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-26 09:17:50 +00:00
iposva@chromium.org
34218e5540 - Introduce histograms collecting data about the number of set remembered set
bits in a page.
Review URL: http://codereview.chromium.org/113819

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 16:33:00 +00:00
mikhail.naganov@gmail.com
30a0a7de43 Split nested namespaces declaration in two lines in accordance with C++ Style Guide.
This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.

Review URL: http://codereview.chromium.org/115756


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:05:56 +00:00
kmillikin@chromium.org
4bc0e7cf8c Reapply r1900, r1897, r1895 with a fix.
When a paged space shrinks by an even multiple of the chunk size,
ensure that the cached last page in the space is updated.

Review URL: http://codereview.chromium.org/113267

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 08:55:34 +00:00
ager@chromium.org
00addb277a Revert r1900, r1897 and r1895 which are all gc changes. The changes
to the page iterator leads to occasional crashes in tests.
Review URL: http://codereview.chromium.org/113262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 13:02:15 +00:00
kmillikin@chromium.org
bd3019f2b6 Changed the PageIterator class so that it only returns pages existing
at construction time.  If allocation during iteration causes a paged
space to expand, the iterator will not return the new pages.

This makes it more closely match the HeapObjectIterator behavior, and
it removes a possible source of bugs (if the allocation top was in the
last page in the space, the old iterator would stop only when it
reached the end of the space, potentially returning invalid pages from
a freshly expanded space).

Review URL: http://codereview.chromium.org/115074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-07 10:19:38 +00:00
lrn@chromium.org
cba7c023f0 Changed size of pointers stored as numbers to intptr_t in spaces.h.
Review URL: http://codereview.chromium.org/115073


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-07 08:50:22 +00:00
kmillikin@chromium.org
bc3fb11881 Add basic infrastructure for protecting V8's heap when leaving the VM
and unprotecting it when (re)entering.  The functionality is enabled
by the flag --protect-heap and requires V8 to be built with
ENABLE_HEAP_PROTECTION and ENABLE_LOGGING_AND_PROFILING defined.

Implemented on Linux and Windows but not yet for other platforms.

Review URL: http://codereview.chromium.org/53004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 12:47:53 +00:00
iposva@chromium.org
c093e94546 - Pass the knowledge whether the old GC is compacting to the GC prologue and epilogue. This allows us to skip frame cooking and uncooking when doing a mark-sweep GC.
- Add the ability for the code to refer to its code object by adding a handle to the code object in the MacroAssembler.

Review URL: http://codereview.chromium.org/27133

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:52:15 +00:00
kasperl@chromium.org
a2be3b6f84 Make sure that allocations through CALL_HEAP_FUNCTION
and runtime calls from JavaScript will always succeed
eventually if we have enough memory.
Review URL: http://codereview.chromium.org/8700

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 09:15:58 +00:00
kmillikin@chromium.org
af989d9e94 Check the growth of the old generation before expanding the paged
spaces (during normal allocation) and when allocating large objects.
If the promotion limit is reached, fail allocation to trigger a
garbage collection.
Review URL: http://codereview.chromium.org/8657

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 09:27:59 +00:00
bak@chromium.org
7cd44cea9b - Removed a few indirections by making the two SemiSpaces
part of NewSpace and made NewSpace statically allocated.
- Eliminated indirection in MigrateObject.

Review URL: http://codereview.chromium.org/7619

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 09:13:27 +00:00
sgjesse@chromium.org
8391b19b07 Refactor the enum RelocMode changing the naming scheme from lower case to
upper case. Moved it into the RelocInfo class together with the associated
is_xxx functions. Renamed is_xxx to IsXxx in the process.

Removed the exit_js_frame mode as it was no longer used.

Patch Set 2 renames RELOC_MODE_COUNT to NUMBER_OF_MODES and fixes a couple of lint errors.
Review URL: http://codereview.chromium.org/3186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-22 13:57:03 +00:00
deanm@chromium.org
77196c5771 This is a new static flag system, designed to have all flags in a central place, and compiled into the binary without requiring static constructors for registration. All flags are moved out of the specific modules and into flags.defs, with different sections for debug, release, etc. The flag variables are always defined. For example, a debug flag in release mode still exists, but is read only and set to the default value.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-12 10:19:33 +00:00
christian.plesner.hansen@gmail.com
9bed566bdb Changed copyright header from google inc. to v8 project authors.
Added presubmit step to check copyright.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-09 20:08:45 +00:00
erik.corry@gmail.com
388c1094b7 * Split up code_space into old_data_space and code_space.
* Make old_data_space non-executable on OSs and hardware that support it.
* Rename old_space to old_pointer_space (can contain pointers, esp. to new space).
* Ensure that individual pages allocated for old_space are only executable when
they are for code objects.
* Ensure Space::Setup can cope with non-aligned memory.
* Make some methods on Spaces virtual.  Make a way to iterate over all spaces.
* Replace executability flag with Executability enum in order to make intent at
call site clearer.
* Fix serialization/deserialization to allocate write barrier memory for large
arrays.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-05 12:34:09 +00:00
christian.plesner.hansen
c42f5829a1 Included mjsunit JavaScript test suite and C++ unit tests.
In the shell sample don't print the result of executing a script, only
evaluating expressions.

Fixed issue when building samples on Windows using a shared V8
library.  Added visibility option on Linux build which makes the
generated library 18% smaller.

Changed build system to accept multiple build modes in one build and
generate seperate objects, libraries and executables for each mode.

Removed deferred negation optimization (a * -b => -(a * b)) since this
visibly changes operand conversion order.

Improved parsing performance by introducing stack guard in preparsing.
Without a stack guard preparsing always bails out with stack overflow.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-22 13:33:59 +00:00
kasper.lund
7276f14ca7 Changed all text files to have native svn:eol-style.
Added a few samples and support for building them. The samples include a simple shell that can be used to benchmark and test V8.

Changed V8::GetVersion to return the version as a string.

Added source for lazily loaded scripts to snapshots and made serialization non-destructive.

Improved ARM support by fixing the write barrier code to use aligned loads and stores and by removing premature locals optimization that relied on broken support for callee-saved registers (removed).

Refactored the code for marking live objects during garbage collection and the code for allocating objects in paged spaces. Introduced an abstraction for the map word of a heap-allocated object and changed the memory allocator to allocate executable memory only for spaces that may contain code objects.

Moved StringBuilder to utils.h and ScopedLock to platform.h, where they can be used by debugging and logging modules. Added thread-safe message queues for dealing with debugger events.

Fixed the source code reported by toString for certain builtin empty functions and made sure that the prototype property of a function is enumerable.

Improved performance of converting values to condition flags in generated code.

Merged disassembler-{arch} files.


git-svn-id: http://v8.googlecode.com/svn/trunk@8 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-30 08:49:36 +00:00
christian.plesner.hansen
43d26ecc35 Initial export.
git-svn-id: http://v8.googlecode.com/svn/trunk@2 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-03 15:10:15 +00:00