Commit Graph

63896 Commits

Author SHA1 Message Date
Clemens Backes
899cb34868 [wasm][fuzzer] Fix exception detection
Exceptions were detected by checking for a pending exception on the
isolate, but {CallWasmFunctionForTesting} was clearing any pending
exception before returning.
This CL fixes that by explicitly passing back a boolean which is set if
an exception occurred during execution.

R=ahaas@chromium.org

Bug: chromium:1115280
Change-Id: Ife71ceef0751d18e0870335b9520c2bf77e351cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352787
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69404}
2020-08-14 18:15:47 +00:00
Manos Koukoutos
dd152527d6 [wasm-gc] Implement call_ref, return_call_ref, add some basic tests
Drive-by: Add flag implications for wasm experimental features:
  gc -> typed_funcref, typed_funcref -> reftypes.

Bug: v8:9495
Change-Id: Ia6054886935d68e79b8f463289aa9e1e9d6484f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352777
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69403}
2020-08-14 17:58:27 +00:00
Santiago Aboy Solanes
3380977d5e [csa][cleanup] Remove ParameterMode/TNodify CopyFixedArrayElements
Bug: v8:9708, v8:6949
Change-Id: Iabe48b5c667f1073a0f521cb22627a22f2415199
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2353459
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69402}
2020-08-14 17:12:59 +00:00
Santiago Aboy Solanes
c92de6a373 [csa][cleanup] Remove ParameterMode/TNodify ExtractToFixedArray
Bug: v8:9708, v8:6949
Change-Id: I3d1bcf144c69a736b19b845d89e34af9bf15f5f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352786
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69401}
2020-08-14 16:06:39 +00:00
Almothana Athamneh
f5c83e20e8 Create a full debug builder on V8 for mac-arm64
Bug: chromium:1113183
Change-Id: I5f2b965f13db15b87d6b6194ccb64093a0b81fe8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2355947
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69400}
2020-08-14 15:25:19 +00:00
Zeynep Cankara
06bc338772 [system-analyzer] Fix chunk positions and update panels via FocusEvent
This CL fixes the chunk locations on timeline-tracks.
The App updates the Ic panel upon receiving FocusEvent with
an entry of ICLogEvent.

Bug: v8:10644

Change-Id: I4d09851c154196cc6cb1544a275ed33c8ae8a8af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2354814
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69399}
2020-08-14 13:32:26 +00:00
Ulan Degenbaev
8e8f4c8314 Reland "[inspector] Ensure progress of default task runners in inspector tests"
This is a reland of a7eff8cbbf

Sheriffs: This CL effectively enables GC for inspector tests. It may
uncover bugs in the existing inspector tests. If that happens please
disable the failing test in test/inspector/inspector.status instead of
reverting this CL. See https://crbug.com/v8/10748.

Original change's description:
> [inspector] Ensure progress of default task runners in inspector tests
>
> Bug: v8:10747, chromium:1098187
> Change-Id: I0215d2d85db4dd1d7fa376a0982cda5658f1683d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315982
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69387}

Bug: v8:10747
Bug: chromium:1098187
Change-Id: Iab8f10b0535b0f35948fb507537f2bf65af5f33a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2354815
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69398}
2020-08-14 12:26:28 +00:00
Leszek Swirski
f1589bbe11 [offthread] Change OffThreadIsolate to LocalIsolate
This patch introduces a new LocalIsolate and LocalFactory, which use
LocalHeap and replace OffThreadIsolate and OffThreadFactory. This allows
us to remove those classes, as well as the related OffThreadSpace,
OffThreadLargeObjectSpace, OffThreadHeap, and OffThreadTransferHandle.
OffThreadLogger becomes LocalLogger.

LocalHeap behaves more like Heap than OffThreadHeap did, so this allows
us to additionally remove the concept of "Finish" and "Publish" that the
OffThreadIsolate had, and allows us to internalize strings directly with
the newly-concurrent string table (where the implementation can now move
to FactoryBase).

