platform/upstream/v8.git
11 years agoMIPS: Skip cctest/test-serialize tests.
palfia@homejinni.com [Thu, 4 Jul 2013 18:47:13 +0000 (18:47 +0000)]
MIPS: Skip cctest/test-serialize tests.

BUG=
TEST=test-serialize/Deserialize,
test-serialize/DeserializeFromSecondSerializationAndRunScript2,
test-serialize/DeserializeAndRunScript2,
test-serialize/DeserializeFromSecondSerialization

Review URL: https://codereview.chromium.org/18702002
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoSet 5M memory for OutOfMemory and OutOfMemoryNested test cases.
palfia@homejinni.com [Thu, 4 Jul 2013 18:45:03 +0000 (18:45 +0000)]
Set 5M memory for OutOfMemory and OutOfMemoryNested test cases.

BUG=
TEST=cctest/test-api/OutOfMemory
     cctest/test-api/OutOfMemoryNested

Review URL: https://codereview.chromium.org/18688002
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRemove deprecated heap profiler methods from V8 public API
yurys@chromium.org [Thu, 4 Jul 2013 16:34:07 +0000 (16:34 +0000)]
Remove deprecated heap profiler methods from V8 public API

v8::HeapProfiler::FindHeapSnapshot was already deprecated when 3.19 branch was created (https://code.google.com/p/v8/source/browse/branches/3.19/include/v8-profiler.h).

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoChange the type of system root nodes in heap snapshot to kSynthetic
alph@chromium.org [Thu, 4 Jul 2013 16:32:18 +0000 (16:32 +0000)]
Change the type of system root nodes in heap snapshot to kSynthetic

R=mstarzinger@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRemove #include "heap-snapshot-generator-inl.h" from v8.h
yurys@chromium.org [Thu, 4 Jul 2013 16:32:12 +0000 (16:32 +0000)]
Remove #include "heap-snapshot-generator-inl.h" from v8.h

This reduces number of dependent .cc files to 9 (was whole v8).

BUG=None
R=loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoPlug some memory leaks in parser tests.
dslomov@chromium.org [Thu, 4 Jul 2013 15:57:43 +0000 (15:57 +0000)]
Plug some memory leaks in parser tests.

BUG=v8:2763
R=dslomov@chromium.org

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

Patch from Sergey Matveev <earthdok@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoMIPS: Fix bug in StringConstructCode builtin.
palfia@homejinni.com [Thu, 4 Jul 2013 15:19:03 +0000 (15:19 +0000)]
MIPS: Fix bug in StringConstructCode builtin.

BUG=

TEST=webkit/dfg-to-string-bad-toString, webkit/dfg-to-string-bad-valueOf,
webkit/dfg-to-string-int-or-string, webkit/dfg-to-string-side-effect,
webkit/dfg-to-string-bad-toString, webkit/dfg-to-string-bad-valueOf,
webkit/dfg-to-string-toString-in-string, webkit/dfg-to-string-int,
webkit/dfg-to-string-valueOf-in-string

Review URL: https://codereview.chromium.org/18668004
Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFactor out OSR-related graph-building functionality from hydrogen.cc.
titzer@chromium.org [Thu, 4 Jul 2013 09:20:07 +0000 (09:20 +0000)]
Factor out OSR-related graph-building functionality from hydrogen.cc.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoUpdate performance baseline to newest chromium LKGR.
machenbach@chromium.org [Thu, 4 Jul 2013 07:32:57 +0000 (07:32 +0000)]
Update performance baseline to newest chromium LKGR.

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert "Convert UnaryOpStub to a HydrogenCodeStub"
olivf@chromium.org [Wed, 3 Jul 2013 19:57:25 +0000 (19:57 +0000)]
Revert "Convert UnaryOpStub to a HydrogenCodeStub"

The problem is the HCallConstantFunction which is not context sensitive, so we leak the builtin. We first need a Hydrogen version of __ IvokeBuiltin.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix Mac compilation after r15484
yurys@chromium.org [Wed, 3 Jul 2013 17:26:01 +0000 (17:26 +0000)]
Fix Mac compilation after r15484

BUG=None
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoDo not store fp and sp values in TickSample
yurys@chromium.org [Wed, 3 Jul 2013 16:20:59 +0000 (16:20 +0000)]
Do not store fp and sp values in TickSample

Their values are not used neither by the tick processor nor by CpuProfiler so it is just a waste of space.

TickSample used to be a transport for grabbed register values to TickSample::Trace, now they are passed in a special structure RegisterState which is allocated on the stack for the sampling period.

Some common pieces were moved from platform-dependent code into Sampler::SampleStack and TickSample::Init.

BUG=None
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert "Fix stack alignment corruption for MinGW32 build"
jkummerow@chromium.org [Wed, 3 Jul 2013 15:45:57 +0000 (15:45 +0000)]
Revert "Fix stack alignment corruption for MinGW32 build"

due to compile failures.

This reverts r15480.

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRemove #include "cpu-profiler-inl.h" from v8.h
yurys@chromium.org [Wed, 3 Jul 2013 15:39:18 +0000 (15:39 +0000)]
Remove #include "cpu-profiler-inl.h" from v8.h

This significantly reduces amount of files to be recompiled after changes in cpu-profiler.h and its dependencies.

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFormat stack layout comments for X64
jkummerow@chromium.org [Wed, 3 Jul 2013 15:36:49 +0000 (15:36 +0000)]
Format stack layout comments for X64

R=jkummerow@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix stack alignment corruption for MinGW32 build
jkummerow@chromium.org [Wed, 3 Jul 2013 15:34:50 +0000 (15:34 +0000)]
Fix stack alignment corruption for MinGW32 build

Contributed by Peter Varga <pvarga@inf.u-szeged.hu>

BUG=
TEST=cctest/test-assembler-ia32/StackAlignmentForSSE2,cctest/test-assembler-x64/StackAlignmentForSSE2,cctest/test-platform/StackAlignment
R=jkummerow@chromium.org

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

Patch from Peter Varga <pvarga@inf.u-szeged.hu>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoChange mjsunit tests to work with and without the i18n extension
jkummerow@chromium.org [Wed, 3 Jul 2013 15:33:11 +0000 (15:33 +0000)]
Change mjsunit tests to work with and without the i18n extension

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

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoMark i18n functions as native and set proper names
jkummerow@chromium.org [Wed, 3 Jul 2013 15:30:27 +0000 (15:30 +0000)]
Mark i18n functions as native and set proper names

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

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoGDBJIT: Remove codes when they are garbage collected.
mstarzinger@chromium.org [Wed, 3 Jul 2013 15:29:59 +0000 (15:29 +0000)]
GDBJIT: Remove codes when they are garbage collected.

R=mstarzinger@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoSort the i18n extension sources correctly.
jkummerow@chromium.org [Wed, 3 Jul 2013 15:28:59 +0000 (15:28 +0000)]
Sort the i18n extension sources correctly.

It's important that e.g. the header comes first, and the footer last

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

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix typo in api.cc
jkummerow@chromium.org [Wed, 3 Jul 2013 15:27:47 +0000 (15:27 +0000)]
Fix typo in api.cc

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

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix GDBJIT compilation on Mac after r15467.
mstarzinger@chromium.org [Wed, 3 Jul 2013 14:58:27 +0000 (14:58 +0000)]
Fix GDBJIT compilation on Mac after r15467.

R=machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoConvert UnaryOpStub to a HydrogenCodeStub
olivf@chromium.org [Wed, 3 Jul 2013 14:56:53 +0000 (14:56 +0000)]
Convert UnaryOpStub to a HydrogenCodeStub

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoAdd 4K more memory for HugeConsStringOutOfMemory test case
yangguo@chromium.org [Wed, 3 Jul 2013 14:56:18 +0000 (14:56 +0000)]
Add 4K more memory for HugeConsStringOutOfMemory test case

R=yangguo@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix test-cpu-profiler/FunctionCallSample flakiness under GC stress testing
yurys@chromium.org [Wed, 3 Jul 2013 14:26:38 +0000 (14:26 +0000)]
Fix test-cpu-profiler/FunctionCallSample flakiness under GC stress testing

The test flakes on "V8 GC Stress" bots and the sample looks like this:
[Top down]:
   90     0   (root) [-1] #0 1
    1     1    (program) [-1] #0 2
   89    89    (garbage collector) [-1] #0 3
which means that almost all samples are inside GC and we have no |start| node in the collected profile.

Running the test with different combinations of --gc-interval=500 and --stress-compaction flags gives the results quoted below. They don't give a ground to require |start| node presense in the profile when doing GC stress testing. So this change makes the |start| node optional in the collected profile if GC stress testing is on.

$ ./out/ia32.debug/cctest --gc-interval=500 --stress-compaction --trace-gc  test-cpu-profiler/FunctionCallSample
[10291]       76 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 49.5 ms (+ 0.2 ms in 1 steps since start of marking, biggest step 0.2 ms) [StackGuard GC request] [GC in old space requested].
[10291]      110 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 25.3 ms [Logger::LogCompiledFunctions] [GC in old space requested].
[10291]      135 ms: Mark-sweep 0.4 (17.8) -> 0.4 (17.8) MB, 22.8 ms [Logger::LogAccessorCallbacks] [GC in old space requested].
[10291]      179 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 39.9 ms (+ 0.1 ms in 1 steps since start of marking, biggest step 0.1 ms) [Runtime::PerformGC] [GC in old space forced by flags].
[10291]      209 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 29.1 ms (+ 0.1 ms in 1 steps since start of marking, biggest step 0.1 ms) [Runtime::PerformGC] [GC in old space forced by flags].
[10291]      240 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 29.1 ms (+ 0.1 ms in 1 steps since start of marking, biggest step 0.1 ms) [Runtime::PerformGC] [GC in old space forced by flags].
[Top down]:
   99     0   (root) [-1] #0 1
    4     4    start [-1] #16 3
   93    93    (garbage collector) [-1] #0 4
    2     2    (program) [-1] #0 2

$ ./out/ia32.debug/cctest --gc-interval=500  --trace-gc  test-cpu-profiler/FunctionCallSample
[10328]       46 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 14.9 ms [Logger::LogCompiledFunctions] [GC in old space requested].
[10328]       61 ms: Mark-sweep 0.4 (17.8) -> 0.4 (17.8) MB, 12.9 ms [Logger::LogAccessorCallbacks] [GC in old space requested].
[10328]       65 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.3 ms [Runtime::PerformGC].
[10328]       67 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.3 ms [Runtime::PerformGC].
[10328]       69 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       70 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       72 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       73 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       75 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       77 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       78 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       80 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       81 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       83 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       85 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       86 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       88 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       89 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       91 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       93 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       94 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.3 ms [Runtime::PerformGC].
[10328]       96 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       97 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]       99 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      101 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      102 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      104 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      105 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      107 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      109 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      110 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      112 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      113 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.3 ms [Runtime::PerformGC].
[10328]      115 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      117 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      118 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      120 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      121 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      123 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      125 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      126 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      128 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      129 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      131 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      133 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      134 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      136 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      137 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      139 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      141 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      142 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      144 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.3 ms [Runtime::PerformGC].
[10328]      145 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      147 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      149 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      150 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      152 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      153 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.3 ms [Runtime::PerformGC].
[10328]      155 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      157 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      158 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      160 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      162 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[10328]      163 ms: Scavenge 0.5 (17.8) -> 0.4 (17.8) MB, 1.2 ms [Runtime::PerformGC].
[Top down]:
   95     0   (root) [-1] #0 1
   12    11    start [-1] #16 3
    1     1      bar [-1] #16 4
   81    81    (garbage collector) [-1] #0 5
    2     2    (program) [-1] #0 2

