Commit Graph

192 Commits

Author SHA1 Message Date
antonm@chromium.org
0ee0a36e72 Add last OS error into heap stats.
That could allow us to understand why commit of from space sometimes fails.
Another option would be start a separate structure with OS-related info, but
as it's a single field, let's put it into HeapStats, at least for now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-13 11:11:36 +00:00
vegorov@chromium.org
28f9412cbd Generalize virtually dispatched scavenger to virtually dispatched specialized visitors.
Review URL: http://codereview.chromium.org/3066044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-11 14:30:14 +00:00
antonm@chromium.org
791fa08ab7 Add information about memory allocator's size and capacity and heap snapshot into heap stats.
That might help us debug OOM crashes in V8.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 14:12:50 +00:00
sgjesse@chromium.org
31f3026b35 Fix GCC 4.4.4 build
Force a number functions to not inline in order th work around a bug in GCC 4.4.4.

See http://codereview.chromium.org/3083016 for more info.
Review URL: http://codereview.chromium.org/3034056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 12:34:53 +00:00
vegorov@chromium.org
1920692d71 Revert r5174.
Review URL: http://codereview.chromium.org/2868108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 11:19:43 +00:00
kaznacheev@chromium.org
5f78dc14c8 Avoid GC when compiling CallIC stubs.
In rare cases GC could be called from ComputeCallMiss function thus
breaking CallIC::LoadFunction.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 08:37:12 +00:00
whesse@chromium.org
571eca3118 Revert r5147 due to failing assert, with no simple solution. Issue 808.
Review URL: http://codereview.chromium.org/3087001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-02 15:08:17 +00:00
kaznacheev@chromium.org
d191b9d7d2 Cache maps for slow case objects.
Review URL: http://codereview.chromium.org/3032028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-28 15:08:32 +00:00
vegorov@chromium.org
f32e2b7093 Output time spent in code flushing in GC NVP trace.
Add support for flushcode scope and cumulative stats into gc-nvp-trace-processor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-20 10:59:00 +00:00
kaznacheev@chromium.org
0243bc875c Move serialized scope info from Code object to SharedFunctionInfo.
The scope info is now stored in a FixedArray referenced from SharedFunctionInfo.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 13:06:33 +00:00
vegorov@chromium.org
7780bea2f0 Virtually dispatched scavengers
Use virtually dispatched specialized scavengers instead of single generic ScavengeObjectSlow implementation.

Rollback of r5041 with assertion checking callback alignment removed. Map space is iterated in a special fashion during scavenges so special callback alignment is not required.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 08:05:10 +00:00
ager@chromium.org
ef8baf25fc Revert revisions 5041 and 5042 introducing virtual scavenge
behavior. It breaks debug builds with snapshots on my machine.

TBR=vegorov@chromium.org
Review URL: http://codereview.chromium.org/2983001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 16:57:07 +00:00
vegorov@chromium.org
ef6cb2dd0b Use virtually dispatched specialized scavengers instead of single generic ScavengeObjectSlow implementation.
Review URL: http://codereview.chromium.org/2895008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 12:47:09 +00:00
vegorov@chromium.org
8036035777 Don't make any decisions on old space limits after scavenges.
We just do not possess enough information at that point.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-25 08:59:52 +00:00
vegorov@chromium.org
1bb0ef0af4 Fix compilation failure on Win.
Review URL: http://codereview.chromium.org/2821016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 12:11:24 +00:00
vegorov@chromium.org
ae39e059c2 Take survival rates of young objects into account when choosing old generation limits.
Stable high survival rates of young objects both during partial and
full collection indicate that mutator is either building or modifying
a structure with a long lifetime.

In this case we aggressively raise old generation memory limits to
postpone subsequent mark-sweep collection and trade memory space
for the mutation speed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 11:44:23 +00:00
vitalyr@chromium.org
3cafa65462 Track ascii-ness of data in externalized strings.
If a two-byte string only contains ascii characters, then we can save
memory when flattening a cons string containing it. Similarly we can
use this in Array.prototype.join implementation. To track this a new
bit is added to instance type. This bit is used as a hint in generated
code and in runtime functions.