This patch also removes the off-thread support from the deserializer
entirely, as well as removing the LocalIsolateWrapper which allowed
run-time distinction between Isolate and OffThreadIsolate. LocalHeap
doesn't support the reservation model used by the deserializer, and we
will likely move the deserializer to use LocalIsolate unconditionally
once we figure out the details of how to do this.

Bug: chromium:1011762

Change-Id: I1a1a0a72952b19a8a4c167c11a863c153a1252fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315990
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69397}
2020-08-14 10:57:27 +00:00
Santiago Aboy Solanes
4d58cf7642 [csa][cleanup] Remove ParameterMode ExtractFixedDoubleArrayFillingHoles
Also TNodify it.

Bug: v8:9708, v8:6949
Change-Id: I8f16c500875955cac97449a521772628b5b60b07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352785
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69396}
2020-08-14 09:03:07 +00:00
Dominik Inführ
97884f3564 [heap] SimulateFullSpace needs to run in safepoint
Run SimulateFullSpace in safepoint. Needed for FreeLinearAllocationArea
which would race with concurrent allocation.

Bug: v8:10315
Change-Id: If0c3c4e20edea1b05cc1a3e1a3e37fc29254a196
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2354812
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69395}
2020-08-14 07:45:27 +00:00
Dominik Inführ
8905016bf7 [heap] Lock PagedSpace in Heap::DisableInlineAllocation
Debugger uses DisableInlineAllocation, this races with concurrent
allocation. Lock PagedSpace mutex for freeing the linear allocation
area.

Bug: v8:10315
Change-Id: If3b0c786943f99f7e9c7cefac9436e93b352e334
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2354811
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69394}
2020-08-14 07:34:47 +00:00
Marja Hölttä
e70e56f8dd [Atomics.waitAsync] Fix: enter a context when resolving promises
Bug: v8:10239, chromium:1115354
Change-Id: Ifcb28b4f83e729107b6cbf090cd57be466495177
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351663
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69393}
2020-08-14 06:42:30 +00:00
Shu-yu Guo
6962221295 [atomics] Relax Atomics methods to work on ArrayBuffers
This reached consensus in the March 2020 TC39.
https://github.com/tc39/ecma262/pull/1908

This aligns JS with wasm, which allows atomics operations on non-shared
linear memory.

Bug: v8:10687, v8:9921
Change-Id: I7b60473b271cee6bccb342e97a4fd3781aedddb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2330802
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69392}
2020-08-13 22:10:07 +00:00
Jakob Kummerow
c5722641da [wasm] Improve error handling in global init decoder
This fixes a case where we hit a DCHECK in Debug mode, or silently
discarded bogus data in Release mode without rejecting the module.

Fixed: chromium:1108815
Change-Id: I928ff244a54b016cd8470be1ec4b5faf2c7e3994
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349768
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69391}
2020-08-13 20:39:16 +00:00
Bill Budge
8876db497a Revert "[inspector] Ensure progress of default task runners in inspector tests"
This reverts commit a7eff8cbbf.

Reason for revert: adds tests which fail:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20concurrent%20marking/14266

Original change's description:
> [inspector] Ensure progress of default task runners in inspector tests
> 
> Bug: v8:10747, chromium:1098187
> Change-Id: I0215d2d85db4dd1d7fa376a0982cda5658f1683d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315982
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69387}

TBR=ulan@chromium.org,petermarshall@chromium.org

Change-Id: I2088dc8c13416c882212316c0b7137ea28beb563
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10747
Bug: chromium:1098187
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2354421
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69390}
2020-08-13 20:00:58 +00:00
Dominik Inführ
5ca316b364 [heap] Add GCTracer::Scopes for prologue and epilogue in safepoint
Bug: v8:10315
Change-Id: I70f62b5bc3856163aba2672149876b185fc20c00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2346277
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69389}
2020-08-13 19:17:16 +00:00
Etienne Pierre-doray
2d0cad7c3a [Jobs API]: Expose missing pieces in Job to accommodate worklist users.
Expose:
- JobHandle::IsCompleted()
- worker_count passed as argument to GetMaxConcurrency()
- JobDelegate::GetTaskId
With default implementation. Once gin implements it, it can be made pure
virtual.