$ ./out/ia32.debug/cctest --stress-compaction --trace-gc  test-cpu-profiler/FunctionCallSample
[10355]       76 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 49.9 ms (+ 0.1 ms in 1 steps since start of marking, biggest step 0.1 ms) [StackGuard GC request] [GC in old space requested].
[10355]      110 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 25.5 ms [Logger::LogCompiledFunctions] [GC in old space requested].
[10355]      135 ms: Mark-sweep 0.4 (17.8) -> 0.4 (17.8) MB, 22.9 ms [Logger::LogAccessorCallbacks] [GC in old space requested].
[10355]      189 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 49.8 ms (+ 0.2 ms in 1 steps since start of marking, biggest step 0.2 ms) [StackGuard GC request] [GC in old space requested].
[10355]      234 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 42.5 ms (+ 0.1 ms in 1 steps since start of marking, biggest step 0.1 ms) [StackGuard GC request] [GC in old space requested].
[10355]      278 ms: Mark-sweep 0.5 (17.8) -> 0.4 (17.8) MB, 42.5 ms (+ 0.1 ms in 1 steps since start of marking, biggest step 0.1 ms) [StackGuard GC request] [GC in old space requested].
[Top down]:
  135     0   (root) [-1] #0 1
    6     6    start [-1] #16 3
  127   127    (garbage collector) [-1] #0 4
    2     2    (program) [-1] #0 2

