Commit Graph

2002 Commits

Author SHA1 Message Date
danno@chromium.org
76cbaf407f x64 support for d-to-i (truncated)
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 08:21:41 +00:00
loislo@chromium.org
ea97288e64 Logger: remove dependency between Logger and LogMessageBuilder.
LogMessageBuilder is a helper class for Log.
So I made it a nested class and removed the dependency from Logger.

BUG=none
TEST=no changes in the logic
R=yangguo@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-18 17:19:31 +00:00
yurys@chromium.org
97681be4e5 Fix data race in SamplingCircularQueue
This change fixes data race described in the bug by adding Acquire_Load to SamplingCircularQueue::StartDequeue and Acquire_Store to SamplingCircularQueue::Enqueue.

Also the queue implementation imposed a constraint on the records it stored: the first AtomicWord in each record was a marker. For that purpose TickSampleEventRecord had filter field of type int. This approach is error prone, e.g. on x64 sizeof(AtomicWord) is 8 while sizeof(int) is 4. Moreover the queue needs such marker only at the beginning of chunk. I changed the queue so that it stores the marker explicitly as the first Cell in chunk and removed the filter field.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-18 13:42:04 +00:00
machenbach@chromium.org
0288214530 Disable some tests for nacl runs.
These tests fail with the nacl/v8 builders.

Patch from bradchen@chromium.org.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-18 12:21:46 +00:00
yurys@chromium.org
a7d1cb3f2a Revert "Deprecate some debugger methods"
This reverts commit 69957c36edaebe0b9b614099eb1b067fb0208671. Blink roll this patch depends on was reverted for some reason.

BUG=None
TBR=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-18 07:34:19 +00:00
yurys@chromium.org
9f65cf6bff Deprecate some debugger methods
These methods have been superceeded by equivalents accepting object arguments exposing more details.

This is exactly the same change as r15708 which was reverted in r15710 due to pending Blink changes.

BUG=None
TBR=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-18 06:51:03 +00:00
alph@chromium.org
86bfd87fa6 Do not report unessential weak references in heap snapshot.
R=verwaest@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 18:23:16 +00:00
mstarzinger@chromium.org
dfc945d594 Handlify JSReceiver/JSObject::DeleteProperty method.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 16:38:49 +00:00
hpayer@chromium.org
f980ce0352 Fix gc stress builder.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 15:21:22 +00:00
alph@chromium.org
eafc8c971a Provide named links to code objects in heap snapshot.
R=loislo@chromium.org, verwaest@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 13:12:48 +00:00
yurys@chromium.org
2e218fe862 Remove V8_DISABLE_DEPRECATIONS=1 from test-cpu-profiler.cc
BUG=None
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 12:16:16 +00:00
yurys@chromium.org
9a51aa2197 Revert "Deprecate some debugger methods"
This reverts commit r15708 to make WebKit bots happy while Blink change https://src.chromium.org/viewvc/blink?view=rev&revision=154386 is not rolled into Chromium.

BUG=None
TBR=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 10:03:49 +00:00
yurys@chromium.org
16bb1dc210 Deprecate some debugger methods
These methods have been superceeded by equivalents accepting object arguments exposing more details.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 09:20:16 +00:00
alph@chromium.org
09131296ac Add missing links from GlobalPropertyCell to dependent_code
It produced orphan DependentCode nodes because links were not created explicitly in ExtractPropertyCellReferences and IndexedReferencesExtractor was disabled for ProperyCells.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-16 17:47:35 +00:00
adamk@chromium.org
fab9f4e126 [Object.observe] Lazily allocate callbackInfo structure
This patch allows callbacks to lazily allocate the InternalArray which is used to store pendingChangeRecords. This moves some of the expense of observation to the case where changes actually occurred.

When there are no pendingChangeRecords, the callbackInfo structure is a number which is the callbacks priority. Whenever a changeRecord is enqueued to the callback, it "normalizes" to be an InternalArray with a priority property. Immediately before its changeRecords are delivered, it returns to its optimized state.