Bug: chromium:1114823
Change-Id: I24ce60d1df6adff4061c050e5aa8bf8d7bb1cf5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352485
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69388}
2020-08-13 19:12:16 +00:00
Ulan Degenbaev
a7eff8cbbf [inspector] Ensure progress of default task runners in inspector tests
Bug: v8:10747, chromium:1098187
Change-Id: I0215d2d85db4dd1d7fa376a0982cda5658f1683d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315982
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69387}
2020-08-13 18:28:36 +00:00
Milad Farazmand
d430610c0e PPC: [wasm-simd] Implement RoundingAverageU operations
Change-Id: I7e7bc48b2e3aa00effec15ae5c8f99adde253fdd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2354389
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#69386}
2020-08-13 16:32:45 +00:00
Almothana Athamneh
5d6ec6fba8 Create a debug builder on V8 for mac-arm64
Bug: chromium:1113183
Change-Id: Ie24412511c8eb29bdab14f0b4472c2741163e2fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352779
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69385}
2020-08-13 15:00:15 +00:00
Dominik Inführ
b30b6a5e61 [heap] Remove PagedSpace::allocation_mutex_
Remove allocation_mutex_ and use the already existing space_mutex
to protect the free list from concurrent allocation.

Bug: v8:10315
Change-Id: I8d823bcb80dfa49c6431a6db875488bc8d6ee8b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352783
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69384}
2020-08-13 14:44:25 +00:00
Dominik Inführ
4f941eb475 [heap] Disable --stress-concurrent-allocation for some tests
Two tests already test concurrent allocation. Another one measures
memory, so non-deterministic allocation would lead to higher memory
usage than anticipated.

Bug: v8:10315
Change-Id: If994233c87ea04076b850ffdf024f7783653e9db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352781
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69383}
2020-08-13 14:10:54 +00:00
Zeynep Cankara
34b652607a [tools][system-analyzer] Change naming conventions
This CL establishes a naming consistency
across the app by renaming classes.

Class Name Changes:
SelectEvent -> FocusEvent
Entry -> IcLogEvent
V8Map -> MapLogEvent

Bug: v8:10644
Change-Id: Id075d9aa36ac6f03af0224feb0e38985b1445013
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349300
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69382}
2020-08-13 13:39:44 +00:00
Leszek Swirski
279bd3e17e [runtime] Compress the off-heap string table
Rather than an Object array, use a Tagged_t array to store the
elements of the off-heap string table. This matches the old on-heap
string table's behaviour, and recovers memory regressions from that
work.

To be able to do this, this also introduces a new slot type,
OffHeapObjectSlot. This is because CompressedObjectSlot assumes that
the slot is on-heap, and that it can mask the slot location to
recover the isolate root. OffHeapObjectSlot doesn't define an
operator*, and instead provides a `load(const Isolate*)` method.
The other slots also gain this method so that they can use it in
slot-templated functions. Also, the RootVisitor gains an
OffHeapObjectSlot overload, which is UNREACHABLE by default and only
needs to be defined by visitors that can access the string table.

As a drive-by, fix some non-atomic accesses to the off-heap string
table, also using the new slot.

Bug: chromium:1109553
Bug: chromium:1115116
Bug: chromium:1115559
Bug: chromium:1115683
Change-Id: I819ed7bf820e9ef98ad5d5f9d0d592efbb6f5aa6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352489
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69381}
2020-08-13 12:39:24 +00:00
Santiago Aboy Solanes
5dedee922b [csa][cleanup] Remove ParameterMode/TNodify LoadFixedDoubleArrayElement
Cleanups:
 * Additional offset was always 0 so it can be removed
 * Reordered arguements to take advantage of the implicit arguments

