Commit Graph

341 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
643350c5d2 Deprecate obsolete JSFunction::unchecked_shared accessor.
R=hpayer@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 14:05:56 +00:00
hpayer@chromium.org
7ff046c3fd Implemented function that returns code age.
This may be used to display debugging information.

BUG=
R=danno@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 12:39:15 +00:00
yangguo@chromium.org
74556569d1 Reland "Enable map dependency to in-flight compilation info."
BUG=248076
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 09:43:22 +00:00
mstarzinger@chromium.org
b348744c56 Add tracing for functions processed by code flushing.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 14:40:44 +00:00
yangguo@chromium.org
6da97b1d4a Revert "Enable map dependency to in-flight compilation info."
This includes r15032, r15030 and r15005.

R=ulan@chromium.org
BUG=248076

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 11:55:56 +00:00
yangguo@chromium.org
17cfe68015 Enable map dependency to in-flight compilation info.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 13:27:03 +00:00
mstarzinger@chromium.org
be243df7ca Prevent excessive processing of weak maps while marking.
This makes sure processing of Harmony weak maps is only triggerd twice
during a mark-compact collection. Note that the processing itself still
is a fix-point iteration with quadratic worst-case time.

R=hpayer@chromium.org
BUG=v8:2699

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 17:20:06 +00:00
yangguo@chromium.org
7f8a3d803c Make assertion scopes thread safe.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 15:32:22 +00:00
mstarzinger@chromium.org
365b2eb91e Preserve optimized code map during GCs weakly.
This change preserves the contents of optimized code maps during GCs but
treats the references in this cache weakly. It uses infrastructure from
code flushing to maintain a list of all caches.

R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-15 16:09:25 +00:00
yangguo@chromium.org
49ce7642be Do not dereference handles during relocation.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 07:35:07 +00:00
mstarzinger@chromium.org
e7c1f322a4 New GC APIs, try 2.
With these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 15:59:23 +00:00
mstarzinger@chromium.org
091f0b7f35 Revert the commits adding new GC-related APIs.
We need to solve efficiency problems first.

This reverts the following revisions: 14283 14286 14221 14215

BUG=

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 16:37:04 +00:00
jkummerow@chromium.org
f0bd070087 Build error fix after r14283.
BUG=NONE

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 14:24:31 +00:00
mstarzinger@chromium.org
e8bc8d76ae New GC related APIs: Implicit references.
When using these APIs, the embedder doesn't need to copy Persistent handles around.

BUG=NONE

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:57:01 +00:00
yangguo@chromium.org
e1742a6716 Remove relocation lock.
Freeze HValue hash codes that are based on object addresses.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 11:00:02 +00:00
hpayer@chromium.org
5198328f08 On-the-fly bookkeeping of PagedSpace memory kept in free-lists.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 10:24:24 +00:00
mstarzinger@chromium.org
f06084c13d Revert "On-the-fly bookkeeping of PagedSpace memory kept in free-lists."
This reverts r14197 because of tes failures accross the board.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 09:19:18 +00:00
hpayer@chromium.org
96220f984f On-the-fly bookkeeping of PagedSpace memory kept in free-lists.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 08:07:58 +00:00
svenpanne@chromium.org
e4e4447305 Pass Isolates explicitly in Deoptimizer-related code.
Removed a few ancient useless ASSERTs on the way. Reduced the number of train wrecks.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-18 13:57:49 +00:00
mstarzinger@chromium.org
bbb30a788b Consistently unlink evacuation candidates before sweeping.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-11 10:11:57 +00:00
hpayer@chromium.org
fffadaf9ba Unlink evacuation candidates from list of pages before starting sweeper threads.
Removed FinalizeSweeping().

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-08 14:41:21 +00:00
hpayer@chromium.org
80382cdb9f Presweep one page before parallel/concurrent sweeping.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-05 17:51:49 +00:00
hpayer@chromium.org
80195113ab Wait for sweeper threads in EnsureSweeperProgress() only if the main thread finished its sweeping phase.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-05 17:32:02 +00:00
mstarzinger@chromium.org
24abac9f02 Remove obsolete CodeFlusher debug code.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-05 16:08:11 +00:00
hpayer@chromium.org
74a25d8e17 Wait for sweeper threads and finalize sweeping only if parallel/concurrent sweeping was in progress.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:56:20 +00:00
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
hpayer@chromium.org
a9374e2fea Set unswept free bytes for concurent sweeper.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 15:07:28 +00:00
svenpanne@chromium.org
54b4b1ecc2 Forced inlining of some GC-related methods.
The selection of methods were driven by GCC's -Winline plus some benchmarking.
On ia32, the additional amount of code is roughly 63kB (= 0.07% of Chrome ;-).