---
Note: Naming confusion resolved:

This patch corrects some naming confusion in object-observe.js. Previously, we used the terms "callback" and "observer" to mean roughly the same thing, and overloaded the term "observer" to be both the callback itself and the *registration* on a object to observe (which now includes an accept map).

This patch resolves this confusion:

"object" (objectInfo, objectInfoMap): This refers to the observed object and its structures

"callback" (callbackInfo, callbackInfoMap): This refers to the callback to whom change records may be delivered

"observer" (objectInfo.changeObservers): This refers to a registration to observe a given object by a given callback with the specified accept list.
---

R=rossberg@chromium.org

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

Patch from Rafael Weinstein <rafaelw@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-15 22:16:30 +00:00
mstarzinger@chromium.org
35052bc2ea Reland deprecation of HAllocateObject in favor of HAllocate.
This essentially relands r14930 and r14935 with adaptions to the current
code base. It models the instantiation of an implicit receiver for
CallNew nodes in hydrogen using HAllocate together with generic stores
instead of one specialized HAllocateObject instruction, hence creating a
single choking point for inlined allocation in optimized code.

R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-15 15:12:16 +00:00
mstarzinger@chromium.org
0599225187 Use internal array as API function cache.
R=yangguo@chromium.org
BUG=chromium:260106
TEST=cctest/test-api/Regress260106

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-15 11:41:41 +00:00
danno@chromium.org
4095600a00 Fix windows build breakage due to 15645
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 13:45:41 +00:00
danno@chromium.org
48b65f8cd5 Implement truncated d-to-i as a stub on x86
- Added a general DoubleToIStub so that it's possible to extend to other platforms and non-truncating case.
- This version handles all cases of truncation (previous code deopted in some cases) and all source/destination register combinations without clobbering any temps.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 12:28:32 +00:00
yangguo@chromium.org
bd04a838a7 Check for scheduled exceptions after a failed-access-check callback.
R=verwaest@chromium.org
BUG=v8:2524

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 11:42:07 +00:00
yangguo@chromium.org
c28cefce91 Test case for missing access checks in object observe.
BUG=v8:2778
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 10:11:18 +00:00
yangguo@chromium.org
e002207321 Fall back to generic on access checks in JSON.stringify.
BUG=259366
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 10:04:35 +00:00
olivf@chromium.org
bdf4fc96b0 Encapsulate compare nil ic_state.
BUG=
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 17:20:57 +00:00
adamk@chromium.org
25ca62b6ad HasRealIndexedProperty doesn't work on JSGlobalProxy
HasRealIndexedProperty didn't unwrap the JSGlobalProxy and therefore always
returned false.

BUG=257748
R=adamk@chromium.org, rossberg@chromium.org

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

Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 19:03:58 +00:00
rodolph.perfetta@gmail.com
762157d697 ARM: Implement memcpy using NEON.
Add support for a few NEON and ARM SIMD instructions and use them for various
memcpy operations.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 15:32:39 +00:00
loislo@chromium.org
487a61934f Improve test-cpu-profiler.cc tests stability
The tests sometimes fail on bots as they don't have time to collect enough samples. This change makes them use counter of samples taken when v8 is either in JS or EXTERNAL state and repeat sampling until desired threshold is reached.

BUG=v8:2628
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:56:58 +00:00
loislo@chromium.org
daacd5830e HeapProfiler: check that heap snapshot has no unretained entries except root.
TEST=AllocationSitesAreVisible
BUG=
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:40:42 +00:00
jochen@chromium.org
865ce5806f Factor out toolset definitions in a separate gypi file
That way, third-party libraries use the correct toolset settings.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 11:15:16 +00:00
mvstanton@chromium.org
3f1fc1d3ab Bugfix: AllocationSite objects need to be walkable by the heap snapshot
generator.