Bug: v8:9708, v8:6949
Change-Id: I2168b80013958ab5b017280422fbfc9c7a137dcb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349304
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69380}
2020-08-13 12:36:34 +00:00
Dominik Inführ
6da744d0ac [heap] Introduce ConcurrentAllocationMutex
Locks the allocation mutex if SupportsConcurrentAllocation() returns
true. Unifies code/condition from multiple usages.

Bug: v8:10315
Change-Id: I684d12284e862df5d68986841e04ff25527422eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352775
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69379}
2020-08-13 12:14:34 +00:00
Dominik Inführ
e972c3599b [heap] Make external memory counters atomic
Updating external memory counters from
Isolate::AdjustAmountOfExternalAllocatedMemory races with concurrent
allocation.

Bug: v8:10315
Change-Id: I42c8cad41280d3e14eb6745cb268ff6cdd958c75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352776
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69378}
2020-08-13 12:08:59 +00:00
Zeynep Cankara
57b33e2987 [tools][system-analyzer] Add dblclick for ic categories
This CL adds the functionality to filter IC Panel
via double clicking on the event type on Timeline
Panel.

Bug: v8:10644


Change-Id: I47cdf87652a8f6fc25a5c1a5b0270d97ed9068b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352773
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69377}
2020-08-13 12:07:54 +00:00
Kim-Anh Tran
4828af8245 [debug] Add support for skipping locations on stepping into
This extends the skip list feature from step over to step into.
On a step into we can pass a skipList, which contains locations
that we do not want to stop at.

Bug: chromium:1105765
Change-Id: I70a4ded3f6a7eada14f54ae9c2f994c155c7305b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2345224
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69376}
2020-08-13 10:43:14 +00:00
Zeynep Cankara
9c8ebcbbe2 [tools][system-analyzer] Timeline-track filter by time event
This CL adds the functionality to filter log events
falling into the time range specified by the user via
mouse events on timeline tracks. The log event selections
on panels updated based on the selected time range.

Bug: v8:10644

Change-Id: Iaf53896fd5c43cefea6d4c40bab5fcb136494b5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351670
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69375}
2020-08-13 10:31:43 +00:00
Clemens Backes
833662c74a [wasm][fuzzer] Fix return value of interpreter
Bring the return value of {InterpretWasmModule} in sync with
{CallWasmFunctionForTesting}, because the fuzzers now compare the two.

R=ahaas@chromium.org

Bug: chromium:1115431
Change-Id: I0abf79c4418a4e6cc7365a78148e5e71cf32231b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351678
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69374}
2020-08-13 10:08:53 +00:00
Clemens Backes
5fdc951df3 [wasm] Contribute to compilation while waiting
While waiting for baseline compilation to finish (i.e. in the
synchronous compilation API), do also contribute to compilation. This
restores the performance from before switching to the jobs API, because
all threads will now be used for synchronous compilation.

Drive-by: Remove unused {CompilationStateImpl::background_compile_token}
method.

R=ahaas@chromium.org

Bug: chromium:1101340, chromium:1113234
Change-Id: I61eddb813eb2779cdd41f11c8d840d63132d4360
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351671
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69373}
2020-08-13 09:36:33 +00:00
Manos Koukoutos
b8a769ca57 [wasm-gc] Preparation for call_ref
Changes:
- Move some helper functions into WasmGraphBuilder.
- Introduce call_mode and null_check as additional arguments to
  WasmGraphBuilderInterface::DoCall/DoReturnCall.
- Introduce ValueType::is_strict_reference_type.
- Improve usage of ValueType API.

Bug: v8:9495
Change-Id: Id3fb9f0d7a4770475ac895b03b38bfa7f2fec252
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2343083
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69372}
2020-08-13 09:20:33 +00:00
Dominik Inführ
ca41b83783 [heap] Make Heap::max_old_generation_size_ atomic
Fixes race between concurrent allocation and incrementing
max_old_generation_size_ in InvokeNearHeapLimitCallback().

