Commit Graph

33064 Commits

Author SHA1 Message Date
dcheng
593ad0f7df object-stats.cc: Annotate PrintJSONArray with V8_NOINLINE
Sometimes, the compiler will inline this function and unroll the loop.
Forcing this to never be inlined reduces the compiled size of the
function from a potential 170KB to around 39KB.

BUG=v8:5240

Review-Url: https://codereview.chromium.org/2194843002
Cr-Commit-Position: refs/heads/master@{#38172}
2016-07-29 10:25:56 +00:00
georgia.kouveli
ca4707f775 Fixing test issue in test-cpu-profiler/TickLinesOptimized.
The test was calling OptimizeFunctionOnNextCall on a function before
ever executing it - crankshaft therefore didn't have any type info and
was generating a soft deoptimization bailout. Make sure we execute the
function before calling OptimizeFunctionOnNextCall to avoid this issue.

BUG=

Review-Url: https://codereview.chromium.org/2168603003
Cr-Commit-Position: refs/heads/master@{#38171}
2016-07-29 10:22:07 +00:00
jochen
edd65cc428 Teach compiler jobs how to actually parse
BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2190333002
Cr-Commit-Position: refs/heads/master@{#38170}
2016-07-29 10:09:26 +00:00
jochen
6215644cc8 Fix typo in EscapableHandleScope::Escape
TBR=marja@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2194863002
Cr-Commit-Position: refs/heads/master@{#38169}
2016-07-29 10:05:49 +00:00
ishell
3c7bff3698 [base] Use thread safe localtime_r() instead of localtime().
BUG=chromium:631269

Review-Url: https://codereview.chromium.org/2184673002
Cr-Commit-Position: refs/heads/master@{#38168}
2016-07-29 09:51:39 +00:00
marja
8558cbe557 Quick fix: nullify Isolate in background parsing slightly later.
Parser ctor reads information from it.

BUG=632612

Review-Url: https://codereview.chromium.org/2197543002
Cr-Commit-Position: refs/heads/master@{#38167}
2016-07-29 09:41:26 +00:00
bmeurer
8201579e03 [turbofan] Introduce a dedicated CheckMaps simplified operator.
So far we always create explicit control flow for map checks during
JSNativeContextSpecialization, or in the monomorphic case we used a
CheckIf combined with a map comparison. In either case we cannot
currently effectively utilize the map check information during load
elimination to optimize (polymorphic) map checks and elements kind
transitions.

With the introduction of CheckMaps, we can now start optimizing map
checks in a more effective fashion. This CL doesn't change anything
in that direction yet, but merely changes the fundamental mechanism.

This also removes the stable map optimization from the Typer, where
it was always a bit odd, and puts it into the typed lowering and
the native context specialization instead.

R=epertoso@chromium.org
BUG=v8:4930,v8:5141

Review-Url: https://codereview.chromium.org/2196653002
Cr-Commit-Position: refs/heads/master@{#38166}
2016-07-29 09:41:25 +00:00
akos.palfi
45d6909e7b MIPS: Fix mksnapshot on big-endian.
Paritally revert standalone.gypi changes in a451bd1a68 and introduce a new separate variable for the mkpeephole.

On big-endian MIPS, qemu is used to build the snapshot,
because there's no simulator support for big-endian MIPS.

BUG=

Committed: https://crrev.com/928d2395c3fdf836cf9961cde96e6b274a6b1e20
Review-Url: https://codereview.chromium.org/2172653002
Cr-Original-Commit-Position: refs/heads/master@{#38103}
Cr-Commit-Position: refs/heads/master@{#38165}
2016-07-29 09:30:54 +00:00
mstarzinger
5c1c023b63 [runtime] Fix stack frame iteration in test methods.
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2188713002
Cr-Commit-Position: refs/heads/master@{#38164}
2016-07-29 09:27:01 +00:00
neis
7d54e9135c Update comments on context slots.
R=bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2197493003
Cr-Commit-Position: refs/heads/master@{#38163}
2016-07-29 09:23:32 +00:00
jochen
84b07ec24d Create a character stream and hook it up to the parse info
Also make it possible to use the background parser from a character
stream. The External{One,Two}ByteStringUtf16CharacterStreams work both
on foreground and background threads.

BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2195603002
Cr-Commit-Position: refs/heads/master@{#38162}
2016-07-29 09:20:04 +00:00
machenbach
dc78fefb15 [gn] Add missing dep and blacklist for msan
Required for https://codereview.chromium.org/2194823002/

BUG=chromium:631979
NOTRY=true

Review-Url: https://codereview.chromium.org/2189323002
Cr-Commit-Position: refs/heads/master@{#38161}
2016-07-29 09:01:24 +00:00
bmeurer
ad3cac7231 [turbofan] Run JSIntrinsicLowering together with inlining.
R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2195623002
Cr-Commit-Position: refs/heads/master@{#38160}
2016-07-29 08:35:52 +00:00
mstarzinger
de244af9ba [interpreter] Support on-stack replacement in profiler.
This adds preliminary support for on-stack replacement from Ignition to
optimized code generated by TurboFan to the runtime profiler. Involved
heuristics (e.g. code size allowance) have been taken from existing code
without any re-evaluation in the new setting.

R=rmcilroy@chromium.org
BUG=v8:4764

Review-Url: https://codereview.chromium.org/2182183005
Cr-Commit-Position: refs/heads/master@{#38159}
2016-07-29 08:32:19 +00:00
jgruber
1c7c0521f1 Set Error.stack property writable
Previously, the stack property was set up in JS as read-only; but since
it had a JS setter, writability was ignored and writing to stack was
possible.

This is no longer the case now that stack is either an actual data
property, or is associated with C++ accessors. Explicitly set the
property as writable to preserve old behavior.

BUG=5245
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2190313002
Cr-Commit-Position: refs/heads/master@{#38158}
2016-07-29 08:15:26 +00:00
jochen
0e48f4b37d Forgot to hook up the ExternalOneByteStringUtf16CharacterStream to lazy parsing
BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2196643002
Cr-Commit-Position: refs/heads/master@{#38157}
2016-07-29 07:39:04 +00:00
machenbach
224e2656e8 Revert of Reland [inspector] add inspector protocol parser test build target. (patchset #2 id:20001 of https://codereview.chromium.org/2190833004/ )
Reason for revert:
Remaining win x64 errors:
https://codereview.chromium.org/2187753004/

Original issue's description:
> Reland [inspector] add inspector protocol parser test build target.
>
> BUG=chromium:580337
>
> Committed: https://crrev.com/b8229434c9fd3bfef81fb77d88779d0e78d06662
> Cr-Commit-Position: refs/heads/master@{#38135}

TBR=yangguo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:580337

Review-Url: https://codereview.chromium.org/2193143002
Cr-Commit-Position: refs/heads/master@{#38156}
2016-07-29 07:05:15 +00:00
bmeurer
c987284af0 [turbofan] Fix overly aggressive keyed access lowering.
The keyed load/store lowering is too aggressive when it comes to element
vs. property access. If we cannot find a cached name on the IC we
automatically assume that it's an element access, i.e. we assume that
the key that is passed to the keyed access must be a valid array index
then. But this is not true for megamorphic keyed load/store ICs, which
do not have a cached name (because the IC saw different names), and thus
use a different mechanism to indicate that it's a non-element access.

Review-Url: https://codereview.chromium.org/2195583002
Cr-Commit-Position: refs/heads/master@{#38155}
2016-07-29 06:34:39 +00:00
jochen
a661f61123 Implement a character stream for external one byte streams
In contrast to the generic stream, this character stream works without
accessing the heap, and can be used on a background thread.

BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2184393002
Cr-Commit-Position: refs/heads/master@{#38154}
2016-07-29 06:13:38 +00:00
v8-autoroll
726520d6df Update V8 DEPS.
Rolling v8/build to 5240573aa6f46cfee690cdf7c6d9544e1841f502

Rolling v8/tools/mb to f2acac06c11447a7155d476d61f140f18a4a8066

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2196593002
Cr-Commit-Position: refs/heads/master@{#38153}
2016-07-29 03:24:14 +00:00
zhengxing.li
9429ec9cdd X87: Revert of [heap] Reland "Remove black pages and use black areas instead." (patchset #4 id:60001 of https://codereview.chromium.org/2185613002/ ).
port 2c7efba658 (r38129)

  original commit message:
  Reason for revert:
  Still crashing.

  Original issue's description:
  > [heap] Reland "Remove black pages and use black areas instead."
  >
  > BUG=chromium:630969,chromium:630386
  > LOG=n
  >
  > Committed: https://crrev.com/9e37a07c8de0a20ef2681e26824ff4d329102603
  > Cr-Commit-Position: refs/heads/master@{#38057}

BUG=

Review-Url: https://codereview.chromium.org/2192113002
Cr-Commit-Position: refs/heads/master@{#38152}
2016-07-29 02:40:10 +00:00
bbudge
55b01ccbfc [Turbofan] Revert FP register aliasing support on Arm.
- Changes register allocation to only use even numbered registers on Arm.
- Turns on float32 testing in test-gap-resolver.cc.

This is effectively a revert of:
https://codereview.chromium.org/2086653003/

LOG=N
BUG=V8:4124, V8:5202

Review-Url: https://codereview.chromium.org/2176173003
Cr-Commit-Position: refs/heads/master@{#38151}
2016-07-29 00:50:57 +00:00
danno
c07c675e9a Add a flag to help platform ports bootstrap V8
A "--minimal" flag turns off all optimizing compilers and activates the
interpreter. The idea is that with this flag activated, only the
platform-specific stubs and a Turbofan implementation must be complete to start
d8 and run the bulk of the tests. Note that although this flag is constructed as
a runtime flag, it must be set to true when building the snapshot and therefore
creates a compile-time dependency.

BUG=chromium:608675

Review-Url: https://codereview.chromium.org/2189663002
Cr-Commit-Position: refs/heads/master@{#38150}
2016-07-28 22:15:56 +00:00
mlippautz
b9e9e84671 [heap] ObjectStats: Record fixed arrays in BytecodeArray
BUG=chromium:631094
R=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2190093002
Cr-Commit-Position: refs/heads/master@{#38149}
2016-07-28 20:19:08 +00:00
bjaideep
ddea5a6785 PPC/s390: [stubs] Port CreateWeakCellStub to turbofan
Port 7f1fa30e34

Original commit message:

    In the process also inline the stub into the appropriate interpreter bytecode
    handler and make sure that the context register is preserved in hand-written
    assembly code that calls the stub and expects the context register to be
    preserved.

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=608675
LOG=N

Review-Url: https://codereview.chromium.org/2188483008
Cr-Commit-Position: refs/heads/master@{#38148}
2016-07-28 19:29:18 +00:00
mstarzinger
4f0029a481 [interpreter] Reduce size of OSR nesting level field.
R=rmcilroy@chromium.org
BUG=v8:4764

Review-Url: https://codereview.chromium.org/2185293004
Cr-Commit-Position: refs/heads/master@{#38147}
2016-07-28 17:19:53 +00:00
cbruni
f3f738fe8e [api] Introduce fast instantiations cache
This CL introduces a new fast flat instantiations cache for the first 1024 object templates.
After that we fall back to the existing slower dictionary cache.

Drive-by-fix: de-handlify and clean up some code in api-natives.cc

BUG=chromium:630217

Review-Url: https://codereview.chromium.org/2170743003
Cr-Commit-Position: refs/heads/master@{#38146}
2016-07-28 17:19:52 +00:00
ishell
e063b7118c [gdb] Define print functions used by gdb macros in the top level namespace to make them always be available.
This should fix the following errors that sometimes appear when using V8 gdb macros:
  Cannot evaluate function -- may be inlined
or
  No symbol "xxx" in namespace "v8::internal".

Review-Url: https://codereview.chromium.org/2186293002
Cr-Commit-Position: refs/heads/master@{#38145}
2016-07-28 17:09:35 +00:00
mstarzinger
70489a1be5 [interpreter] Extend test for OSR from within generators.
R=rmcilroy@chromium.org
TEST=mjsunit/ignition/osr-from-generator
BUG=v8:4764

Review-Url: https://codereview.chromium.org/2185973004
Cr-Commit-Position: refs/heads/master@{#38144}
2016-07-28 16:52:26 +00:00
mvstanton
8587c4ce6f [Turbofan] Soft deopt if we only have deprecated maps on optimization.
In native context specialization, we attempt to use map-based feedback to do optimized named and element loads and stores. Tragically, it could happen that any maps we encounter for a load have been deprecated. The right thing to do here is reoptimize later, let the IC subsystem update the map.

BUG=

Review-Url: https://codereview.chromium.org/2187283002
Cr-Commit-Position: refs/heads/master@{#38143}
2016-07-28 16:43:40 +00:00
mlippautz
1d2a1dd6bf [heap] Prepare Heap::CopyFixedArrayWithMap for black allocation
With black allocation turned on we have no guarantee that the target array is
white and will be visited by the marker. Only execute the fast path when we are
allowed to skip the barrier.

R=hpayer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2188713004
Cr-Commit-Position: refs/heads/master@{#38142}
2016-07-28 16:20:35 +00:00
hpayer
4ac08c97f0 [heap] Give marking functions for incremental marking more precise names.
BUG=

Review-Url: https://codereview.chromium.org/2173773002
Cr-Commit-Position: refs/heads/master@{#38141}
2016-07-28 14:45:22 +00:00
oth
02b0985335 [interpreter] Fix peephole rule on eliding last before jump.
BUG=chromium:629792
LOG=N

Review-Url: https://codereview.chromium.org/2185123003
Cr-Commit-Position: refs/heads/master@{#38140}
2016-07-28 14:41:26 +00:00
ishell
fc66694de8 [fullcode][mips][mips64][ppc][s390] Avoid trashing of a home object when doing a count operation with keyed load/store to a super.
BUG=chromium:631917

Review-Url: https://codereview.chromium.org/2191663004
Cr-Commit-Position: refs/heads/master@{#38139}
2016-07-28 14:31:07 +00:00
cbruni
ba6e348ffe [api] Remove HistogramTimerScope from high-frequency API-Functions
The timing scopes don't come for free and in the case of wrapper creation only add
overhead. This CL removes the histogram timer for CallAs(Function|Constructor) and
Function::(NewInstance|Call).

BUG=chromium:630217

Review-Url: https://codereview.chromium.org/2188193002
Cr-Commit-Position: refs/heads/master@{#38138}
2016-07-28 14:03:55 +00:00
hpayer
76812cc75c [heap] Do not allow left trimming on new space pages that need to be swept.
BUG=chromium:630969,chromium:632334
LOG=n

Review-Url: https://codereview.chromium.org/2189033002
Cr-Commit-Position: refs/heads/master@{#38137}
2016-07-28 13:49:53 +00:00
jgruber
ea09c9dc1e Move CallSite.toString to C++
BUG=

Review-Url: https://codereview.chromium.org/2174723002
Cr-Commit-Position: refs/heads/master@{#38136}
2016-07-28 13:42:47 +00:00
yangguo
b8229434c9 Reland [inspector] add inspector protocol parser test build target.
BUG=chromium:580337

Review-Url: https://codereview.chromium.org/2190833004
Cr-Commit-Position: refs/heads/master@{#38135}
2016-07-28 12:41:34 +00:00
Alexander.Gilday2
6e01fe20da [turbolizer] Fixed naming of turbolizer perf script.
Change was meant to be in previous patch but was accidentally reverted.
README.md updated with new filename, also.

BUG=

Review-Url: https://codereview.chromium.org/2184223005
Cr-Commit-Position: refs/heads/master@{#38134}
2016-07-28 12:38:00 +00:00
jgruber
b48b04edc4 Handle missing scripts in CallSite.GetEvalOrigin
BUG=630950,631909

Review-Url: https://codereview.chromium.org/2184193004
Cr-Commit-Position: refs/heads/master@{#38133}
2016-07-28 12:06:12 +00:00
danno
7f1fa30e34 [stubs] Port CreateWeakCellStub to turbofan
In the process also inline the stub into the appropriate interpreter bytecode
handler and make sure that the context register is preserved in hand-written
assembly code that calls the stub and expects the context register to be
preserved.

BUG=608675

Review-Url: https://codereview.chromium.org/2188993003
Cr-Commit-Position: refs/heads/master@{#38132}
2016-07-28 11:49:00 +00:00
jgruber
da69889609 Handle failed stack trace captures
BUG=630953
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2191713004
Cr-Commit-Position: refs/heads/master@{#38131}
2016-07-28 11:13:06 +00:00
machenbach
0f62a0e7aa [gn] Add required sanitizer blacklist files.
Splitt of CL:
https://codereview.chromium.org/2188693002/#ps100001

Switching to GN is blocked on test errors. These files are
required for compilation and allow looking into the test
errors locally.

BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2190863003
Cr-Commit-Position: refs/heads/master@{#38130}
2016-07-28 11:05:50 +00:00
hpayer
2c7efba658 Revert of [heap] Reland "Remove black pages and use black areas instead." (patchset #4 id:60001 of https://codereview.chromium.org/2185613002/ )
Reason for revert:
Still crashing.

Original issue's description:
> [heap] Reland "Remove black pages and use black areas instead."
>
> BUG=chromium:630969,chromium:630386
> LOG=n
>
> Committed: https://crrev.com/9e37a07c8de0a20ef2681e26824ff4d329102603
> Cr-Commit-Position: refs/heads/master@{#38057}

TBR=ulan@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:630969,chromium:630386

Review-Url: https://codereview.chromium.org/2183383004
Cr-Commit-Position: refs/heads/master@{#38129}
2016-07-28 10:29:35 +00:00
machenbach
6b23ce3061 Revert "[inspector] add inspector protocol parser test build target for GYP."
Breaks chromium win.

This also includes:

Revert "[gn] Add missing deps to inspector_protocol_parser_test"

Revert "Fix gitignores after moving inspector_protocol"

NOTRY=true
BUG=chromium:580337
TBR=yangguo@chromium.org, jochen@chromium.org, pfeldman@chromium.org

Review-Url: https://codereview.chromium.org/2187263002
Cr-Commit-Position: refs/heads/master@{#38128}
2016-07-28 10:21:48 +00:00
bmeurer
1bce27906d [turbofan] Refactor the lowering of element/property accesses.
Split the monster methods in JSNativeContextSpecialization into smaller
ones, adding appropriate helpers. Improve the condition checking for
strings and numbers using CheckString/CheckNumber when applicable. Also
try to merge compatible PropertyAccessInfos, to avoid running into the
polymorphic case whenever possible.

Drive-by-fix: Don't try to resurrect dead nodes during LoadElimination.
With the improve code generation for monomorphic loads, we seem to
trigger the dead node resurrection.

R=epertoso@chromium.org
BUG=v8:4930,v8:5141

Review-Url: https://codereview.chromium.org/2191823002
Cr-Commit-Position: refs/heads/master@{#38127}
2016-07-28 09:57:01 +00:00
zhengxing.li
1554e29dd5 X87: [heap] Reland "Remove black pages and use black areas instead.".
port 9e37a07c8d (r38057)

  original commit message:

BUG=

Review-Url: https://codereview.chromium.org/2185363003
Cr-Commit-Position: refs/heads/master@{#38126}
2016-07-28 09:53:25 +00:00
mstarzinger
fcdcff5605 [interpreter] Add test for OSR from within generators.
R=neis@chromium.org
TEST=mjsunit/ignition/osr-from-generator
BUG=v8:4764

Review-Url: https://codereview.chromium.org/2188723005
Cr-Commit-Position: refs/heads/master@{#38125}
2016-07-28 09:49:58 +00:00
Alexander.Gilday2
286e2b14a5 [turbolizer] Add support for showing perf profiling information.
perf-turbo.py merges a perf data file and a turbofan trace file into a
single json object which can then be piped to a file and uploaded to
turbolizer to display the profiling data in the disassembly. With the
changes, turbolizer now shows the event counts for instruction in
percentage form and with heatmap-stype colouring. Multiple different
events can be recorded at once with a new drop-down menu to select which
event to view the counts of. The documentation has been updated with
instructions. Using the script is optional and turbolizer retains
previous functionality if a trace without profiling data is uploaded.

BUG=None

Review-Url: https://codereview.chromium.org/2174803002
Cr-Commit-Position: refs/heads/master@{#38124}
2016-07-28 09:42:38 +00:00
dcheng
606e1ada17 Force v8::internal::HeapObjectsSet::SetTag to be out-of-lined.
This reduces the size of GetStrongGcSubrootName() from 77 KB to 10KB.

BUG=5240

Review-Url: https://codereview.chromium.org/2189633003
Cr-Commit-Position: refs/heads/master@{#38123}
2016-07-28 09:21:12 +00:00