BUG=v8:1607

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-21 14:02:52 +00:00
hpayer@chromium.org
ab3114df68 Release evacuation candidates after parallel sweeper threads completed.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-21 13:12:12 +00:00
ulan@chromium.org
3a1eca4242 Remove prototype checks for leaf maps in optimized code.
Review URL: https://chromiumcodereview.appspot.com/12225099

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-20 11:49:54 +00:00
hpayer@chromium.org
37d88cca4e Move sweeping pending status field of concurrent sweepers to MarkCompactCollector.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-13 15:21:08 +00:00
hpayer@chromium.org
b9af1ef185 Reduces memory consumption for parallel sweeping.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-13 12:46:06 +00:00
hpayer@chromium.org
5f1a4e3fa1 Fix verify heap problem when parallel sweeping is enabled.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-13 11:02:39 +00:00
dcarney@chromium.org
0da6e525b7 Split AccessorInfo into DeclaredAccessorInfo and ExecutableAccessorInfo
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-12 14:33:08 +00:00
mstarzinger@chromium.org
9bb68394a0 Fix code flusher disabling while marking incrementally.
This fixes a corner case where the code flusher is disabled while the
incremental marker is still running. This can happen when the debugger
is loaded and a scavenge is triggered. Make sure that all flushing
decisions are revisited after the candidates lists are evicted.

R=hpayer@chromium.org
BUG=chromium:173458,chromium:168582
TEST=cctest/test-heap/Regress173458

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-11 15:11:00 +00:00
svenpanne@chromium.org
7b45ab9501 Don't use TLS for space iterators.
This is not only inherently slow, but it also forces the caller to enter an
Isolate before. Both is bad, so we have to do some heap plumbing.

BUG=v8:2531

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-11 13:02:20 +00:00
hpayer@chromium.org
492396f2ab Fixed IsSweepingComplete and EnsureSweeperProgress helper functions.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-05 15:48:59 +00:00
ulan@chromium.org
744d61ebe7 Fix clearing of dead dependent codes and verify weak embedded maps on full GC.
BUG=172488,172489
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-04 10:56:50 +00:00
hpayer@chromium.org
7fe9f3b05c Added parallel marking threads.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-31 14:23:36 +00:00
hpayer@chromium.org
0068ee59ce Fix build bot. Force instantiation of templatized SweepConservatively method.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-30 13:13:04 +00:00
hpayer@chromium.org
117cedbbf2 Fixes Windows build bots.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-30 12:47:41 +00:00
hpayer@chromium.org
44caabb1cd Parallel and concurrent sweeping.
Sweep old pointer space and old data space concurrently to the main mutator thread and in parallel.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-30 12:19:32 +00:00
hpayer@chromium.org
c027397c9d Precisely measure duration of mark and sweep phases. Changed print_cumulative_gc_stat flag to only print GC statistics at end of program.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-30 10:51:13 +00:00
ulan@chromium.org
fe0582c262 Put making embedded maps in optimized code weak behind a flag.
Disable the flag by default because of Chrome crashes.

BUG=172488,172489
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-28 10:25:38 +00:00
ulan@chromium.org
e6224d275f Make embedded maps in optimized code weak.
Each map has a weak array of dependent codes, where the map tracks all the optimized codes that embed it.
Old space GC either clears the dead dependent codes from the array if the corresponding map is alive or deoptimizes the live dependent codes if the map is dead.

BUG=v8:2073
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-24 11:55:05 +00:00
mstarzinger@chromium.org
cd21056819 Fix corner case when JSFunction is evicted from flusher.
This fixes a corner case that happens when JSFunctions are enqueued as
code flushing candidates but their respective SharedFunctionInfo isn't.
If the JSFunction gets evicted due to optimization the code slot in the
SharedFunctionInfo will never be recorded in the slots buffer.

R=hpayer@chromium.org
BUG=chromium:168801
TEST=cctest/test-heap/Regress168801

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-23 16:15:15 +00:00
yangguo@chromium.org
5da9e75670 Remove support for Live Object List and inspector module.
These were introduced in r7012 and r6379.
The reason for this is that both features are not being maintained.
They have been out-of-date for a while.  Test cases do not exist.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-16 15:44:26 +00:00
mstarzinger@chromium.org
90ec61152c Add sanity check to CodeFlusher::AddCandidate.
R=hpayer@chromium.org
BUG=chromium:169209

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-15 10:00:48 +00:00
yangguo@chromium.org
eadcc1c10c Reland r13188, r13194, r13256 (Deferred formatting of error stack trace during GC).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-14 13:19:27 +00:00
mstarzinger@chromium.org
b93b2b98b8 Fix shared function info code replacement.
This fixes a corner case when the unoptimized code for a shared function
info is replaced while the function is enqueued as a flushing candidate.
Since the link field is stored within the code object, the candidates
list got destroyed.

R=hpayer@chromium.org
BUG=v8:169209
TEST=cctest/test-heap/Regress169209

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-11 13:13:11 +00:00