Bug: v8:10315
Change-Id: If3586fd6164e784e66b0815d0200a27798127649
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352771
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69371}
2020-08-13 09:00:18 +00:00
Dominik Inführ
3a16caa5c3 [heap] GcAndSweep needs safepoint for EnsureSweepingCompleted()
Bug: v8:10315
Change-Id: Id7d5600e07cd0dfbce409925acf6047e019f501c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352769
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69370}
2020-08-13 08:59:13 +00:00
Clemens Backes
df32131b3e [wasm] Speed up multiple-code-spaces test
TurboFan generates significantly less code than Liftoff for this test,
and depending on timing it can happen that we need to generate thousands
of functions, which takes some time and occasionally runs into timeouts.
Thus disable tier-up for this test, such that we stick with the much
longer Liftoff code, and reach the four separate code spaces quicker.

R=ahaas@chromium.org

Change-Id: I8e9a0cb466c1bdfef29aceeb5dd31aa96d05b70b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352490
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69369}
2020-08-13 08:51:03 +00:00
Clemens Backes
ed2aeeb87b [wasm] Reuse callback trigger logic for empty modules
Instead of hard-coding the logic for empty modules, just re-use the
{TriggerCallbacks} method. This will also ensure that the
{finished_events_} set will be populated correctly, such that callbacks
added later will still receive the events.

R=ahaas@chromium.org

Bug: chromium:1101340
Change-Id: I6641f23dc0459d0b6591bb03cc8c1b99dcaa90ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351669
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69368}
2020-08-13 08:22:53 +00:00
Zeynep Cankara
c374682cc9 [tools][system-analyzer] Integrate Navigation
This CL integrates a navigation controller
to zoom in and out of timeline events and
navigate in map panel using key events.

Bug: v8:10644

Change-Id: I80496c086b0342b009bbbc3d45282b95cbe82e0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351659
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69367}
2020-08-13 08:15:13 +00:00
Santiago Aboy Solanes
5e82bb633a [compiler] Remove persistent handles as a broker parameter
Since it will be patched in later in the cases where it will be used,
there is no need to have it as a parameter.

Bug: v8:7790
Change-Id: I93b27f3baf8c3841a60f5ac5ed09993d1caf19bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351667
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69366}
2020-08-13 08:13:33 +00:00
Bill Budge
754ebe0838 Revert "Improve NumberToString when cache miss and Smi"
This reverts commit 1b35c0fa15.

Reason for revert: Seems to reliably break a numerics test:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20debug/31516

Original change's description:
> Improve NumberToString when cache miss and Smi
> 
> Cache miss was handled in runtime before. This change add fast path for
> Smi in this case.
> 
> Perf show 30% improvement for the following example.
> Before 67 ms
> After 42 ms
> 
> const start = new Date();
> const MAX = 1000000;
> for (var i = 0; i < MAX; i++) {
>     i.toString();
> }
> const end = new Date();
> console.log("Time :"+ (end-start));
> 
> Change-Id: I162e9c35f58551ca6a5a0efe79fb7c7b482a8594
> Bug: v8:10477
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332866
> Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69362}

TBR=jgruber@chromium.org,leszeks@chromium.org,duongn@microsoft.com

Change-Id: I80f6bdb0464c0034e6c4a16478848618cef7e046
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10477
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351389
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69365}
2020-08-12 21:03:19 +00:00
Milad Farazmand
10027da6c6 PPC: [wasm-simd] Implement FP Multiply-ADD and subtract
Change-Id: Ic0e82d752046349d9f21f0001b84b23d73065fd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2353032
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#69364}
2020-08-12 19:46:17 +00:00
Frank Tang
ebaf3feed4 Improve test cases for Intl.Segmenter
Fix containing() w/ n point to surrogate tail.

Bug: v8:6891
Change-Id: I4d7e4083ba409eecaefaf2ec5c67b7226bd7c97c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2348208
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69363}
2020-08-12 18:53:07 +00:00
Z Nguyen-Huu
1b35c0fa15 Improve NumberToString when cache miss and Smi
Cache miss was handled in runtime before. This change add fast path for
Smi in this case.

Perf show 30% improvement for the following example.
Before 67 ms
After 42 ms

