Commit Graph

69841 Commits

Author SHA1 Message Date
Thibaud Michaud
68a438499d [regalloc] Skip unnecessary inactive live range iterations
Inactive live ranges are ordered by their next start, so in
UpdateDeferredFixedRanges, we can stop the search for conflicts as soon
as the next start is after the end of the current extent of deferred
code.

Bug: v8:11861
Change-Id: I114eb776c8228948ecca68d105224b121be8931b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960950
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75149}
2021-06-15 10:32:49 +00:00
Dominik Inführ
31251988ab [heap] Heap::EnsureSweepingCompleted only sweeps one page
This CL optimizes Heap::EnsureSweepingCompleted() by only ensure that
sweeping is finished for that object's page only and not for the whole
heap.

For this purpose the page is removed from the sweeping_list_ and
processed on the main thread. In case the object is in new space,
this method will just use EnsureIterabilityCompleted() since
the iterability task doesn't currently have any kind of synchronization.
Also the new space will generally be much smaller.

Bug: v8:11837
Change-Id: I7e878b5c84c223009fac0d58798197be5cd524e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2958488
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75148}
2021-06-15 10:03:39 +00:00
Michael Lippautz
1835607ba2 cppgc: Fix new/delete mismatch in heap snapshot generation
Before this CL the C strings were generated using new char[] and
destroyed using delete. Fix this by avoiding a raw new[] call and
directly using unique_ptr.

Bug: chromium:1056170
Change-Id: I894171d58a3f7a765cdf86e07d3da2e9298a4a92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960275
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75147}
2021-06-15 09:49:09 +00:00
Leszek Swirski
79b6158757 [system-analyzer] Support thin ticks
Add better support for lots of thin ticks by:

  * Removing stroke on ticks (so that the stroke isn't thicker than the
    tick itself)
  * Alternating colours of the ticks between light and dark (so that
    neighbouring ticks are still distinguishable)
  * Making selection drawing use isInputPending to allow faster looping
    over multiple ticks.

Change-Id: Iaa13fe4820d3d3168e085dfc01d7581cbc1739f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959626
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75146}
2021-06-15 09:29:39 +00:00
Santiago Aboy Solanes
9468be4ab7 [compiler] Add TSAN support for generated code tagged loads
In the same vein we did tagged stores, we can do tagged loads.

As a drive-by, move GetTSANRelaxedStoreStub to CodeFactory.

Bug: v8:7790, v8:11600
Change-Id: Ic1ef3245623756538eab64c3358047e3797195c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953162
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75145}
2021-06-15 09:17:49 +00:00
Georg Neis
3a6ace557c [ast] Fix a comment about placeholder for computed property values
R=mvstanton@chromium.org

Change-Id: Ia9b5b6e3b80334555faddd1fbc70995d414295a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960889
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75144}
2021-06-15 08:51:08 +00:00
Camillo Bruni
019d459299 [assembler][x64] Use higher-level Move instead of movq for code-size
Bug: v8:11879
Change-Id: I3f2f65d38fc656155b27b8835516cbf2832bf269
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649032
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75143}
2021-06-15 07:16:48 +00:00
Igor Sheludko
4b4037308b [compiler] Simplify DependentCode API and make it type-safe
Bug: v8:11879, v8:11880
Change-Id: I6b37148ae2a971bda0cbb6636f64561ab0a02ba5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960215
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75142}
2021-06-15 05:23:08 +00:00
Liu Yu
76a42474d2 [mips] Fix build failed
Port 407317a284

Change-Id: I6d46b2c9b9bafb0287fa711822aac8ffdb30c7ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2962153
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#75141}
2021-06-15 04:24:28 +00:00
v8-ci-autoroll-builder
e54c28ba0a Update V8 DEPS.
Rolling v8/build: b59724c..e6942ef

Rolling v8/buildtools/third_party/libc++abi/trunk: e5f25a3..6c29693

