Commit Graph

1970 Commits

Author SHA1 Message Date
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
mstarzinger@chromium.org
6bde251534 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
2013-07-02 15:32:46 +00:00
yurys@chromium.org
f940a1c29b 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
2013-07-02 14:06:39 +00:00
yangguo@chromium.org
5a6fe4fc8f 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
2013-07-02 09:59:08 +00:00
yangguo@chromium.org
92523a4553 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
2013-07-02 09:04:45 +00:00
yurys@chromium.org
4c5508b42f 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
2013-07-02 07:51:09 +00:00
yurys@chromium.org
c4b6e08ac3 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
2013-07-02 06:26:07 +00:00
loislo@chromium.org
a0140093ba 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
2013-07-02 06:14:01 +00:00
loislo@chromium.org
f470bbbb4f 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
2013-07-01 19:22:45 +00:00
loislo@chromium.org
bc9f6c607f 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
2013-07-01 15:15:57 +00:00
yurys@chromium.org
91dc6dd632 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
2013-07-01 14:57:58 +00:00
prybin@chromium.org
488da00542 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
2013-07-01 13:44:10 +00:00
prybin@chromium.org
fe22b45965 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
2013-07-01 13:05:21 +00:00
prybin@chromium.org
f997bacb16 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
2013-07-01 12:54:13 +00:00
yurys@chromium.org
0ac0edb707 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
2013-07-01 12:32:52 +00:00
bmeurer@chromium.org
d7618796f6 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
2013-07-01 12:24:26 +00:00
yangguo@chromium.org
cc2f01d31f 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
2013-07-01 10:54:39 +00:00
loislo@chromium.org
ca90f4b058 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
2013-07-01 10:12:03 +00:00
loislo@chromium.org
baa3a7e47b 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
2013-07-01 09:51:44 +00:00
loislo@chromium.org
eb14637367 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
2013-07-01 09:39:15 +00:00
jkummerow@chromium.org
c7a9bffbcf 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
2013-06-28 15:34:48 +00:00
jkummerow@chromium.org
2fb7ab5530 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
2013-06-28 15:22:46 +00:00
danno@chromium.org
1642f32d1c Improved function entry hook coverage
Adds more coverage for function entry hook, sufficient to capture profiles that are contiguous from C++, through JS and back out to C++.

R=danno@chromium.org

Committed: http://code.google.com/p/v8/source/detail?r=15361

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

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 13:40:41 +00:00
alph@chromium.org
7b57b624d1 Heap snapshot: Update user roots definition.
Do not define an object as a user root if its context is not
present in Global handles.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 12:53:52 +00:00
ulan@chromium.org
475131b2b9 Revert r15361 "Improved function entry hook coverage" because of ARM build error.
R=siggi@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 15:31:06 +00:00
hpayer@chromium.org
a32277c4ba Turn off stress compaction for break point tests.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 15:19:04 +00:00
danno@chromium.org
8494f3bf25 Improved function entry hook coverage
Adds more coverage for function entry hook, sufficient to capture profiles that are contiguous from C++, through JS and back out to C++.

R=danno@chromium.org

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

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:39:37 +00:00
yurys@chromium.org
4aeccdb23e Do not iterate stack handlers in SafeStackFrameIterator
CPU profiler doesn't use stack handlers so there is no need to iterate through them while traversing stack. This change SafeStackFrameIterator always iterate only frames and removes checks corresponding to the handlers iteration.

The problem described in the bug occurred because of a false assumption in SafeStackFrameIterator that if Isolate::c_entry_fp is not NULL then the top frame on the stack is always a C++ frame. It is false because we may have entered JS code again, in which case JS_ENTRY code stub generated by JSEntryStub::GenerateBody() will save current c_entry_fp value but not reset it to NULL and after that it will create ENTRY stack frame and JS_ENTRY handler on the stack and put the latter into Isolate::handler(top). This means that if we start iterating from c_entry_fp frame and try to compare the frame's sp with Isolate::handler()->address() it will turn out that frame->sp() > handler->address() and the condition in SafeStackFrameIterator::CanIterateHandles is not held.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 09:28:11 +00:00
loislo@chromium.org
3da5ba9ac3 CPUProfiler: Simplify CodeEntry constructor calls.
In almost all the places where we create CodeEntry we use default values.
Lets move them into arguments default values.

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 16:04:25 +00:00
bmeurer@chromium.org
9e0f0a73dc Get rid of ZoneScope completely.
There's no need to differentiate between an actual Zone and its
scope. Instead we bind the lifetime of the Zone memory to the
lifetime of the Zone itself, which is way easier to understand
than having to dig through the code looking for zone scopes.

Depends on https://codereview.chromium.org/17826004/

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 13:36:16 +00:00
bmeurer@chromium.org
8e9b934e7e Get rid of the ZoneScopeMode.
No one is using the DONT_DELETE_ON_EXIT mode for ZoneScopes anymore, so
we can safely assume that all ZoneScopes are DELETE_ON_EXIT now.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 12:54:12 +00:00
loislo@chromium.org
06200a3113 Revert "CPUProfiler: Simplify CodeEntry constructor calls."
This reverts commit a6cc1e3b563c0d0689da35dbf8163545c8146ddd.

One test starts failing on Windows.

BUG=none
TBR= yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 12:38:10 +00:00
loislo@chromium.org
4292ac5932 CPUProfiler: Simplify CodeEntry constructor calls.
In almost all the places where we create CodeEntry we use default values.
Lets move them into arguments default values.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 09:55:33 +00:00