const start = new Date();
const MAX = 1000000;
for (var i = 0; i < MAX; i++) {
    i.toString();
}
const end = new Date();
console.log("Time :"+ (end-start));

Change-Id: I162e9c35f58551ca6a5a0efe79fb7c7b482a8594
Bug: v8:10477
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332866
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69362}
2020-08-12 16:47:14 +00:00
Zeynep Cankara
1f743d2f9d [tools][system-analyzer] Change Panel Layout
This CL changes the panel layout by
implementing a grid format. The new
layout displays Map and IC panel side by
side and making it easier to control
the position of panels.

Bug: v8:10644

Change-Id: Ic9b48459dd67741c1c39ed2c350ee7c552f1cc92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2343081
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69361}
2020-08-12 15:44:47 +00:00
Santiago Aboy Solanes
64828a549f [compiler] Have one unique PersistentHandles container
The (now unique)PersistentHandles container follows this path:
  1) PersistentHandles created via PersistentHandlesScope inside of
     CompilationHandleScope
  2) Owned by OptimizedCompilationInfo
  3) Owned by JSHeapBroker
  4) Owned by the broker's LocalHeap
  5) Back to the broker for a brief moment (after tearing down the
    LocalHeap as part of exiting LocalHeapScope)
  6) Back to OptimizedCompilationInfo when exiting the LocalHeapScope.

There is a special case in GenerateCodeForTesting where the JSHeapBroker
will not be retired in that same method. In this case, we need to
re-attach the PersistentHandles container to the JSHeapBroker.

The identity map of the persistent & canonical handles also gets passed
around like the persistent handles. The only difference is that is
created in the CanonicalHandleScope (i.e step 1) is different).

Bug: v8:7790
Change-Id: I2da77a7e08f3fd360a46b606c5fbda08c0af27df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332811
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69360}
2020-08-12 15:35:37 +00:00
Thibaud Michaud
e5511db797 [wasm][debug] Cleanup debugging source positions
Remove extra source positions added by Liftoff to help with OSR. Compute
the return address based on the call source position instead.

R=clemensb@chromium.org

Bug: v8:10337
Change-Id: Ifc14e924825b670ebaed920bb19d0fa09eca1b23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351666
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69359}
2020-08-12 15:15:48 +00:00
Zeynep Cankara
4206dd799d [tools][system-analyzer] Maximise space use
This CL maximises the space use in between panels and
fixes asymmetries in the Web app to make the UI panel
views more compact and increase accessibility of the
web app for different screen size.

Bug: v8:10644

Change-Id: I07bf6317db2cf3fa59204120276f0f885e356e6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351660
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Cr-Commit-Position: refs/heads/master@{#69358}
2020-08-12 14:02:07 +00:00
Sathya Gunasekaran
175e982e5a [feedback] Introduce FeedbackSlotIterator
FeedbackSlotIterator abstracts over the different IC states and
provides an unified interface to iterate over the map and handlers in
the IC.

Bug: v8:10582
Change-Id: I67861bfbd33d82e8b1ad06156fbf6fd72775321c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349295
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69357}
2020-08-12 12:53:27 +00:00
Dominik Inführ
2e37bfc5b9 [heap] Move external memory counters back into Heap
Move external memory counters out of IsolateData back into Heap.
The class ExternalMemoryAccounting now stores all counters and is
responsible for updates. This change will allow turning counters into
atomic variables.

Bug: v8:10315
Change-Id: I2abeda298d3cfcc630fd04ca78a3d6d703e3b419
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2346647
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69356}
2020-08-12 12:27:17 +00:00
Thibaud Michaud
b60261166b [wasm][debug] Remove breakpoints from native code
DebugInfo::RemoveBreakpoint was never called. Call it in
WasmScript::ClearBreakPoint to remove the breakpoint from the list and
recompile the function.

R=clemensb@chromium.org

Bug: v8:10147
Change-Id: I0d11bdab102eeacc2a5f9ae9b4a20e8c900b26f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351665
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69355}
2020-08-12 11:51:18 +00:00