Rolling v8/third_party/aemu-linux-x64: KF0Sz0CG_sURJodN44_YMwy0VU9tagOFFB_3EDTux1kC..XSqCv80jM_M_v5sYf8LVksQaL1zsbc6Pp9y-6WBCkbsC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2f46970..e30a74f

Rolling v8/third_party/depot_tools: ef579a1..3b56309

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I3b333c34f79e876889148c808c7e1aac3866cf11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2962152
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75140}
2021-06-15 03:47:58 +00:00
Igor Sheludko
b5b9c2ca8b [cleanup] Remove unused TailCallOptimizedCodeSlot builtin
Bug: v8:11879
Change-Id: Ifb894d8beec6b54a9b7ff879dd4d6710306ba15b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960217
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75139}
2021-06-14 15:31:46 +00:00
Clemens Backes
13209a75c0 Reland "[no-wasm] Exclude trap-handler implementation"
This is a reland of 5d84b6cb9a. PS2 contains
the fix for a copy&paste error in a preprocessor condition.

Original change's description:
> [no-wasm] Exclude trap-handler implementation
>
> The trap handler is only needed for WebAssembly, hence it can be
> excluded in no-wasm builds (v8_enable_webassembly = false).
> This makes it easier to port WebAssembly to platforms that do not need
> to support WebAssembly.
>
> R=ahaas@chromium.org, jkummerow@chromium.org
> CC=johnx@google.com
>
> Bug: v8:11877
> Change-Id: I25c34c2c4f1122227047e13add532ee2b9f73d2f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953285
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75101}

Bug: v8:11877
Change-Id: I70dba5dc8762c65a9c751ff6619a3b0ebb542837
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960214
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75138}
2021-06-14 15:18:27 +00:00
Igor Sheludko
5913deec99 [cleanup][ic] Introduce bottleneck for Code handlers
This CL also removes code handler related logic from CodeFactory
and removes unused CodeFactory::BinaryOperation().

Bug: v8:11879, v8:11880
Change-Id: I4ea3074b7143975bea3f9367bcab84cdfcd86827
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960948
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75137}
2021-06-14 15:10:27 +00:00
Clemens Backes
6ae810b805 Skip another nondeterministic test in predictable mode
Just as other skipped tests, this new test uses SAB to synchronize
between Workers, thus timing (and hence amount of allocations) is
nondeterministic.

R=syg@chromium.org

Bug: v8:11881
Change-Id: I9cd375a1f804aac4248a7c491e75a1c7c7919e82
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959627
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75136}
2021-06-14 14:44:36 +00:00
Thibaud Michaud
ff2cf7dad2 [wasm][eh] Remove unwind instruction
Relevant links:
https://github.com/WebAssembly/exception-handling/issues/153
https://github.com/WebAssembly/exception-handling/pull/156

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: I0deeb9665c6648e643d0aa4f310b7676e1c2fa32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959624
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75135}
2021-06-14 14:36:26 +00:00
Milad Fa
659424f8c7 PPC/s390: [runtime] Rename Builtins::Name to Builtin 2/2
Port 407317a284

Original Commit Message:

    - Convert Builtin to enum class
    - Change int-based builtin_index methods to use Builtin
    - Change Builtins::builtin to Builtins::code

R=cbruni@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ic92eeea4a0d0aaf38d78a93bfbaac2bb10403dae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960908
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75134}
2021-06-14 14:34:36 +00:00
Peter Kasting
2af5cfa81a Fix -Wdeprecated-copy in V8.
TNode has a templated constructor from TNode<U>, but this doesn't take
precedence over the auto-generated copy constructor, which results in a
warning being fired.  Fix by adding an explicit copy constructor that
does what the templated constructor does, which in turn requires fixing
some missing #includes that slipped by due to the lack of
LazyTemplateChecks() in the autogenerated copy constructor.

Bug: chromium:1213098
Change-Id: Iad40950261af8f88396be9227355e4e013837341
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953503
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75133}
2021-06-14 14:09:56 +00:00
Clemens Backes
dd4d29a200 Revert "[wasm][liftoff] Cache the memory start register"
This reverts commit fd93f33824.