To enable testing a new V8 extension is added controlled by
--expose-externalize-string flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-17 16:19:28 +00:00
ager@chromium.org
ed0fc41723 Change hash computation for transcendental cache to use arithmetic
shifts. Leads to fewer collisions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 08:29:25 +00:00
sgjesse@chromium.org
c7ab2b6aa3 Remove the SetExternalStringDiposeCallback API
Changed the disposal of external string resources to call a virtual Dispose method on the resource. The default inplementation of Dispose deletes the object and will capture the delete operator matching the new operator used to allocate the object.
Review URL: http://codereview.chromium.org/2658008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 09:35:47 +00:00
ricow@chromium.org
316092c364 Flushing of code from functions that we expect not to use again.
This adds an additional step to full gc, removing code from functions
that are no longer in the compilation cache. The code is replaced with
a lazy compile version enabling us to recompile the function in case
we do actually need it again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 15:39:10 +00:00
sgjesse@chromium.org
09acdc8446 Add an API to control the disposal of external string resources
A new callback have been added which - if set - will be called to dispose of external string resources passed from the embedder to the V8 engine.
Review URL: http://codereview.chromium.org/2645004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:49:07 +00:00
vegorov@chromium.org
fc7c5f789a Cardmarking writebarrier.
Reapply r4715 with fixes reviewed in http://codereview.chromium.org/2276002.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 12:30:45 +00:00
vegorov@chromium.org
e268fbdaba Revert r4715.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2274001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 09:24:44 +00:00
vegorov@chromium.org
675e711f1c Cardmarking writebarrier.
- New сardmarking write barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code).
- Changes to enable oldspaces iteration without maps decoding:
-- layout change for FixedArrays: length is stored as a smis (initial patch by
Kevin Millikin)
-- layout change for SharedFunctionInfo: integer fields are stored as smi on
arm, ia32 and rearranged on x64.
-- layout change for String: meaning of LSB bit is fliped (1 now means hash not
computed); on x64 padding is added.
-- layout of maps is _not_ changed. Map space is currently iterated in a special
way.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 13:15:16 +00:00
vegorov@chromium.org
2241d2af45 Reverting r4703.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2073018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 17:37:47 +00:00
vegorov@chromium.org
8879691793 Cardmarking writebarrier.
Reapplication of r4685 (reviewed http://codereview.chromium.org/2101002) with minor modifications:

- Fix compilation problems on Win64.
- Improve heap verification pass: search for garbage pointers to new space not only in dirty regions but in all regions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 15:52:38 +00:00
vegorov@chromium.org
955828e437 Reverting r4685, r4686, r4687
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2071020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 14:02:51 +00:00
vegorov@chromium.org
b38a0a719a - Changes to enable oldspaces iteration without maps decoding:
-- layout change for FixedArrays: length is stored as a smis (initial patch by Kevin Millikin)
-- layout change for SharedFunctionInfo: integer fields are stored as smi on arm, ia32 and rearranged on x64.
-- layout change for String: meaning of LSB bit is fliped (1 now means hash not computed); on x64 padding is added.
-- layout of maps is _not_ changed. Map space is currently iterated in a special way.
- Cardmarking write barrier. New barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 13:10:38 +00:00
vegorov@chromium.org
8fbac01b2c Improved GC statistics.
Collect cumulative (--print-cumulative-gc-stat) and per collection (--trace-gc-nvp) GC statistics and output it in a machine-readable name=value format.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 16:50:17 +00:00
antonm@chromium.org
a83a88cd58 Moving more code to lookup an item from the native cache into code generator.
To bypass expensive invocation of JS functions from C++ and omit runtime
call overhead for searching the cache, more elaborate deferred code is generated.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 12:48:18 +00:00
erik.corry@gmail.com
d18b73c2fe Add a single-element global positive and negative cache to
the implementation of instanceof.
Review URL: http://codereview.chromium.org/1765012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 09:35:18 +00:00
antonm@chromium.org
6617fac3d4 Clean JS function results cache on each major GC.
We don't want to retain cached objects for too long.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 16:42:11 +00:00
oleg@chromium.org
c98c930b1f Simplify double to number convertion.
Review URL: http://codereview.chromium.org/1694004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 14:01:37 +00:00
erik.corry@gmail.com
e1b3b92a2c Make not sucking at regexp the default
(remove V8_NATIVE_REGEXP flag, add
V8_INTERPRETED_REGEXP flag).
Review URL: http://codereview.chromium.org/1635001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 19:30:11 +00:00
ager@chromium.org
07db17ce1b Remove some remaining references to boilerplate functions.
Review URL: http://codereview.chromium.org/1605037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 12:39:07 +00:00
antonm@chromium.org
a713b27428 Introduce fast native caches and use it in String.search.
Review URL: http://codereview.chromium.org/1563005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 14:46:15 +00:00
ricow@chromium.org
8d524c0189 Changing byte_size from size_t to int in heap-inl.h (making win64 build work)
Review URL: http://codereview.chromium.org/1619017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 11:30:34 +00:00
vegorov@chromium.org
238b211274 Reapplying changes from r4318
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/1656003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 07:26:20 +00:00
lrn@chromium.org
285d5bc48a Native construction of RegExp result objects, with in-object index and input.
Avoid cloning using CloneRegExpResult for results that are just arrays.
Made a more direct path for string.match with string argument.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-13 09:31:03 +00:00
ager@chromium.org
c64b354e3a Remove redundant null oddball initialization.
Remove unneeded map argument to CreateOddball.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 13:36:52 +00:00
vegorov@chromium.org
82ddab5fd5 Reverting r4318 (merge of scavenge into sweeping pass of MSC garbage collector)
Review URL: http://codereview.chromium.org/1622016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-09 08:16:25 +00:00
sgjesse@chromium.org
c0976e9276 Add number string cache lookup for heap numbers to generatred code (on top of the already existing smi lookup)
Added a number to string runtime function which does not try to do a cache lookup as the number is known to not be in the cahce.
Review URL: http://codereview.chromium.org/1602010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-07 11:13:05 +00:00
vegorov@chromium.org
6d3cdbbf98 Merging scavenge into sweeping phase of mark-sweep(-compact) collector.
Should reduce full GC pauses. 
Review URL: http://codereview.chromium.org/1217011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-30 12:01:06 +00:00
lrn@chromium.org
845fd15dd6 Pre-create properties on JSRegExp objects
Initialize properties in single runtime call.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-26 14:19:47 +00:00
antonm@chromium.org
94a2a0956b Add a test to verify correctness of remembered set update for Heap::CopyJSObject.
Review URL: http://codereview.chromium.org/1256002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 15:32:58 +00:00
erik.corry@gmail.com
3672624b45 Fix pop push optimization to work with partial snapshots (correct
registration of external references in Proxy objects).
I moved the declaration of the two functions to stub-cache.h
because with all the types they use it's hard to declare them
anywhere else.  But the actual definition is still in runtime.cc
near to the place where they are used.
Review URL: http://codereview.chromium.org/1079012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 14:33:42 +00:00
mikhail.naganov@gmail.com
4d1f8cbfd6 New GCCallbacks with additional parameters.
Author: Ilya Tikhonovsky <loislo@chromium.org>
Original issue: http://codereview.chromium.org/1094002

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 13:11:44 +00:00
kasperl@chromium.org
7d6a3b433f Merge the partial_snapshots branch back into bleeding_edge. For
now, the custom call generator stuff is disabled.
Review URL: http://codereview.chromium.org/1094014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 11:40:38 +00:00
erik.corry@gmail.com
dda96b61c6 Fix formatting around * and &.
Review URL: http://codereview.chromium.org/1000007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 14:53:16 +00:00
vitalyr@chromium.org
6a10a837c0 Add heuristic for flattening strings before comparing them.
Also switched to using CompareChars instead of memcmp since it's
faster than gcc's builtin and on par with msvc's builtin.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 12:30:04 +00:00