BUG=None
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRelax test expectations for test-cpu-profiler/FunctionApplySample
yurys@chromium.org [Wed, 3 Jul 2013 14:23:34 +0000 (14:23 +0000)]
Relax test expectations for test-cpu-profiler/FunctionApplySample

The profile may look a bit different on the bots (see below). We expected this only under GC stress testing, the change makes regular expectations the same.

[Top down]:
   68     0   (root) [-1] #0 1
    1     1    (program) [-1] #0 2
   67    65    start [-1] #16 3
    2     0      (unresolved function) [-1] #0 4
    2     2        apply [-1] #0 5

BUG=None
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix compilation on x64 after r15466
mstarzinger@chromium.org [Wed, 3 Jul 2013 14:21:21 +0000 (14:21 +0000)]
Fix compilation on x64 after r15466

R=mstarzinger@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoCorrectly report stack trace when current function is FunctionApply builtin
yurys@chromium.org [Wed, 3 Jul 2013 14:04:37 +0000 (14:04 +0000)]
Correctly report stack trace when current function is FunctionApply builtin

When pc is inside FunctionApply builtin function the top frame may be either
2) Internal stack frame created by FunctionApply itself.
In this case we know its caller's pc and can correctly resolve calling function.
1) Frame of the calling JavaScript function that invoked .apply(). In this case we have no practical reliable way to find out the caller's pc so we mark the caller's frame as 'unresolved'.