Reason for revert: Out of bounds errors in Unity benchmark (link is internal).

Original change's description:
> [wasm][liftoff] Cache the memory start register
>
> WebAssembly functions often have subsequent memory accesses, and each of
> these memory accesses need the start address of the memory in a register.
> With this CL the register with the memory start address is cached, so
> only the first memory access has to load the memory start address into a
> register, subsequent memory accesses can just reuse the register.
>
> In first measurements with the epic benchmark this reduces the size of
> the generated Liftoff code by a bit more than 5%.
>
> R=​clemensb@chromium.org
>
> Bug: v8:11862
> Change-Id: Ic33e7e3c00a4209570821269c728187affbeadcf
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947403
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75113}

Bug: v8:11862
Change-Id: I20c7e7d729cf9846499db90c02f8581d7f994ace
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960216
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75132}
2021-06-14 13:56:07 +00:00
Sathya Gunasekaran
5f82dbbe53 [API] Allow embedders to assign instance types
Constructors define instance types for their instances while accessors
define a range of permissable instance types for receiver checks.\

Bug: v8:11476
Change-Id: I48b5326ec0a4e847283c2fa5c8f1705302727453
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2821430
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75131}
2021-06-14 13:30:26 +00:00
Camillo Bruni
1837c6f983 [tools][system-analyzer]
improve logEntry hit testing performance
fixing flame graph rendering
adding some comments
adding flamechart highlighting

Bug: v8:10644, v8:11835
Change-Id: I2ab2f63b9e8339c6c25bb7023772fc97dfc56c2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959615
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75130}
2021-06-14 13:18:06 +00:00
Clemens Backes
1c249d33b5 [wasm] Remove outdated TODO
Code protection scopes now work with shared code, hence the TODO can be
removed.

R=jkummerow@chromium.org

Change-Id: I925732c653f652d4576f21e82c96c1477b11ec12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959612
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75129}
2021-06-14 13:12:06 +00:00
Clemens Backes
4fc4efb74e [flags] Stage wasm code protection behind --future
This configuration (PKU with fallback to mprotect) is already finched,
and can hopefully be enabled by default soon. Hence stage it behind
--future to get more test and fuzzer coverage.

R=jkummerow@chromium.org
CC=dlehmann@google.com

Bug: v8:11714
Change-Id: I5c38c71582e79e3348e6296cbf175655d00a635c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959611
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75128}
2021-06-14 12:51:46 +00:00
Camillo Bruni
407317a284 [runtime] Rename Builtins::Name to Builtin 2/2
- Convert Builtin to enum class
- Change int-based builtin_index methods to use Builtin
- Change Builtins::builtin to Builtins::code

Change-Id: Id9e3bb83da97e8894ca7ca78e1e852da60675619
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949104
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75127}
2021-06-14 12:48:46 +00:00
Thibaud Michaud
973c369f0c [wasm][interpreter] Pop catch-less try scope info
Now that try blocks don't need a catch handler, ensure that we still
properly close the scope when we handle the "end" opcode.

R=clemensb@chromium.org

Change-Id: I012939d5b3ee9caee9275a2f0abd65e517593870
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959623
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75126}
2021-06-14 11:26:07 +00:00
Leszek Swirski
423f38ab01 [system-analyzer] Process shared-library events
Add a new LogEntry for sharedlib PCs

Change-Id: I4f7fdca93a9905e41b73347df475dffcb84bcb89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959620
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75125}
2021-06-14 10:43:27 +00:00
Dominik Inführ
e9c4ff4052 Reland "[heap] Introduce ParkedSharedMutexGuardIf and use it in compiler"
This is a reland of 4cd856eee4

This CL fixes the problem that local_isolate() returned nullptr on
the main thread.