BUG=
R=machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 14:16:59 +00:00
jochen@chromium.org
8544d67b44 Collect garbage at the beginning of cctest/test-cpu-profiler/FunctionCallSample
That way, we don't end up collecting all samples in the garbage
collector when the i18n extension is loaded.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 11:26:15 +00:00
mstarzinger@chromium.org
61ac770449 Make test-heap/TestInternalWeakLists pass with the i18n extension loaded
R=mstarzinger@chromium.org
BUG=v8:2745

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 09:07:57 +00:00
loislo@chromium.org
5571dc4273 CPUProfiler: Improve line numbers support in profiler.
1) report line number even if a script has no resource_name (evals);
  a) do that for already compiled functions in log.cc;
  b) do that for fresh evals in compiler.cc;

2) Implement the test for LineNumbers and make it fast and stable, otherwise we have to wait for tick samples;
  a) move processor_->Join() call into new Processor::StopSynchronously method;
  b) Process all the CodeEvents even if we are stopping Processor thread;
  c) make getters for generator and processor;

3) Fix the test for Jit that didn't expect line numbers;

4) Minor refactoring:
  a) in ProcessTicks;
  b) rename enqueue_order_ to last_code_event_id_ for better readability;
  c) rename dequeue_order_ to last_processed_code_event_id_ and make it a member for better readability;

BUG=
TEST=test-profile-generator/LineNumber
R=jkummerow@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-07 11:42:30 +00:00
yurys@chromium.org
696090196d Delete deprecated CPU profiler code that supports filtering by security token
The methods that allow to filter CPU profile by security token were introduced to support console.profiles in WebKit. Now that console.profiles is removed and corresponding V8 API methods have been deprecated in 3.19 branch(https://code.google.com/p/v8/source/browse/branches/3.19/include/v8-profiler.h) it is safe to remove all that code.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-06 09:12:09 +00:00
yangguo@chromium.org
ba8119f9b5 Make cctest/test-debug pass with extensions installed
Compiling extensions during context creation triggers debug events.
Work around this by installing the event listener after creating
the context

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 13:33:20 +00:00
danno@chromium.org
ddab7fa5ec Update limits in test-mark-compact
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 12:24:30 +00:00
dslomov@chromium.org
7e0ee5301e Add internal fields to JSArrayBufferViews (JSTypedArray and JSDataView)
In Blink, JSTypedArray and JSDataView objects act as "wrappers" for C++
objects. Wrapping protocol in Blink requires all wrapper JavaScript objects
to have a certain amount of internal fields that Blink uses for
book-keeping (essentially a pointer to C++ object and some type
information). This change adds those internal fields to JSTypedArray and
JSDataView, in a similiar way to how it is done for JSArrayBuffer.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 10:12:36 +00:00
yangguo@chromium.org
02674ee414 Keep two empty lines between declarations for cpp files
R=yangguo@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:52:11 +00:00
jkummerow@chromium.org
7456e290f3 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@15502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 08:34:17 +00:00
palfia@homejinni.com
9d989841fb 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
2013-07-04 18:47:13 +00:00
palfia@homejinni.com
d22f62e718 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
2013-07-04 18:45:03 +00:00
alph@chromium.org
cc97192cb1 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
2013-07-04 16:32:18 +00:00
dslomov@chromium.org
6d0394ac18 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
2013-07-04 15:57:43 +00:00
yurys@chromium.org
9ef762b683 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
2013-07-03 16:20:59 +00:00
jkummerow@chromium.org
91be57a469 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
2013-07-03 15:45:57 +00:00
yurys@chromium.org
678c9dc940 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
2013-07-03 15:39:18 +00:00
jkummerow@chromium.org
45681dbd76 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
2013-07-03 15:34:50 +00:00
yangguo@chromium.org
1963ec4b8a 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
2013-07-03 14:56:18 +00:00
yurys@chromium.org
44dfaa2a1e 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
2013-07-03 14:26:38 +00:00
yurys@chromium.org
41c9adffc6 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
2013-07-03 14:23:34 +00:00
yurys@chromium.org
559e1d4540 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
2013-07-03 14:04:37 +00:00