All this logic is implemented in ProfileGenerator. SafeStackFrameIterator is extended to provide type of the current top stack frame (iteration actually starts from the caller's frame as we know top function from pc).

BUG=252097
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoEnable GDBJIT interface for standalone by default.
mstarzinger@chromium.org [Wed, 3 Jul 2013 12:00:40 +0000 (12:00 +0000)]
Enable GDBJIT interface for standalone by default.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix GDBJIT for Linux after r15460.
mstarzinger@chromium.org [Wed, 3 Jul 2013 11:57:38 +0000 (11:57 +0000)]
Fix GDBJIT for Linux after r15460.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoReintroduce runtime zone to Isolate.
bmeurer@chromium.org [Wed, 3 Jul 2013 11:40:30 +0000 (11:40 +0000)]
Reintroduce runtime zone to Isolate.

In case tcmalloc is not being used, the malloc()/free() overhead
can be significant for several runtime functions like StringReplace.
Therefore we reintroduce the runtime_zone into Isolate and reenable
the segment caching functionality of Zone.

There's now also a simpler version of ZoneScope w/o nesting capabilities.

BUG=v8:2759
R=danno@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoImport the v8-i18n extension into v8
jkummerow@chromium.org [Wed, 3 Jul 2013 11:22:29 +0000 (11:22 +0000)]
Import the v8-i18n extension into v8

This adds the gyp flag v8_enable_i18n_support (off by default), and the
v8 flag FLAG_enable_i18n (on by default, but without effect if
v8_enable_i18n_support is off).

BUG=v8:2745
R=cira@chromium.org, danno@chromium.org, jkummerow@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix small mistake in d8.js.
yangguo@chromium.org [Wed, 3 Jul 2013 10:38:20 +0000 (10:38 +0000)]
Fix small mistake in d8.js.

R=mvstanton@chromium.org
BUG=v8:2756

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoLog deopts with --log-timer-events.
yangguo@chromium.org [Wed, 3 Jul 2013 10:10:27 +0000 (10:10 +0000)]
Log deopts with --log-timer-events.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoDon't return frame by reference in ProcessTopOptimizedFrame.
mstarzinger@chromium.org [Wed, 3 Jul 2013 09:47:22 +0000 (09:47 +0000)]
Don't return frame by reference in ProcessTopOptimizedFrame.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoMake MachO gdbjit support compile again
danno@chromium.org [Wed, 3 Jul 2013 08:29:46 +0000 (08:29 +0000)]
Make MachO gdbjit support compile again

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix default type feedback returned from the oracle
jkummerow@chromium.org [Tue, 2 Jul 2013 16:31:39 +0000 (16:31 +0000)]
Fix default type feedback returned from the oracle

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoHandlify JSObject::DefineAccessor method.
mstarzinger@chromium.org [Tue, 2 Jul 2013 16:24:23 +0000 (16:24 +0000)]
Handlify JSObject::DefineAccessor method.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoUse stored Isolate pointer instead of Isolate::Current()
yurys@chromium.org [Tue, 2 Jul 2013 15:44:30 +0000 (15:44 +0000)]
Use stored Isolate pointer instead of Isolate::Current()

Fixed a couple of places where stored pointer to the isolate can be used instead of reading from thread local storage.

BUG=None
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoInclude statistical profile into profviz.
yangguo@chromium.org [Tue, 2 Jul 2013 15:34:28 +0000 (15:34 +0000)]
Include statistical profile into profviz.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoHandlify JSObject::SetPrototype method.
mstarzinger@chromium.org [Tue, 2 Jul 2013 15:32:46 +0000 (15:32 +0000)]
Handlify JSObject::SetPrototype method.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRemove HFixedArrayBaseLength instruction and replace with regular HLoadNamedField.
titzer@chromium.org [Tue, 2 Jul 2013 15:31:17 +0000 (15:31 +0000)]
Remove HFixedArrayBaseLength instruction and replace with regular HLoadNamedField.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix debuggersupport=off build.
yangguo@chromium.org [Tue, 2 Jul 2013 15:30:33 +0000 (15:30 +0000)]
Fix debuggersupport=off build.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoEnable weak embedded maps in optimized code.
ulan@chromium.org [Tue, 2 Jul 2013 15:15:58 +0000 (15:15 +0000)]
Enable weak embedded maps in optimized code.

If the top optimized code in call stack is at the point that does not support
deoptimization, then treat the maps in the code as strong pointers.

Note that other optimized code in call stack must support deoptimization
because of the call instruction with side-effects.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoIntroduce -m64 flag for making x64 when the default gcc compiler is for X32
jkummerow@chromium.org [Tue, 2 Jul 2013 15:03:54 +0000 (15:03 +0000)]
Introduce -m64 flag for making x64 when the default gcc compiler is for X32

R=jkummerow@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoNot consider the use representation in unintiliazed ArrayLiteral which always require...
jkummerow@chromium.org [Tue, 2 Jul 2013 15:00:13 +0000 (15:00 +0000)]
Not consider the use representation in unintiliazed ArrayLiteral which always requires SMI

R=jkummerow@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoPrepare push to trunk. Now working on version 3.20.2.
jkummerow@chromium.org [Tue, 2 Jul 2013 14:41:58 +0000 (14:41 +0000)]
Prepare push to trunk.  Now working on version 3.20.2.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoIncrease profiling interval for test-cpu-profiler/FunctionCallSample
yurys@chromium.org [Tue, 2 Jul 2013 14:06:39 +0000 (14:06 +0000)]
Increase profiling interval for test-cpu-profiler/FunctionCallSample

The test falkes on Windows bots as number of samples is not enough. This change increases sampling interval for the test on Windows.

BUG=2628
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix invalid condition introduced with revision 15441.
bmeurer@chromium.org [Tue, 2 Jul 2013 12:16:30 +0000 (12:16 +0000)]
Fix invalid condition introduced with revision 15441.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert "Remove BinaryOp::result_type"
rossberg@chromium.org [Tue, 2 Jul 2013 11:57:43 +0000 (11:57 +0000)]
Revert "Remove BinaryOp::result_type"

This reverts https://code.google.com/p/v8/source/detail?r=15265, due to performance regression.

TBR=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert "Derive synthetic type bounds for expressions"
rossberg@chromium.org [Tue, 2 Jul 2013 11:50:56 +0000 (11:50 +0000)]
Revert "Derive synthetic type bounds for expressions"

TBR=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoMake sticky chromium revision available for perf tests.
machenbach@chromium.org [Tue, 2 Jul 2013 10:54:02 +0000 (10:54 +0000)]
Make sticky chromium revision available for perf tests.

This file will be regularly updated with the chromium revision to be used by performance test buildbots.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoTurn UInt32 analysis into a proper HPhase.
bmeurer@chromium.org [Tue, 2 Jul 2013 10:53:08 +0000 (10:53 +0000)]
Turn UInt32 analysis into a proper HPhase.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRelax test constraints from r15439 (Join threads after stopping).
yangguo@chromium.org [Tue, 2 Jul 2013 09:59:08 +0000 (09:59 +0000)]
Relax test constraints from r15439 (Join threads after stopping).

R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoJoin threads after stopping.
yangguo@chromium.org [Tue, 2 Jul 2013 09:04:45 +0000 (09:04 +0000)]
Join threads after stopping.

R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoTurn escape analysis into a proper HPhase.
bmeurer@chromium.org [Tue, 2 Jul 2013 08:29:33 +0000 (08:29 +0000)]
Turn escape analysis into a proper HPhase.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoProperly cleanup the transcendental subcaches.
bmeurer@chromium.org [Tue, 2 Jul 2013 08:27:27 +0000 (08:27 +0000)]
Properly cleanup the transcendental subcaches.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoCorrectly report callstack when current function is FunctionCall builtin
yurys@chromium.org [Tue, 2 Jul 2013 07:51:09 +0000 (07:51 +0000)]
Correctly report callstack when current function is FunctionCall builtin

When current function is FunctionCall builtin we have no reliable way to determine its caller function (in many cases the top of the sampled stack contains address of the caller but sometimes it does not). Instead of dropping the sample or its two top frames we simply mark the caller frame as '(unresolved function)'. It seems like a better approach that dropping whole sample as knowing the top function and the rest of the stack the user should be able to figure out what the caller was.

This change adds builtin id to CodeEntry objects. It will be used later to add similar top frame analysis for FunctionApply and probably other builtins.

BUG=None
TBR=loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoCleanup the default Isolate's entry stack.
bmeurer@chromium.org [Tue, 2 Jul 2013 07:21:07 +0000 (07:21 +0000)]
Cleanup the default Isolate's entry stack.

This adds an ASSERT that the entry_stack_ of the Isolate is
empty upon destruction. The default Isolate is an exception
here, as it may still contain an entry stack item upon
destruction.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert "Correctly report callstack when current function is FunctionCall builtin"
yurys@chromium.org [Tue, 2 Jul 2013 06:26:07 +0000 (06:26 +0000)]
Revert "Correctly report callstack when current function is FunctionCall builtin"

This reverts commit r15426. The new test fails in Debug mode.

BUG=None
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoCPUProfiler: propagate scriptId to the front-end
loislo@chromium.org [Tue, 2 Jul 2013 06:14:01 +0000 (06:14 +0000)]
CPUProfiler: propagate scriptId to the front-end

Each CpuProfileNode has resource_name string property.
It cost us N * strlen(resource_name) where N is number of functions in the collected profile.
We could transfer script_id instead of resource_name so it would reduce transfer
size and help us to solve the problem with evals and sourceURL.

BUG=none
TEST=test-cpu-profiler/CollectCpuProfile
R=jkummerow@chromium.org, yurys@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=15429

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoMIPS: Fix register usage in ProfileEntryHookStub
palfia@homejinni.com [Mon, 1 Jul 2013 21:05:03 +0000 (21:05 +0000)]
MIPS: Fix register usage in ProfileEntryHookStub

Different register must be used to pass the test on target hardware.

BUG=
TEST=cctest/test-api/SetFunctionEntryHook

Review URL: https://codereview.chromium.org/18368002
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert "CPUProfiler: propagate scriptId to the front-end"
loislo@chromium.org [Mon, 1 Jul 2013 19:22:45 +0000 (19:22 +0000)]
Revert "CPUProfiler: propagate scriptId to the front-end"

This reverts commit d575f6bc8b262dac08f02913ae6e7c504c9dd900.

Check is failing on debug bots.

TBR= yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoCPUProfiler: propagate scriptId to the front-end
loislo@chromium.org [Mon, 1 Jul 2013 15:15:57 +0000 (15:15 +0000)]
CPUProfiler: propagate scriptId to the front-end

Each CpuProfileNode has resource_name string property.
It cost us N * strlen(resource_name) where N is number of functions in the collected profile.
We could transfer script_id instead of resource_name so it would reduce transfer
size and help us to solve the problem with evals and sourceURL.

BUG=none
TEST=test-cpu-profiler/CollectCpuProfile
R=jkummerow@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoAlso delete optimization jobs in the output queue when stopping thread.
yangguo@chromium.org [Mon, 1 Jul 2013 15:12:59 +0000 (15:12 +0000)]
Also delete optimization jobs in the output queue when stopping thread.

R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert r15419: "Generate StoreGlobal stubs with Hydrogen"
danno@chromium.org [Mon, 1 Jul 2013 15:12:21 +0000 (15:12 +0000)]
Revert r15419: "Generate StoreGlobal stubs with Hydrogen"

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoCorrectly report callstack when current function is FunctionCall builtin
yurys@chromium.org [Mon, 1 Jul 2013 14:57:58 +0000 (14:57 +0000)]
Correctly report callstack when current function is FunctionCall builtin

When current function is FunctionCall builtin we have no reliable way to determine its caller function (in many cases the top of the sampled stack contains address of the caller but sometimes it does not). Instead of dropping the sample or its two top frames we simply mark the caller frame as '(unresolved function)'. It seems like a better approach that dropping whole sample as knowing the top function and the rest of the stack the user should be able to figure out what the caller was.

This change adds builtin id to CodeEntry objects. It will be used later to add similar top frame analysis for FunctionApply and probably other builtins.

BUG=None
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoDerive synthetic type bounds for expressions
rossberg@chromium.org [Mon, 1 Jul 2013 13:59:18 +0000 (13:59 +0000)]
Derive synthetic type bounds for expressions

Currently synthesizes Smi as the lower bound for numeric operations (except for +, which might result in a string). That would need to change in places where we want to track constants as type feedback.

Does not do anything about variables yet.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoImplement WeakMap.prototype.clear function.
mstarzinger@chromium.org [Mon, 1 Jul 2013 13:56:48 +0000 (13:56 +0000)]
Implement WeakMap.prototype.clear function.

R=rossberg@chromium.org
BUG=v8:2753
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoDebug: support breakpoints set in the middle of statement (try #2 after rollback)
prybin@chromium.org [Mon, 1 Jul 2013 13:44:10 +0000 (13:44 +0000)]
Debug: support breakpoints set in the middle of statement (try #2 after rollback)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoGenerate StoreGlobal stubs with Hydrogen
danno@chromium.org [Mon, 1 Jul 2013 13:22:13 +0000 (13:22 +0000)]
Generate StoreGlobal stubs with Hydrogen

- Constants globals are inlined into Hydrogen code using code dependencies that invalidate the Crankshafted code when global PropertyCells or the global object change.
- The more general case generates code that is just as good as the hand-written assembly stubs on all platforms.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert "Debug: support breakpoints set in the middle of statement"
prybin@chromium.org [Mon, 1 Jul 2013 13:05:21 +0000 (13:05 +0000)]
Revert "Debug: support breakpoints set in the middle of statement"

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoEnsure CheckInitialized is present independent of define.
mstarzinger@chromium.org [Mon, 1 Jul 2013 12:57:15 +0000 (12:57 +0000)]
Ensure CheckInitialized is present independent of define.

This makes sure that the same symbols are present, independent of which
defines have been used while building V8. Otherwise only embedders with
compatible defines would be able to link against that binary.

R=danno@chromium.org
BUG=chromium:255779

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoDebug: support breakpoints set in the middle of statement
prybin@chromium.org [Mon, 1 Jul 2013 12:54:13 +0000 (12:54 +0000)]
Debug: support breakpoints set in the middle of statement

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoTest that profiler is stopped when isolate is being disposed
yurys@chromium.org [Mon, 1 Jul 2013 12:32:52 +0000 (12:32 +0000)]
Test that profiler is stopped when isolate is being disposed

The only way to get v8::CpuProfiler instance in the V8 public API is to call v8::Iolate::GetCpuProfiler(). The method will return NULL if the isolate has not been initialized yet or has been torn down already. It is the client's reponsibility to make sure that CPU profiling has been stopped before disposing of the isolate.

This CL adds a test for this and several ASSRTS enforcing that assumptions. This allowed to be sure that heap is always setup when CPU profiling is being started. Based on that the number of places where already compiled functions are reported to the profiler event processor boils down to the single place (CpuProfiler::StartProcessorIfNotStarted). I'm going to rely on this assumption in further changes.

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoPlug leaked mutexes in OptimizingCompilerThread.
bmeurer@chromium.org [Mon, 1 Jul 2013 12:30:26 +0000 (12:30 +0000)]
Plug leaked mutexes in OptimizingCompilerThread.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoNo need to pass profiles to ProfilerEventsProcessor.
bmeurer@chromium.org [Mon, 1 Jul 2013 12:24:26 +0000 (12:24 +0000)]
No need to pass profiles to ProfilerEventsProcessor.

Following up on https://codereview.chromium.org/18353002, there's
no need to pass the profiles to ProfilerEventsProcessor's constructor.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix compiler error about unused profiles_ field in ProfilerEventsProcessor.
bmeurer@chromium.org [Mon, 1 Jul 2013 12:11:29 +0000 (12:11 +0000)]
Fix compiler error about unused profiles_ field in ProfilerEventsProcessor.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoPlug leaked string stream debug object cache in Isolate.
bmeurer@chromium.org [Mon, 1 Jul 2013 12:07:53 +0000 (12:07 +0000)]
Plug leaked string stream debug object cache in Isolate.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoGrokdump: new shell command, "lm"
mvstanton@chromium.org [Mon, 1 Jul 2013 11:37:40 +0000 (11:37 +0000)]
Grokdump: new shell command, "lm"

lm - list matching modules and details such as product version number
found in the minidump. Also, enabled a mode to execute one command and
exit.

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoAdd broader custom test expectations for blink tests to detect crashes. Remove also...
machenbach@chromium.org [Mon, 1 Jul 2013 11:08:01 +0000 (11:08 +0000)]
Add broader custom test expectations for blink tests to detect crashes. Remove also useless documentation.

Most of these tests had some problems (failure, crash or timeout), but which problem exactly cannot be retrieved anymore.

We let them rum for a while with a broader test expectation (pass fail slow) and analyse the results.

Tests that crash get a crash expectation. Timeouts will get a timeout expectation.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRestore message when rethrowing in TryCatch.
yangguo@chromium.org [Mon, 1 Jul 2013 10:54:39 +0000 (10:54 +0000)]
Restore message when rethrowing in TryCatch.

Based on a patch contributed by Andrew Paprocki <andrew@ishiboo.com>.

R=jkummerow@chromium.org
BUG=
TEST=cctest/test-api/TryCatchNestedSyntax

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoCpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls.
loislo@chromium.org [Mon, 1 Jul 2013 10:12:03 +0000 (10:12 +0000)]
CpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls.

The bodies of methods in ProfilerEventProcessor were moved into CpuProfiler.
Multiple NewCodeEntry methods in CpuProfilesCollection were replaced with one which
simply passes arguments to the CodeEntry constructor.
And CpuProfiler just calls this method when it needs a CodeEntry object.

This NewCodeEntry method is required because CpuProfilesCollection keeps ownership of CodeEntry objects.

BUG=255392
TEST=existing tests
R=yangguo@chromium.org, yurys@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=15405

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRevert "CpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls."
loislo@chromium.org [Mon, 1 Jul 2013 09:51:44 +0000 (09:51 +0000)]
Revert "CpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls."

This reverts commit 76adf84b83ec3c0b261cbc29369ce4ac83f9d002.

windows compilation failed

BUG=none
TBR=yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoCpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls.
loislo@chromium.org [Mon, 1 Jul 2013 09:39:15 +0000 (09:39 +0000)]
CpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls.

The bodies of methods in ProfilerEventProcessor were moved into CpuProfiler.
Multiple NewCodeEntry methods in CpuProfilesCollection were replaced with one which
simply passes arguments to the CodeEntry constructor.
And CpuProfiler just calls this method when it needs a CodeEntry object.

This NewCodeEntry method is required because CpuProfilesCollection keeps ownership of CodeEntry objects.

BUG=255392
TEST=existing tests
R=yangguo@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFix infinite loop in regress-opt-after-deopt.
yangguo@chromium.org [Mon, 1 Jul 2013 09:14:15 +0000 (09:14 +0000)]
Fix infinite loop in regress-opt-after-deopt.

%CompleteOptimization attempts to install optimized functions
that the parallel thread has put on the output queue, as long as
the function is marked with a builtin.  However, activating the
debugger will set all functions to the lazy recompile builtin,
without the function being on the parallel recompilation pipeline.
So we wait for the function to finish parallel recompilation
while it's marked by a builtin that's unrelated to parallel
recompilation.

R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoTest fix - array-feedback.js has a test that only make sense when
mvstanton@chromium.org [Mon, 1 Jul 2013 09:00:14 +0000 (09:00 +0000)]
Test fix - array-feedback.js has a test that only make sense when
running crankshaft. Allow the test to tolerate --nocrankshaft.

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoAdd dependency to ICU 4.6
jkummerow@chromium.org [Mon, 1 Jul 2013 08:32:41 +0000 (08:32 +0000)]
Add dependency to ICU 4.6

We use the patched version from the chromium project, as it already has
a gyp file and allows for using the system icu instead of the bundled
version if desired.

This is in preparation of bringing in v8-i18n.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRemove irrelevant parser test that has SVN issues.
machenbach@chromium.org [Mon, 1 Jul 2013 08:11:30 +0000 (08:11 +0000)]
Remove irrelevant parser test that has SVN issues.

The file tests different CR and LF combinations that cannot be stored correctly in SVN.

Since we do not need coverage here, we rather remove the test completely.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRemove test from blacklist that should pass.
machenbach@chromium.org [Mon, 1 Jul 2013 07:54:56 +0000 (07:54 +0000)]
Remove test from blacklist that should pass.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoMIPS: Fix wrong checkin.
palfia@homejinni.com [Fri, 28 Jun 2013 19:52:44 +0000 (19:52 +0000)]
MIPS: Fix wrong checkin.

This commit fixes r15396.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoMIPS: Improved function entry hook coverage.
palfia@homejinni.com [Fri, 28 Jun 2013 18:34:08 +0000 (18:34 +0000)]
MIPS: Improved function entry hook coverage.

Port r15384 (d553efd)

Original commit message:
Adds more coverage for function entry hook, sufficient to capture profiles
that are contiguous from C++, through JS and back out to C++.

BUG=

Review URL: https://codereview.chromium.org/18184011
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoMIPS: Hydrogen array constructor cleanup and improvements.
palfia@homejinni.com [Fri, 28 Jun 2013 17:16:17 +0000 (17:16 +0000)]
MIPS: Hydrogen array constructor cleanup and improvements.

Port r15383 (3e90aaf)

Original commit message:
* Cleanup of LCallNewArray::PrintDataTo() method
* Created HCallNewArray::PrintDataTo()
* Created many more tests in array-constructor-feedback.js
* Removed redundant instructions in
GenerateRecordCallTarget
* Bugfix in CreateArrayDispatchOneArgument: on a call to
new Array(0), we'd like to set the type feedback cell to
a packed elements kind, but we shouldn't do it if the
cell contains the megamorphic sentinel.
* When used from crankshaft, ArrayConstructorStubs can
avoid verifying that the function being called is the
array function from the current native context, relying
instead on the fact that crankshaft issues an
HCheckFunction to protect the constructor call. (this
new minor key is used in LCodeGen::DoCallNewArray(), and
influences code generation in
CodeStubGraphBuilderBase::BuildArrayConstructor()).
* Optimization: the array constructor specialized for
FAST_SMI_ELEMENTS can save some instructions by looking
up the correct map on the passed in constructor, rather
than indexing into the array of cached maps per element
kind.

BUG=

Review URL: https://codereview.chromium.org/18191007
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoUse HInstructionIterator more broadly for hydrogen.
mstarzinger@chromium.org [Fri, 28 Jun 2013 16:31:11 +0000 (16:31 +0000)]
Use HInstructionIterator more broadly for hydrogen.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoFirst simplistic implementation of escape analysis.
mstarzinger@chromium.org [Fri, 28 Jun 2013 16:09:54 +0000 (16:09 +0000)]
First simplistic implementation of escape analysis.

R=jkummerow@chromium.org, titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoAdd %_DebugBreakInOptimizedCode() pseudo function call to insert int3/stop instructio...
jkummerow@chromium.org [Fri, 28 Jun 2013 15:48:38 +0000 (15:48 +0000)]
Add %_DebugBreakInOptimizedCode() pseudo function call to insert int3/stop instructions into optimized code

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoClean up the usage of V8_TARGET_ARCH_${arch} and V8_HOST_ARCH_${arch}
jkummerow@chromium.org [Fri, 28 Jun 2013 15:34:48 +0000 (15:34 +0000)]
Clean up the usage of V8_TARGET_ARCH_${arch} and V8_HOST_ARCH_${arch}

R=jkummerow@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoUse macros instead of using number directly for x64
jkummerow@chromium.org [Fri, 28 Jun 2013 15:26:01 +0000 (15:26 +0000)]
Use macros instead of using number directly for x64

R=jkummerow@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoIntroduce a notion of "v8_code" in gyp config files.
jkummerow@chromium.org [Fri, 28 Jun 2013 15:22:46 +0000 (15:22 +0000)]
Introduce a notion of "v8_code" in gyp config files.

This allows for compiling third-party code (such as ICU) with less
strict flags.

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

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

11 years agoRoll gyp to r1656
jkummerow@chromium.org [Fri, 28 Jun 2013 15:20:07 +0000 (15:20 +0000)]
Roll gyp to r1656

r1656 contains a bug fix for the make generator to correctly regenerate
Makefiles if a gyp was touched. Before, it would assume that it is
running in the top-level directory. However, the v8 standalone build
puts the generated Makefile into the out subdirectory, and so gyp
failed to locate the gyp binary.

BUG=none
R=jkummerow@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00