Original change's description:
> [heap] Introduce ParkedSharedMutexGuardIf and use it in compiler
>
> In some cases it could happen that the concurrent compiler tries to get
> a shared lock on a mutex that is already exclusively held by the main
> thread. The background thread will then block itself until the
> main thread leaves the critical section. If the main thread then also
> starts a GC while holding the lock, this will result in a deadlock.
>
> A GC can't start until the background thread reaches a safepoint and
> the main thread can't leave the critical section before the GC ran.
>
> This CL introduces a new version of SharedMutexGuard named
> RecursiveSharedMutexGuardIfNeeded. This class will park the thread
> when blocking is needed and will unpark the thread again as soon as
> the lock was acquired successfully. This resolves the deadlock on
> safepointing.
>
> Turbofan can then simply use that class internally for
> MapUpdaterGuardIfNeeded.
>
> Bug: v8:10315, chromium:1218318
> Change-Id: Ice04b222cc979e4905791118caede26e71fca6de
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953288
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75107}

Bug: v8:10315
Bug: chromium:1218318
Change-Id: Ic56afb14a537e0cbf412311f11407c1f09278225
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2958408
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75124}
2021-06-14 10:27:57 +00:00
Clemens Backes
7cd9341e86 [wasm] Disable NativeModuleModificationScope on arm64 Mac
M1 hardware uses the CodeSpaceWriteScope (which uses MAP_JIT under the
hood), hence all other memory protection mechanisms should be disabled
there.
Trying to protect code space allocated with MAP_JIT would fail
otherwise, resulting in a CHECK failure.

R=jkummerow@chromium.org
CC=​dlehmann@chromium.org

Bug: chromium:1218782
Change-Id: I626990575c2180168c2e421a93b9f0b035382f03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959613
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75123}
2021-06-14 10:26:26 +00:00
Victor Gomes
f2b726f9dd [d8] Remove GOOGLE3 main function guard
This guard is deprecated. We actually have floating patches in g3 that
removes these lines.

Change-Id: I11168b3ca1f3985039cf31ddef70d5b292de85b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959619
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75122}
2021-06-14 10:23:57 +00:00
Santiago Aboy Solanes
f5cd2bfb38 [compiler] Add TSAN support for generated code movb and movw
This is the last CL of the code generated stores.

Bug: v8:7790, v8:11600
Change-Id: If8bbabb422027f938c7acc0bdc12a233dfed580e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2950760
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75121}
2021-06-14 09:37:17 +00:00
Dan Elphick
9444600b5b [build] Move FunctionTemplateInfo methods out of objects.cc
This moves all of the FunctionTemplateInfo code into templates.cc and
removes the inline keyword from BreakAtEntry which is moved out of
templates-inl.h. As a result templates-inl.h no longer depends on
shared-function-info-inl.h. This in turn uncovered lots of other missing
includes which are now in place.

Change-Id: I9bc152d5e3db0e793db135a8cfcf97f6d8bcbb8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953295
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75120}
2021-06-14 09:29:16 +00:00
v8-ci-autoroll-builder
5f8a28f00b Update V8 DEPS.
Rolling v8/build: 8870cb4..b59724c

Rolling v8/buildtools: c793cca..be7dcbc

Rolling v8/buildtools/linux64: git_revision:39a87c0b36310bdf06b692c098f199a0d97fc810..git_revision:e0c476ffc83dc10897cb90b45c03ae2539352c5c

Rolling v8/buildtools/third_party/libc++abi/trunk: 7e3b768..e5f25a3

Rolling v8/buildtools/third_party/libunwind/trunk: 950faee..7e85c7a

Rolling v8/third_party/aemu-linux-x64: Hf11zqHzrfja2miAIic8j5jVjfs3rcuSFj8vUK-AVYAC..KF0Sz0CG_sURJodN44_YMwy0VU9tagOFFB_3EDTux1kC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a8bae77..2f46970

Rolling v8/third_party/depot_tools: b508ecd..ef579a1

Rolling v8/third_party/googletest/src: 53495a2..e2239ee

Rolling v8/tools/clang: 0c64e83..de043ec

Rolling v8/tools/luci-go: git_revision:2cc9805d5ad186367461ef1c4f0c59098b450418..git_revision:2adc53281f4a72ecb71e84a8af5acc0fced04cc9

Rolling v8/tools/luci-go: git_revision:2cc9805d5ad186367461ef1c4f0c59098b450418..git_revision:2adc53281f4a72ecb71e84a8af5acc0fced04cc9

Rolling v8/tools/luci-go: git_revision:2cc9805d5ad186367461ef1c4f0c59098b450418..git_revision:2adc53281f4a72ecb71e84a8af5acc0fced04cc9

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: Iec2c37e934759add7caeb0876b4a057d2f5c22c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960074
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75119}
2021-06-14 09:20:47 +00:00
Manos Koukoutos
4ba06632cf [wasm] Enable loop unrolling
Additionally, reduce the maximum times a loop can be unrolled to 5.

Bug: v8:11298
Change-Id: Ia3cc5955c91e70abf388e08bdc37aba998b34b93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953297
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75118}
2021-06-14 09:10:56 +00:00
Clemens Backes
763be7fd3c [wasm] Delay tier-down of unfinished modules
If a module is not fully (baseline) compiled yet, we cannot reliably
tier it down, because we might not have the wire bytes for all functions
available (in streaming compilation). After baseline compilation
finished, we already check if we need to tier down, and do it then.
Hence we can just skip any tier-down of unfinished modules.

We cannot easily test this in V8 stand-alone, as inspector-test can only
execute one command at a time, so we cannot trigger asynchronous
compilation and then enable the debugger while this is running.

R=thibaudm@chromium.org

Change-Id: I250162a8d3c20599cacebff2f4f540ff6f8b1946
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953298
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75117}
2021-06-14 08:50:16 +00:00
Clemens Backes
50117080af [wasm][cleanup] Fix passing of WireBytesStorage
WireBytesStorage is the class used to access the wire bytes of a
function for compilation. It is stored and passed in a shared_ptr,
because it can be updated while compilation is running, and the
compilation threads will keep the old reference alive until the last
reference is dropped.
This CL fixes a few issues where we unnecessarily passed a reference
to the shared_ptr instead of just a raw pointer, and changes one
copy-assign into a move-assign to avoid an unneeded reference increase
and decrease.

R=thibaudm@chromium.org

Bug: v8:11879
Change-Id: I18b626a7b6cde09d5b29f091bd9f49d01d408206
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953196
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75116}
2021-06-14 08:45:46 +00:00
Manos Koukoutos
546929280e [wasm-gc] Add array.init constant expression
Bug: v8:7748
Change-Id: I3fa510b4dc35d3f58532ecbbeecd79d2826ff667
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951722
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75115}
2021-06-14 08:23:06 +00:00
Al Muthanna Athamina
e4921a2ae4 Alpha-sort dependencies
Bug: chromium:1217912
Change-Id: Ic34e56a223ce4068c4ce62e001dd22b49f153d67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959608
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75114}
2021-06-14 08:13:26 +00:00
Andreas Haas
fd93f33824 [wasm][liftoff] Cache the memory start register
WebAssembly functions often have subsequent memory accesses, and each of
these memory accesses need the start address of the memory in a register.
With this CL the register with the memory start address is cached, so
only the first memory access has to load the memory start address into a
register, subsequent memory accesses can just reuse the register.

In first measurements with the epic benchmark this reduces the size of
the generated Liftoff code by a bit more than 5%.

R=clemensb@chromium.org

Bug: v8:11862
Change-Id: Ic33e7e3c00a4209570821269c728187affbeadcf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947403
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75113}
2021-06-14 07:49:16 +00:00
Al Muthanna Athamina
64828e21b0 Add dependency for logdog
Bug: chromium:1217912
Change-Id: I61f1dd82a5fdcae3d134d05c76c06ee47feffcca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953281
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75112}
2021-06-14 07:41:06 +00:00
Georg Neis
65cb085234 Revert "[turbofan] Turn on --turbo-optimize-apply by default"
This reverts commit 26f4585eb6.

Reason for revert: Clusterfuzz issues

Original change's description:
> [turbofan] Turn on --turbo-optimize-apply by default
>
> Bug: v8:9974
> Change-Id: I5853177be27d0d31087e436f0311d5a077cc2124
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951723
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75098}

Bug: v8:9974
Change-Id: I6ead63c2ae8ed2693805c337b68435b3de99d018
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960208
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75111}
2021-06-14 06:26:46 +00:00
Marja Hölttä
8539660060 [web snapshot] Add arrays
Drive-by: Also add deferred function references.

Bug: v8:11525
Change-Id: If546f2e6c5a991372f1b99dac149504941a24b3e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951731
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75110}
2021-06-12 09:20:24 +00:00
Igor Sheludko
775303f4b9 [wasm-gc] Support WasmObject elements loading in runtime
This CL adds WASM_ARRAY_ELEMENTS to distinguish WasmArray maps.

Bug: v8:11804
Change-Id: I243ce24c2f2246efbc223af14361c28506e9a2d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922884
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75109}
2021-06-11 21:47:44 +00:00
Zhi An Ng
14fda80410 Revert "[heap] Introduce ParkedSharedMutexGuardIf and use it in compiler"
This reverts commit 4cd856eee4.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/16843/overview

Original change's description:
> [heap] Introduce ParkedSharedMutexGuardIf and use it in compiler
>
> In some cases it could happen that the concurrent compiler tries to get
> a shared lock on a mutex that is already exclusively held by the main
> thread. The background thread will then block itself until the
> main thread leaves the critical section. If the main thread then also
> starts a GC while holding the lock, this will result in a deadlock.
>
> A GC can't start until the background thread reaches a safepoint and
> the main thread can't leave the critical section before the GC ran.
>
> This CL introduces a new version of SharedMutexGuard named
> RecursiveSharedMutexGuardIfNeeded. This class will park the thread
> when blocking is needed and will unpark the thread again as soon as
> the lock was acquired successfully. This resolves the deadlock on
> safepointing.
>
> Turbofan can then simply use that class internally for
> MapUpdaterGuardIfNeeded.
>
> Bug: v8:10315, chromium:1218318
> Change-Id: Ice04b222cc979e4905791118caede26e71fca6de
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953288
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75107}

Bug: v8:10315
Bug: chromium:1218318
Change-Id: Ied5d8d8f3e4c7e036a5a42a25c43e8ca1ecc1218
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2956698
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75108}
2021-06-11 20:29:05 +00:00
Dominik Inführ
4cd856eee4 [heap] Introduce ParkedSharedMutexGuardIf and use it in compiler
In some cases it could happen that the concurrent compiler tries to get
a shared lock on a mutex that is already exclusively held by the main
thread. The background thread will then block itself until the
main thread leaves the critical section. If the main thread then also
starts a GC while holding the lock, this will result in a deadlock.

A GC can't start until the background thread reaches a safepoint and
the main thread can't leave the critical section before the GC ran.

This CL introduces a new version of SharedMutexGuard named
RecursiveSharedMutexGuardIfNeeded. This class will park the thread
when blocking is needed and will unpark the thread again as soon as
the lock was acquired successfully. This resolves the deadlock on
safepointing.

Turbofan can then simply use that class internally for
MapUpdaterGuardIfNeeded.

Bug: v8:10315, chromium:1218318
Change-Id: Ice04b222cc979e4905791118caede26e71fca6de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953288
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75107}
2021-06-11 18:52:54 +00:00
Michael Achenbach
ce9cc71c4b Revert "[no-wasm] Exclude trap-handler implementation"
This reverts commit 5d84b6cb9a.

Reason for revert: Breaks mac-arm64:
https://ci.chromium.org/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20release/4636
https://chromium-swarm.appspot.com/task?id=5414a227cc3d6b10

Original change's description:
> [no-wasm] Exclude trap-handler implementation
>
> The trap handler is only needed for WebAssembly, hence it can be
> excluded in no-wasm builds (v8_enable_webassembly = false).
> This makes it easier to port WebAssembly to platforms that do not need
> to support WebAssembly.
>
> R=​ahaas@chromium.org, jkummerow@chromium.org
> CC=​johnx@google.com
>
> Bug: v8:11877
> Change-Id: I25c34c2c4f1122227047e13add532ee2b9f73d2f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953285
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75101}

Bug: v8:11877
Change-Id: I7a98341f6c03667c6400dced2bc69746011dd3d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2956868
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75106}
2021-06-11 18:06:14 +00:00
Dominik Inführ
6b32e7d193 [heap] Fix concurrent allocation in shared map space
Two DCHECKS had to updated to allow for concurrent MAP_SPACE
allocations.

Bug: v8:11708
Change-Id: I8a059d2e5942f511802a95ec27cf566414dd740e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951724
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75105}
2021-06-11 18:00:44 +00:00
Junliang Yan
a566732140 PPC:s390: [sparkplug][arm][arm64[ia32] Callee-saved registers for RecordWrite
Port c5d41ae6d2

Original Message:
    Migrate the remaining architectures to the new callee save
    RecordWrite approach.

Bug: v8:11420
Change-Id: I20ddf47690203fe9a0cd76dea3a08658582faf9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953486
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75104}
2021-06-11 16:30:14 +00:00
Dan Elphick
c26965bded [build] Reduce size of inline header cycles
This removes/replaces header includes with the aim of shrinking the
size of the inline header cycle. Specifically before this CL, there was
a single Strongly-Connected Component comprising 60 header files from
src/objects and src/heap.

Now there are two 2 SCCs. The src/heap SCC has 6 files and depends on
the src/objects SCC, which has 50 files. Additionally some previously
implicit dependencies have been added.

Dependencies calculated using:
git grep "#include \"" *.h *.cc | sed 's/:#include "/ /;s/".*$//' | \
awk 'BEGIN {print "digraph deps {" } END {print "}"} {print "\""$1"\" -> \""$2"\""}'

SCCs found using sccmap from graphviz.

Also removes unused Cell::FromValueAddress method.

Change-Id: Ib19d00ccd14e490ee64d57be4d99b1b3686ac32a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951734
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75103}
2021-06-11 15:36:04 +00:00
Daan de Graaf
930fb6463b [wasm-simd][arm64] Fuse add and extadd_pairwise_u.
The two instructions are fused into a single Uadalp instruction,
improving performance of quantized neural network operator
implementations such as XNNPACK.

Bug: v8:11546
Change-Id: Ic11b35d1e7758ee0b4ccfe8f592edc1aa798f6f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2939997
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Daan de Graaf <daagra@google.com>
Cr-Commit-Position: refs/heads/master@{#75102}
2021-06-11 15:33:24 +00:00
Clemens Backes
5d84b6cb9a [no-wasm] Exclude trap-handler implementation
The trap handler is only needed for WebAssembly, hence it can be
excluded in no-wasm builds (v8_enable_webassembly = false).
This makes it easier to port WebAssembly to platforms that do not need
to support WebAssembly.

R=ahaas@chromium.org, jkummerow@chromium.org
CC=johnx@google.com

Bug: v8:11877
Change-Id: I25c34c2c4f1122227047e13add532ee2b9f73d2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953285
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75101}
2021-06-11 14:24:54 +00:00
Thibaud Michaud
0db4391f17 [wasm][eh] Make try block handler optional
A try block may have no handler. Relevant links:
https://github.com/WebAssembly/exception-handling/issues/131
https://github.com/WebAssembly/exception-handling/pull/157

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: Ia429762714dd87ed6b043f95c3496c65aaa8495f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949100
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75100}
2021-06-11 13:16:43 +00:00