Commit Graph

6069 Commits

Author SHA1 Message Date
Michael Achenbach
e7adea5fea [test] Make printing the list of processes Python3 compatible
Bug: v8:13101
Change-Id: I5d144939b420957eab58ead64836b561bd541a00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784601
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81918}
2022-07-25 11:50:06 +00:00
Jakob Kummerow
d180d40d28 [wasm][devtools] Fix reported function body offsets
The DevTools frontend doesn't want the Wasm module's understanding of
function body offsets (i.e. including locals), but the ranges of
offsets where breakpoints can be set (i.e. only where instructions are).
This patch adjusts the reported offsets accordingly.
A consequence is that we have to report full (start,end) pairs for each
function, instead of being able to dedupe end1==start2 etc.

Bug: v8:12917
Change-Id: I0c7d2d96435cdac2c4553647b7bcc8783bc1798b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780526
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81887}
2022-07-22 10:08:32 +00:00
Al Muthanna Athamina
20a97f8ac2 Change linux_chromium_chromeos_msan_rel_ng to blocking on auto roll after msan got sped up
Bug: v8:12755
Change-Id: Ib4f98aa28a7f5d590a81128291ceecaec5edc8a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762569
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81885}
2022-07-22 09:03:31 +00:00
Jakob Kummerow
da712c8af0 [tools][wasm] wami: add --instruction-stats mode
Prints information about frequency and aggregate size of instructions.

Change-Id: Ia745c0e5e26fbc5e24437302ba171bd05600577d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773779
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81875}
2022-07-21 19:34:37 +00:00
Liviu Rau
a49fdc7aed [testrunner] Pass events down to indicators
Bug: v8:12785
Change-Id: Icae27e743824a234d51946747402c2c4e2bb9ec2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779686
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81870}
2022-07-21 13:33:57 +00:00
Seth Brenith
607ad422be Fix v8windbg Locals pane behavior
Background:

In order to show custom content in the "Locals" pane in WinDbg, v8windbg
replaces the getter function for a built-in debug model property named
"Debugger.Models.StackFrame.LocalVariables". This is the property that
the debugger fetches when determining what to display in "Locals". The
new implementation of that getter, V8LocalVariables::GetValue, can
either call the original getter (so that WinDbg displays the usual
content for normal C++ frames) or produce a custom result (for builtins
and JIT-compiled JS frames).

The current problem:

In new builds of WinDbg, users of v8windbg no longer see any content in
the Locals pane for stack frames that correspond to builtins or
JIT-compiled code. This is because of a behavior change in WinDbg:
previously, attempting to get Debugger.Models.StackFrame.LocalVariables
would eagerly attempt to find the symbols for the frame and return an
error code if symbols were not found, but now it returns a lazy object
which does not perform symbol lookup until you iterate its properties.
V8LocalVariables::GetValue currently starts with an early-exit path
based on checking whether the original getter succeeded, so the new lazy
implementation causes us to always take that early exit.

Proposed fix:

Rather than relying on the return value from the original getter, which
is not guaranteed to work consistently, we can base our decisions on the
instruction pointer. If it points outside any module, or if it points to
within a function in the module containing V8 whose name starts with
"Builtins_", then we can build a custom result for the Locals pane.

Change-Id: I6644071d5d83a25b964d9f4018265532528cc85c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3759228
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#81856}
2022-07-20 15:57:01 +00:00
Jakob Kummerow
9b62b3326f [cleanup][wasm] Simplify DecodeLocals and PushControl
Some follow-up after getting rid of `let`.

Change-Id: I073372f4edd0847c4ffa428595a6f74158c87a98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773515
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81844}
2022-07-20 09:01:36 +00:00
Michael Achenbach
d4a8b80bdf [trials] Remove unnecessary flag
No-Try: true
Bug: chromium:1340816
Change-Id: Ic49c5e00a90085b575465bbb463645977ee1d34b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3768987
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81837}
2022-07-20 07:00:37 +00:00
Jakob Kummerow
ff79c40cf2 [wasm][tools] wami: read modules in "hexdump" format
This adds support for reading modules in hex or decimal "array literal"
syntax, e.g. what --full-hexdump produces, or the result of printing
JS arrays using `console.log(JSON.stringify(bytes))` or similar.

Bonus feature: support reading input from stdin, e.g. for piping.

Change-Id: Ic268f266a243f843b6fbf1e3f090e1b06487f5d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3767743
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81829}
2022-07-19 18:49:35 +00:00
Danylo Boiko
7cad31f438 [turbolizer] Sequence view/phase refactoring
Bug: v8:7327
Change-Id: Iddce3c08ebd5969f47d4996fa6bcaa64908226c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764352
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81825}
2022-07-19 17:34:15 +00:00
Danylo Boiko
a1bdea56ca [turbolizer] Schedule view/phase refactoring
Bug: v8:7327
Change-Id: I45085b4b2dcb76948e39e79fcf15711deb531541
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764441
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81824}
2022-07-19 17:31:01 +00:00
Danylo Boiko
eacdf120d9 [turbolizer] Selection broker explicit typing and speed up
Bug: v8:7327
Change-Id: I76317cd206d95584e77b6ece9860a551107154b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760456
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81822}
2022-07-19 17:13:10 +00:00
Danylo Boiko
7e93531493 [turbolizer] Views refactoring
Refactored views:
- code-view
- disassembly-view

Bug: v8:7327
Change-Id: I2020e288ace5b2706546b825620c147686dd310c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757899
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81820}
2022-07-19 16:17:38 +00:00
Danylo Boiko
f7a73d8ba8 [turbolizer] Turboshaft nodes/blocks selection and collapsing
Implemented:
- Remember nodes/blocks selection for Turboshaft layout
- Test version of adapting nodes positions while changing op properties visibility
- Turboshaft blocks collapsing

Refactored:
- text-view.ts
- resizer.ts

Solved previous comments:
- https://chromium-review.googlesource.com/c/v8/v8/+/3706603/comments/62ffc361_7827e282
- https://chromium-review.googlesource.com/c/v8/v8/+/3700078/comments/d29ea456_f3c197d6

Bug: v8:7327
Change-Id: I9e141eb882ab0e22bd079b067e2229f5baa69433
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3752805
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81817}
2022-07-19 15:42:28 +00:00
Danylo Boiko
3118c60cb5 [turbolizer] Turboshaft layout generation
- accelerated nodes selection for the old IR layout;
- implemented turboshaft blocks layout building (blocks coordinates and edges);
- extended interaction with user (selecting/hovering) for such things like: blocks/nodes/edges.

Bug: v8:7327
Change-Id: I0b01679e9dde0bb7d94ba80dd0ee744f334e1968
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747871
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81810}
2022-07-19 13:26:46 +00:00
Jakob Kummerow
d4a4d69cca [tools][wasm] wami: full-module annotated hex dump
This adds a bunch of tracing hooks to the module decoder and uses
them to support "annotated hexdump" output for full modules in wami:

$ out/x64.release/wami my_module.wasm --full-hexdump

Change-Id: I5821d940b5ec236df9708eecd0124172d8893ffd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3754741
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81791}
2022-07-18 19:43:53 +00:00
Liviu Rau
b3477fdd01 [test] Refactor testrunner (4)
- Removed duplication and unnecessary indirection from all suites testcfgs.
 - Introduced a more comprehensive context to cover both command context and other platform specific concerns.
 - Propagated above context to TestLoader to allow for test counting command execution on all platforms.
 - Wrapped original pool with another class to give it a new interface and allow injecting different implementations in the future.
 - Consolidated progress indicators under a single processor in the pipeline.
 - Consolidated result retention requirements calculation outside of pipeline chain.
 - Refactored LoaderProc and got it under tests.
 - Added some more tests for the standard runner.
 - Extracted BuildConfig class.


Bug: v8:12785
Change-Id: I87be040e91f792a983662bb5a10d55b36a14ea7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3701595
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81770}
2022-07-18 09:52:24 +00:00
Michael Achenbach
4acbbdce99 [tools] Clean up predictable wrapper py2 code
No-Try: true
Bug: chromium:1292013
Change-Id: I5e30116230d88f2f38d20451735c5713691f2af2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3521791
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81764}
2022-07-18 07:38:42 +00:00
Camillo Bruni
99208cdab2 [tools] Fix loading old RCS.json files in callstats.html
Change-Id: Ica7e51e8d3e2d41edb0ad98b77e5213fb5f6515a
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763864
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81747}
2022-07-15 09:33:51 +00:00
Samuel Groß
f3737bbb12 [sandbox] Initialize sandbox during V8::Initialize
As sandboxed pointers are now default-enabled when the sandbox is
enabled, it is no longer possible to deactivate the sandbox at runtime.
This CL therefore removes all the logic that was required to support a
sandbox that could be disabled at runtime, moves the initialization of
the sandbox into V8::Initialize, and deprecates V8::InitializeSandbox.

This change also makes the sandbox initialization deterministic if
FLAG_random_seed is supplied.

Bug: v8:10391
Change-Id: Ibd49f7c251b7c58c642f18a551ecc2c391740970
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762583
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81746}
2022-07-15 09:29:32 +00:00
Adam Klein
47207c262e Revert "[shared-struct] Add Atomics.Condition"
This reverts commit e2066ff6bf.

Reason for revert: fails tests on GC stress bot:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/42868/overview

Original change's description:
> [shared-struct] Add Atomics.Condition
>
> Bug: v8:12547
> Change-Id: Id439aef9cab3348171a23378cdd47ede5f4d7288
> Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630350
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81734}

Bug: v8:12547
Change-Id: I237b744e5be8725cbe41ca73076d951018ca80a0
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763784
Auto-Submit: Adam Klein <adamk@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/main@{#81735}
2022-07-15 00:00:19 +00:00
Shu-yu Guo
e2066ff6bf [shared-struct] Add Atomics.Condition
Bug: v8:12547
Change-Id: Id439aef9cab3348171a23378cdd47ede5f4d7288
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630350
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81734}
2022-07-14 22:08:21 +00:00
Andy Wingo
994b64148e [stringrefs] Implement string.as_iter, stringview_iter.next
Bug: v8:12868
Change-Id: Ice7134d0ad5efddb85420543ea785253791d0258
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757885
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81692}
2022-07-13 14:03:24 +00:00
Danylo Boiko
df98f6f4e1 [turboshaft][turbolizer] Changed type of blocks Ids in JSON output
Bug: v8:12783
Change-Id: I718ba43c63d8010f9a512e6bd47ea58fbb4970ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3756142
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81661}
2022-07-12 09:07:59 +00:00
Camillo
45867618b2 [tools] Fully implement linux-perf tools --timeout
Change-Id: I462af434a695a09c9b65b11759e01aace463b414
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755147
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81641}
2022-07-11 15:15:23 +00:00
Jakob Kummerow
65fb973af1 [tools][wasm] wami: per-function annotated hexdump
This adds "annotated hexdump" as a disassembly output format, as a
first step only for individual functions:

$ out/x64.release/wami my_module.wasm --single-hexdump 17

"Annotated hexdump" format is useful for debugging/inspecting module
wire bytes, and for creating array literals for regression tests.

Change-Id: Iabfb4f9c6f68f3328910c1225a23b424e9315d4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3748652
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81616}
2022-07-08 20:13:30 +00:00
Jakob Kummerow
0a8f45e8e2 [tools][wasm] wami: Disassemble to .wat format
Either the whole module or a single function:

$ out/x64.release/wami my_module.wasm --single-wat 42
$ out/x64.release/wami my_module.wasm --full-wat

Change-Id: Ifa1088a78bb6f86427074806b05226c4bf583b9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747677
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81591}
2022-07-07 16:03:13 +00:00
Danylo Boiko
f61d1afec6 [turbolizer] Turboshaft view initial commit
General:
- Graph view refactoring
Turboshaft:
- Blocks representation
- Inline nodes representation
- Minimum required turboshaft toolbox actions
- Layout caching

Bug: v8:7327
Change-Id: I2ac07965ac775c68c522cfc9367b7ce0ff18672a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726287
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81553}
2022-07-06 13:11:46 +00:00
Nikolaos Papaspyrou
e8cea8c876 [tools][gm] Fix aliases for modes with a suffix
Minor bug fix in alias support (crrev.com/c/3723506), which broke
modes with suffixes, e.g. x64.release-css or x64.rel-css

No-Try: True
Change-Id: I16fdc83dde269f66f4bb7260de0d2649aaece27e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732929
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81541}
2022-07-05 17:24:41 +00:00
Jakob Kummerow
c52224fd34 [tools][wasm] wami: fix MSVC build
Change-Id: I3ae32354c592e4a605f1d0c34f4dd3d9cad16795
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745404
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81532}
2022-07-05 14:44:30 +00:00
Jakob Kummerow
25c3b1b05b [tools][wasm] wami: add --section-stats mode
Prints information about sections in a given module and their sizes.

Change-Id: I3bf02f0c8be53756364db4d2dada60bc8a510815
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743447
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81522}
2022-07-05 10:55:11 +00:00
Jakob Kummerow
7f0c7fb074 [tools][wasm] Add "wami", the Wasm Module Inspector
Initial feature: list functions in a module, as follows:

$ gm x64.release wami
$ out/x64.release/wami --list-functions my_module.wasm

More to come.

Change-Id: I9580437d51153e1b5ccc291fdb6a6a67315be07d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742700
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81515}
2022-07-05 04:45:28 +00:00
Benedikt Meurer
7f20cf56e6 [debug] Report optimized out and certain TDZ values as unavailable.
This adds a new --experimental-value-unavailable flag, which is disabled
for now. When enabled the debugger reports values that are optimized out
by TurboFan and values of certain variables in Temporal Dead Zones (TDZ)
as unavailable. Internally we use a special `value_unavailable` accessor
info to represent these values, and on the debugger boundary we report
these properties with `value`, `get`, or `set`.

Doc: https://goo.gle/devtools-value-unavailable
Bug: chromium:1328681
Demo: devtools-dbg-stories.netlify.app/crbug-1328681-value-unavailable
Change-Id: Idb09a4a148335a950deae60f7c07caecc48826ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627510
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81509}
2022-07-04 09:25:44 +00:00
Jakob Kummerow
f76486e60a [wasm][refactor] Move ModuleDecoderImpl to -impl.h
Ctrl+X, Ctrl+V. No change in behavior.
This is a preparational step for templatizing the module decoder
for disassembler purposes.

Bug: v8:12917
Change-Id: I08a5d2e666cd16a207e9862b2691446c0473ddb0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738221
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81489}
2022-07-01 11:43:09 +00:00
Shu-yu Guo
0d6e95b43e [change-array-by-copy] Implement TypedArray.prototype.toSpliced
Bug: v8:12764
Change-Id: I5f915d1c4dad22f1ce12423f6149a85ad32d6725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3733043
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81477}
2022-06-30 21:47:38 +00:00
Maya Lekova
b243d54421 Revert "[foozzie] Silence a frequently occuring correctness bug"
This reverts commit a618a4a341.

Reason for revert: Original CL got reverted, we don't need the suppression anymore.

Original change's description:
> [foozzie] Silence a frequently occuring correctness bug
>
> This CL adds back a patch of Math.pow for correctness fuzzing, which
> drops some precision and hides a difference on the fast path.
>
> The same suppression was previously used on https://crbug.com/693426.
>
> No-Try: true
> Bug: chromium:1339320
> Change-Id: Id52f25f8a2b6b5aeca956587b16a10c61aa68e36
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726295
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Auto-Submit: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81408}

Bug: chromium:1339320
Change-Id: Id4cf04f9480b3052978ee7ca3dd83d7ee16845c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736446
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81470}
2022-06-30 14:44:38 +00:00
Liviu Rau
db0f1dd4a1 Revert "White space to trigger Skia branch rollers"
This reverts commit 49d15209d2.

Reason for revert: Trigger Skia branch roller

Original change's description:
> White space to trigger Skia branch rollers
>
> Bug: skia:10306
> Change-Id: Ibcddc8c724130e315471413c2835687fe0571475
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3718660
> Auto-Submit: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81317}

Bug: skia:10306
Change-Id: I5b6f232dca57c305369fd58e912e46d980769634
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735133
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81469}
2022-06-30 14:24:17 +00:00
Omer Katz
7626202118 [heap] Merge marking states
MinorMC maintained a separate marking state to support interleaved GCs.
Since MinorMC now assumes that interleaving is not possible, MinorMC can
use the same marking state as the full GC.

Bug: v8:12612
Change-Id: Ibeb7df2eb24e448f811b497c9d16b3b132f87ec2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735163
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81468}
2022-06-30 14:16:48 +00:00
Michael Achenbach
562826febb Whitespace change to test focal image
No-Try: true
Bug: chromium:1307180
Change-Id: Id1ed9e3d47d7b3c680e278eea2efd4195110cf37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726303
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: 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/main@{#81410}
2022-06-28 13:04:06 +00:00
Michael Achenbach
a618a4a341 [foozzie] Silence a frequently occuring correctness bug
This CL adds back a patch of Math.pow for correctness fuzzing, which
drops some precision and hides a difference on the fast path.

The same suppression was previously used on https://crbug.com/693426.

No-Try: true
Bug: chromium:1339320
Change-Id: Id52f25f8a2b6b5aeca956587b16a10c61aa68e36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726295
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81408}
2022-06-28 07:12:02 +00:00
Samuel Groß
8ca93205cc [sandbox] Turn ExternalPointerTag into a template parameter
The ExternalPointerTags are assumed to be compile-time constants in most
cases, so turning them into template parameters enforces that. As
decisions such as whether to use the per-isolate or the shared external
pointer table are encoded into the tag values, forcing those to be
compile-time constants guarantees that the compiler will be able to
inline the correct logic when accessing an external pointer.

With this, there are now two (high-level) ways of accessing external pointer fields from C++: the Read/WriteExternalPointerField methods
which require the ExternalPointerTag to be a template parameter, and the
ExternalPointerSlot class which takes the tag as an argument. The latter
is for example used for snapshot deserialization and by the garbage
collector (more generally, by the ObjectVisitor::VisitExternalPointer
method), where the tag is not a compile-time constant.

Finally, this CL also introduces a new ExternalPointerHandle type which
represents the (opaque) on-heap representation of a reference to an
entry in an ExternalPointerTable when sandboxing is enabled. Making this
its own type makes the code a bit more readable.

Bug: v8:10391
Change-Id: I867b8ce41d15d485f1dc66786f233c710c56afcb
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3720641
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81402}
2022-06-27 13:45:20 +00:00
Michael Achenbach
4b6569159c [fuzzing] Lower probability of some potentially contradictory flags.
The following flag combinations run into a CHECK in d8:
('--assert-types', '--stress-concurrent-inlining')
('--assert-types', '--stress-concurrent-inlining-attach-code')

All flags can be passed as clusterfuzz trials on d8 fuzzers and lead
to poor fuzzing outcomes. This lowers their probability as a
mitigation until a better solution is found.

No-Try: true
Bug: chromium:1336577
Change-Id: I63747bb0a466c01d2789fc76cb9232f7afe720f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3721382
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81387}
2022-06-27 11:13:20 +00:00
Danylo Boiko
8e49ce29cd [turbolizer] Selection refactoring
- Moved graph-phase.ts to graph-phase folder
- Refactored selection.ts, selection-broker.ts, selection-handler.ts, source-resolver.ts

Bug: v8:7327
Change-Id: I922c8730f89c53a73a55414378ac1e29a6397a80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3714945
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81385}
2022-06-27 10:23:39 +00:00
Camillo
82b8adb0f3 [tools][gm] Support aliases for modes
Now you can use 3-letter alias for all modes: rel, opt, dbg
Example: gm.py x64.opt.d8

No-Try: True
Change-Id: I825ebbf4cc1c509599f4fd2ac5aa0ac6fab998c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3723506
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81382}
2022-06-27 09:07:39 +00:00
Shu-yu Guo
3c4c25dbd4 [change-array-by-copy] Implement Array.prototype.toSpliced
Drive-by: add unscopable test for Array.prototype.toReversed.

Bug: v8:12764
Change-Id: I9d7dd8d4eae6d23811382b6795c2c6ff7f76be72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3717552
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81364}
2022-06-24 22:05:39 +00:00
Camillo Bruni
00b30232ae [tools] Improve system-analyzer profiler panel
Bug: v8:10644
Change-Id: Ie14c5055a4d24d064def7435fee2cde480844e8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3717985
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81352}
2022-06-24 12:22:49 +00:00
Jakob Kummerow
5b12e62b64 [tools] grokdump: Fix objdump detection for Python3
Follow-up to 032dfb827a.

No-Try: true
Change-Id: Ia12343a7ce9e1b865da4fbf562bdd9169892932c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3721816
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81332}
2022-06-23 14:28:54 +00:00
Thibaud Michaud
e35039e773 [wasm][stack-switching] Support rejected promises
If the returned promise rejects, we switch to the suspender's stack and
throw the value.
Re-purpose the WasmOnFulfilled data to also represent the rejecting
case and rename it to WasmResumeData.

R=ahaas@chromium.org
CC=fgm@chromium.org

Bug: v8:12191
Change-Id: I91a301c3c6d9d243efbfabe7263555e11f0d9277
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3706606
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81325}
2022-06-23 11:56:30 +00:00
Liviu Rau
49d15209d2 White space to trigger Skia branch rollers
Bug: skia:10306
Change-Id: Ibcddc8c724130e315471413c2835687fe0571475
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3718660
Auto-Submit: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81317}
2022-06-22 20:57:48 +00:00
Danylo Boiko
f423e485de [turbolizer] Graph layout caching
- "Remember graph layout" button
- Graph layout caching (almost 10x speed up)
- Camera position and zoom saving
- Refactored graph.ts, graph-layout.ts and graphmultiview.ts

Bug: v8:7327
Change-Id: I6a9db1ddbbaf506bff0b9d1c1e015f245c7c3974
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3714248
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81309}
2022-06-22 17:18:30 +00:00
Igor Sheludko
f914df6574 [builtins-pgo] Minor fixes in the profile reader
This CL also makes the PGO-related scripts executable.

Bug: v8:10470
Change-Id: Iedf81464ff591e641aae4f1f0aa37312875f2637
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3716482
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81305}
2022-06-22 14:30:28 +00:00
Frank Tang
ba6db33e06 Fix unreachable code under --harmony-intl-number-format-v3
ICU 71 added new enum value UNUM_APPROXIMATELY_SIGN_FIELD
need to map to "approximatelySign"

We also discover a spec bug in
https://github.com/tc39/proposal-intl-numberformat-v3/issues/99

All the parts of formatRangeToParts should have a source "shared" for
the case that start and end are the same or very close.

Bug: chromium:1336865
Change-Id: I89142479989d3d2017d8cb89194db737710c38ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3717278
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81286}
2022-06-22 02:57:57 +00:00
Luis Fernando Pardo Sixtos
afb26623df [shared-struct] Shared Array Initial prototype
Initial implementation for concurrent shared arrays. Current implementation exposes a `SharedArray` constructor, but its syntax might
change in the future.

Shared arrays can be shared across Isolates, have a fixed size, have no
prototype, have no constructor, and can only store primitives, shared structs and other shared arrays. With this CL shared structs are also allowed to store shared arrays.

The Backing storage for the SharedArrays is a `FixedArrayBase`. This CL introdces a new ElementKind: `SHARED_ARRAY_ELEMENTS`. The new kind should match the overall functionality of the `PACKED_SEALED_ELEMENTS` kind, but having it as standalone kind allows for easier branching in CSA and turbofan code.

Bug: v8:12547
Change-Id: I054a04624d4cf1f37bc26ae4b92b6fe33408538a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585353
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Luis Fernando Pardo Sixtos <lpardosixtos@microsoft.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81285}
2022-06-22 02:24:46 +00:00
Danylo Boiko
c0b1bf4c58 [turbolizer] Parsing Turboshaft JSON output
- Added parsing Turboshaft JSON output
- Refactored node.ts, edge.ts, node-label.ts, turbo-visualizer.ts, tabs.ts

P.S.: graph-phase.ts will be moved to graph-phase folder in the next CL

Bug: v8:7327
Change-Id: Ida854307392a2d513c36f86869ea00cadcf3667c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3706603
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81264}
2022-06-21 09:01:11 +00:00
Igor Sheludko
8487e66d75 [runtime] Inline Foreign fields into AccessorInfo
... to avoid additional indirection on every access.

Drive-by: given that AccessorInfo class now has a custom body visitor
it's no longer necessary to encode flags field as Smi.

Bug: v8:12949
Change-Id: I30eabee3cbc5ded2bf3f050dfe22208713a764bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3701590
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81237}
2022-06-20 09:25:03 +00:00
Michael Achenbach
9c5108c83e [foozzie] Disable --multi-mapped-mock-allocator for correctness fuzzing
No-Try: true
Bug: chromium:1337522
Change-Id: I086cec1209d6646441f128d9de9493987fc49490
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3711754
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81236}
2022-06-20 08:40:37 +00:00
Camillo
084bd8da21 [runtime] Use range check for Names that can update protectors
Instead of doing multiple separate checks with branches, turn the
name check into a single range check.

This means that the symbols and strings for properties than can
invalidate protectors need to be allocated consecutively in memory.

Change-Id: Id3a2003534bab5ecf83393a60167f779d636fc4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695360
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81185}
2022-06-15 14:41:52 +00:00
Dominik Inführ
5b73adc2fe [tools] Enable --no-use-map-space again on fuzzers
--no-use-map-space should now be fixed, it is already enabled with
--future.

Bug: v8:12578, chromium:1317880
Change-Id: I9ea10dfaebf7b17cb1c953e272bc3358932a10b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702232
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81173}
2022-06-15 09:20:22 +00:00
Danylo Boiko
9f7c28b805 [turbolizer] Move methods from source resolver to corresponding phases
- source resolver clean up
- started inregration of turboshaft schedule phase

Bug: v8:7327
Change-Id: I4335c275f4cfb2e313ac383a5b9fa12c7b9aa744
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3700078
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81164}
2022-06-14 20:36:51 +00:00
Tobias Tebbi
18f388a6e9 [tools] check format of target branch in roll_merge_gerrit.py
This prevents accidental use for release branch merging, which
works but shouldn't.

Change-Id: I4db99bb721c935a8a1c7c44c1b4d909f44a8bf9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3705382
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81157}
2022-06-14 15:02:16 +00:00
Leszek Swirski
2eea0da9f1 [tools] Make roll_merge_gerrit also tag the commit
roll_merge_gerrit.py now loops, waiting for the merge to be submitted.
Once it is, it adds a tag with the version number.

Bug: v8:12849
Change-Id: I7c2765877efad2ccbe082b984642f5e989dc3c8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3705379
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81150}
2022-06-14 13:57:38 +00:00
Liviu Rau
9733dacc5c [test] Refactor testrunner (3)
- removed some 'feature envy' instances:
  - created a AugmentedOptions class to take care of non trivial option look-ups
  - moved some calculation closer the the actual data
- promoted parameter that was passed around a lot (options) to filed in the offending class
- similar object creation looks a bit more similar
- CommandContext provides a wrapper that ensures resource de-allocation
- separate tests from standard and num_fuzz runners
- added a couple of more tests to improve coverage

This is still in flux. But further changes risk creating a disconnect between the original implementation and further refactorings.

Bug: v8:12785
Change-Id: I0ec2e9c6a81604a5cd1d4a80982dd3329c1b48db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3686411
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81148}
2022-06-14 12:49:47 +00:00
jiepan
97953dd6e2 [turbolizer] Fix CSS file path in deploy script
In previous refactoring, the CSS files are moved to subdirectory css

Change-Id: I38e05ae1a9e56f36d5bd25131e605a93cfdb61f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3701958
Commit-Queue: Jie Pan <jie.pan@intel.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81120}
2022-06-14 01:48:23 +00:00
Igor Sheludko
7445a4fd2a [runtime] Inline Foreign fields into CallHandlerInfo
... to avoid additional indirection on every access.

Bug: v8:12949
Change-Id: I16840ac0517e86f1f70252153112ca3475527416
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3693707
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81083}
2022-06-10 18:26:57 +00:00
Danylo Boiko
659d106af0 [turbolizer] Phases layer initial commit
- Added separate layer for phases
- Moved json parsing logic to new layer

Change-Id: I16289b1f4f62d011c1801fbc37bac49ff911e61e
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695566
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81081}
2022-06-10 17:06:07 +00:00
Tobias Tebbi
77ba98ef32 [turboshaft] add support for all JS machine-level operators
In particular, this CL adds support for:
- exception handling
- source positions
- OSR
- various numeric operations and conversions

Since the test suite now passes with `--turboshaft`, this also adds a
new variant for Turboshaft and enables it on some bots.

Bug: v8:12783
Change-Id: Ia2dd2e16f56fc955d49e51f86d050218e70cb575
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669251
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81074}
2022-06-10 15:17:20 +00:00
Leszek Swirski
b621958cf2 [tools] Add a roll_merge using the Gerrit API
roll_merge.py manually checks out V8 into a temporary directory, locally
builds a cherrypick, and uploads this to Gerrit. However, Gerrit has its
own REST API which allows cherrypicking. Using this API directly has two
advantages:

  1) We don't need to perform any local checkouts, so it's much faster,
     and
  2) The cherry-picked commit is marked as a cherry-pick by Gerrit,
     which means Rubber-Stamper-Bot will treat it as a cherry-pick.

The implementation for now is very simple, and doesn't support things
like cherry-picking multiple revisions or applying an additional local
patch. It does, however, increment the patch value in v8-version.h, and
tries to set Owners-Override +1.

Bug: v8:12849
Change-Id: Ie242dbec6b3d24f5118d601e9d326465d190a8f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644609
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81072}
2022-06-10 14:38:28 +00:00
Danylo Boiko
c5f878482e [turbolizer] Initial TS code refactoring
- basic file movement
- dependencies update
- grammar fix
- refactoring common files (from new folder 'common')

Change-Id: Ie47d565202aefe247ef6fd9e64108926e467d533
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695385
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81050}
2022-06-09 18:03:03 +00:00
Thibaud Michaud
a28947f7bb [wasm][eh] Wasm exceptions are not JS errors
Context: https://github.com/WebAssembly/exception-handling/pull/197

This change removes the wasm exception -> JS Error inheritance.

R=jkummerow@chromium.org

Bug: v8:8091
Change-Id: I479f16fe03d4d77d2ecd8409e96f9a3c063912b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688401
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80997}
2022-06-08 12:56:36 +00:00
Liviu Rau
b5a7ca848c [test] Refactor testrunner (2)
- moved test data closer to tests
- removed the coverage related code
- refactored to remove boilerplate from test code

Bug: v8:12785
Change-Id: I1013d29d8ff2c3ecb786c294ae3b3ab6decdca20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683610
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80921}
2022-06-02 16:49:28 +00:00
Clemens Backes
045a2b88ed [tools] Flush stdout before reading input
The last line of output (which is not terminated by a newline) was not
showing for me when running the merge script. We can either fix it by
specifying `flush=True` at the `print` statement, or flushing before
reading user input. The latter seems more future-proof.

R=machenbach@chromium.org

Change-Id: I61cb929d2f7cdd20b3e32b9beb1653fe2d5c5791
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676857
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80890}
2022-06-01 11:26:38 +00:00
Liviu Rau
0281df0421 [test] Refactor testrunner (1)
Bringing test closer together

Bug: v8:12785
Change-Id: I2eed79fd3b1bda210b1f58b341422fc0c6435bfd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3678210
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80887}
2022-06-01 10:37:21 +00:00
Camillo Bruni
b29ed5a59a [tools] run-tests.py
List all variants for the --variant help text

Change-Id: I249d8140b19e13dc3eceedaade2b856b1fdb1567
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663088
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80884}
2022-06-01 09:17:58 +00:00
Liviu Rau
7aca2b8fd2 [test] Cleanup
Unused imports and some deprecation related updates.

Bug: v8:12785
Change-Id: Ia3998a75f0c3b83eef4134741c1bda5f3d49c6f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3678840
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80883}
2022-06-01 09:09:18 +00:00
Shu-yu Guo
7ff1857560 Reland "[shared-struct] Add Atomics.Mutex"
This is a reland of commit ea9a1f1cbe

Changes since revert:
- Make the state field uintptr-aligned since arm64 faults on
  atomic accesses to non-naturally aligned addresses.

Original change's description:
> [shared-struct] Add Atomics.Mutex
>
> This CL adds a moving GC-safe, JS-exposed mutex behind the
> --harmony-struct flag. It uses a ParkingLot-inspired algorithm and
> each mutex manages its own waiter queue.
>
> For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing
>
> Bug: v8:12547
> Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80789}

Bug: v8:12547
Change-Id: I776cbf6ea860dcc6cb0ac51694a9b584b53d255c
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673354
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80875}
2022-06-01 01:12:07 +00:00
Shu-yu Guo
0f510c4ab1 [change-array-by-copy] Implement with
Bug: v8:12764
Change-Id: I67b9b0e4f3c7ca6a2719c234b7f7605f07f86b28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3671760
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80874}
2022-06-01 00:47:32 +00:00
Joyee Cheung
4bdbccc392 Revert "[heap] pre-populate the single_character_string_cache"
This reverts commit 07e11a64e4.

Reason for revert: caused regressions and heap verification failures

Bug: chromium:1330410, chromium:1330408, chromium:1330413

Original change's description:
> [heap] pre-populate the single_character_string_cache
>
> This simplifies the code and removes the runtime overhead of
> spontaneously adding strings to the cache.
>
> Bug: v8:12718
> Change-Id: I2ed49bd82e3baf2563eeb8f463be72c0308c52c5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616553
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Joyee Cheung <joyee@igalia.com>
> Cr-Commit-Position: refs/heads/main@{#80803}

Bug: v8:12718
Change-Id: I569fea9e34effd57c9e7c65190cf5b4ec0b0623b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3679680
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80870}
2022-05-31 16:41:47 +00:00
Danylo Boiko
3bb3c99d6e [turbolizer] Initial HTML&CSS code refactoring
Change-Id: Ic2c2ccbc68b95d02aed610e96c57ee5739836cc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673299
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80804}
2022-05-30 08:22:26 +00:00
Joyee Cheung
07e11a64e4 [heap] pre-populate the single_character_string_cache
This simplifies the code and removes the runtime overhead of
spontaneously adding strings to the cache.

Bug: v8:12718
Change-Id: I2ed49bd82e3baf2563eeb8f463be72c0308c52c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616553
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80803}
2022-05-30 07:44:10 +00:00
Shu-yu Guo
60e02cfb0c Revert "[shared-struct] Add Atomics.Mutex"
This reverts commit ea9a1f1cbe.

Reason for revert: arm64 pointer alignment issue
https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8812962856609920785/+/u/Check/mutex-workers

Original change's description:
> [shared-struct] Add Atomics.Mutex
>
> This CL adds a moving GC-safe, JS-exposed mutex behind the
> --harmony-struct flag. It uses a ParkingLot-inspired algorithm and
> each mutex manages its own waiter queue.
>
> For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing
>
> Bug: v8:12547
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
> Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80789}

Bug: v8:12547
Change-Id: I226e16b743dc4b157fac33a9cbabab4d72cf290b
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673353
Owners-Override: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80790}
2022-05-28 01:31:54 +00:00
Shu-yu Guo
ea9a1f1cbe [shared-struct] Add Atomics.Mutex
This CL adds a moving GC-safe, JS-exposed mutex behind the
--harmony-struct flag. It uses a ParkingLot-inspired algorithm and
each mutex manages its own waiter queue.

For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing

Bug: v8:12547
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80789}
2022-05-28 01:04:34 +00:00
Shu-yu Guo
a8973c72ba Revert "[snapshot] Rename embedded*.S files to .asm"
This reverts commit 68a7736bdf.

Reason for revert: Broke Bazel and gcc builds
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20bazel%20-%20builder/2237/overview
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20gcc%20-%20builder/2103/overview

Original change's description:
> [snapshot] Rename embedded*.S files to .asm
>
> We want to use llvm-ml to assemble files on Windows, but it only
> recognizes .asm files as input files. See
> https://chromium-review.googlesource.com/c/v8/v8/+/3668287.
>
> Change-Id: I34ff6d2693a34653c8e22a7c2d093853505cd455
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672420
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80782}

Change-Id: I92f4435aca26da16555734b95b9aabe3271af15c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673428
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80784}
2022-05-27 17:47:54 +00:00
Manos Koukoutos
68a7736bdf [snapshot] Rename embedded*.S files to .asm
We want to use llvm-ml to assemble files on Windows, but it only
recognizes .asm files as input files. See
https://chromium-review.googlesource.com/c/v8/v8/+/3668287.

Change-Id: I34ff6d2693a34653c8e22a7c2d093853505cd455
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672420
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80782}
2022-05-27 14:08:25 +00:00
Maya Lekova
5480e036d2 [megadom] Add TF inlining for Megadom
The generated code checks if the receiver is a JS_API_OBJECT and if the
receiver requires an access check, and if not it lowers the call to an
API call.

We also add compilation dependencies on the protector cell to deopt if
our invariants change. (Note - the actual invalidation of these cells
will be implemented in a follow up CL)

Bug: v8:11321
Change-Id: I15722f1e5fac7176e292da4a35186e4609636aba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2719563
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80748}
2022-05-25 14:07:01 +00:00
Shu-yu Guo
116e6a528d [change-array-by-copy] Implement toReversed
Bug: v8:12764
Change-Id: I7e76647be838749b723400914b144b9ec2a27cd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3656520
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80703}
2022-05-24 00:57:21 +00:00
Stephen Roettger
4d6ddf1b5f Remove deprecated AccessorSignatures
Bug: chromium:1310790
Change-Id: I739161f47fc1fc32d832f106d5ef6b7df4aed213
Fixed: chromium:1310790
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3654096
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Stephen Röttger <sroettger@google.com>
Cr-Commit-Position: refs/heads/main@{#80639}
2022-05-19 14:15:54 +00:00
Seth Brenith
3a558456a9 [v8windbg] Skip undefined types in Torque structs
The test cctest/test-v8windbg recently started failing because the
v8windbg debugger extension is unable to read the "flags" field on a
SharedFunctionInfo instance. This occurs because one of the bitfields
within "flags" has type OSRCodeCacheStateOfSFI, which is only declared
using an "opaque enum declaration":

  enum OSRCodeCacheStateOfSFI : uint8_t;

When WinDbg fails in its attempt to look up that type, v8windbg responds
by failing to construct anything at all for "flags". However, the other
17 bitfields in "flags" can be represented successfully, so a more
useful behavior is to just skip the one failed entry.

Change-Id: I40630548d21499e49f0214da28260318a38d9360
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3653096
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80615}
2022-05-18 15:24:09 +00:00
Almothana Athamneh
c3107f0692 Revert "Change linux_chromium_chromeos_msan_rel_ng to blocking on auto roll"
This reverts commit e412e6435b.

Reason for revert: builder takes too long on CQ

Original change's description:
> Change linux_chromium_chromeos_msan_rel_ng to blocking on auto roll
>
> Bug: v8:12755
> Change-Id: I7c693c07640fd5952047666063f23b4be77692bd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644954
> Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80590}

Bug: v8:12755
Change-Id: I371c4ebbfc9dc9a0e806653c6c819b0eb29e5228
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644962
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80610}
2022-05-18 09:20:08 +00:00
Leszek Swirski
1ab43384ca [maglev] Make maglev frames optimized frames
Split off a TurbofanFrame from OptimizedFrame, and make MaglevFrame a
subclass of OptimizedFrame. This allows it to be treated as an optimized
frame by code that is looking at deoptimization data.

Bug: v8:7700
Change-Id: Ia38e0f1c2cd73f054f63be81dff187d9197c1202
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644798
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80592}
2022-05-17 13:43:22 +00:00
Al Muthanna Athamina
d98ae36734 Add git_execute to mergeinfo from the deleted search_related_commits script
Bug: chromium:1306416
Change-Id: Idebb83998a0d2e9e4034bc5d138d9f52a1215dc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644955
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80591}
2022-05-17 13:42:19 +00:00
Al Muthanna Athamina
e412e6435b Change linux_chromium_chromeos_msan_rel_ng to blocking on auto roll
Bug: v8:12755
Change-Id: I7c693c07640fd5952047666063f23b4be77692bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644954
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80590}
2022-05-17 13:11:57 +00:00
Michael Achenbach
3212b90600 [numfuzz] Gracefully ignore contradictory flags
NumFuzz passes various flags to V8 testing randomly, which can lead to
various flag contradictions with existing flags. Up to now the system
ignored the check for contradictions and kept running the test cases,
leading to false positives.

This change adds a new v8 flag --exit-on-contradictory-flags that
exists gracefully when a contradiction is detected. On the numfuzz
side we now filter simple contradictions beforehand.

Measurements showed that ~2% of all numfuzz tests ran into
contradictions. Around half of them are simple contradictions
(repetitions and inversions), which are now filtered beforehand.
The remaining ones (redundant or contradictory implications) are
now ignored.

Bug: v8:11826
Change-Id: I9942e203ba9668a097fabe1343dd1365c9da94c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650746
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80589}
2022-05-17 13:09:07 +00:00
Clemens Backes
dd74a0232c Replace STATIC_ASSERT with static_assert
Now that we require C++17 support, we can just use the standard
static_assert without message, instead of our STATIC_ASSERT macro.

R=leszeks@chromium.org

Bug: v8:12425
Change-Id: I1d4e39c310b533bcd3a4af33d027827e6c083afe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647353
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80524}
2022-05-13 13:46:27 +00:00
Leszek Swirski
a9f802859b [maglev] Add marker for maglev frames
Doesn't do much at the moment beyond not being a baseline frame. Fixes a
DCHECK in tiering that checks the frame type, by removing the frame
lookup there (which wasn't necessary anymore).

Bug: v8:7700
Change-Id: Icecfe27771923d380a7d1dc1c29aa9c5c9dfbf0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644618
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80512}
2022-05-13 08:49:05 +00:00
Jakob Kummerow
a5906c241e Revert "[tools] Add a simple gdb frame unwinder"
This reverts commit c3ac338bb9.

Reason for revert: Breaks stepping with `n`

Original change's description:
> [tools] Add a simple gdb frame unwinder
>
> Add a simple unwinder for gdb which, on x64,  walks frame pointers
> whenever there is no source information available. Ideally we would only
> do this for V8 PCs but this appears hard to do in an Unwinder without
> messing with gdb's internal assumptions.
>
> Change-Id: Iba1e62a3768340ee912e81d691237c1920a8ae91
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3608628
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80204}

Change-Id: I0264cf34cfe8fe2331bacf202dedbb4706535936
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644855
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80493}
2022-05-12 14:48:42 +00:00
Camillo Bruni
6b4a541cfd [tools][system-analyzer] Fix timeline scaling
- Make sure the viewport size of the svg is adjusted properly when
  scaling
- Fix an off-by-one when calculating Chunk groups

Bug: v8:10644
Change-Id: I56e857a8aa1a67e408bcfb08ed126e6bfdb0ce1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641177
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80473}
2022-05-11 14:40:42 +00:00
Michael Achenbach
40d2fab61c [foozzie] Disallow flags with too many known failures
This filters the flags --maglev and --no-use-map-space when passed to
foozzie. Most open bugs are known or spurious, but all take up the
limited hashes for correctness bugs, which prevents finding other
bugs. Filtering on the source-side will make those reports appear
as fixed.

Bug: chromium:1324097, chromium:1317880
Change-Id: Ibf1b04bdfdd2395c3bda5787b4843c6bb5ca8f8e
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641171
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80468}
2022-05-11 12:22:22 +00:00
Camillo Bruni
d3ccf6bc89 [tools] Use python3 by default for gm.py
Change-Id: I16a090fc9af5447c5d36e7bbd4bece1537724678
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637792
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80451}
2022-05-10 13:32:25 +00:00
Michael Achenbach
7e9715d8a9 Revert "[maglev] Turn on fuzzing for --maglev"
This reverts commit b8b7a3a2f9.

Reason for revert:
https://crbug.com/1324097
https://crbug.com/v8/12859

Let's maybe only reland the clusterfuzz_trials part until the rest
is sorted out.

Original change's description:
> [maglev] Turn on fuzzing for --maglev
>
> Turn on fuzzing for Maglev to get additional test coverage.
>
> Bug: v8:7700
> Change-Id: I5b72d851639e31dff1bd91361cd81ad448c2d69e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629334
> Auto-Submit: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80416}

Bug: v8:7700, chromium:1324097, v8:12859
Change-Id: I926319988c3b9a2bc6dd083c69691a6536838782
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634963
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/main@{#80440}
2022-05-10 08:01:14 +00:00
Camillo Bruni
46ca99766c [tools] Fix run_perf.py --filter=<regexp>
In the previous refactoring --filter was accidentally filtering out
paths that matched <regexp>. This CL restores the original behavior
where only the matching paths are kept.

Bug: v8:12821, v8:11113
Change-Id: I7e7d7b793107fbf9b4944b1674874150803f4bb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3623539
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80426}
2022-05-09 13:34:50 +00:00
Jakob Linke
b8b7a3a2f9 [maglev] Turn on fuzzing for --maglev
Turn on fuzzing for Maglev to get additional test coverage.

Bug: v8:7700
Change-Id: I5b72d851639e31dff1bd91361cd81ad448c2d69e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629334
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80416}
2022-05-09 09:22:14 +00:00
Patrick Thier
8f1a5c8e29 [cleanup] Remove unused code introduced for concurrent string migrations
With the introduction of the StringForwardingTable, there are no
concurrent transitions of strings happening anymore.

- Remove String migration sentinel maps + helper methods
- Remove CanMigrateInParallel()
- Remove MigrateStringMapUnderLockIfNeeded() and simplify MakeThin()

There is still unused code I didn't remove in this CL, as we might need
it later for shared struct features: YIELD_PROCESSOR for spinlocks and
Relaxed_Memcmp().

Bug: v8:12007
Change-Id: Iaa09ef93d2ee612e42cd73395a06eada22fe7dae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629545
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80414}
2022-05-09 08:17:54 +00:00
Shu-yu Guo
075778cbfc Remove --harmony-relative-indexing-methods
Relative indexing methods have shipped since M92.

Bug: v8:10961
Change-Id: I4346a3bed443c9cc48924e5ef23ec012eeeecab1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3622134
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80345}
2022-05-03 18:48:20 +00:00
Leszek Swirski
39d0c5e761 Update V8 DEPS.
Also manually reformat some files with the clang-format change.

Rolling v8/build: e10cf1a..c8ec41b

Rolling v8/buildtools: c2e4795..113378f

Rolling v8/buildtools/linux64: git_revision:7c8e511229f0fc06f6250367d51156bb6f578258..git_revision:48b013c9d9debc0f5fc1dd71a257b3c38c5acb43

Rolling v8/buildtools/third_party/libc++abi/trunk: 518fd76..c7888dd

Rolling v8/buildtools/third_party/libunwind/trunk: 705543f..d8a4746

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/88422dc..9ba02ee

Rolling v8/third_party/depot_tools: dc8ca44..fccf35c

Rolling v8/third_party/zlib: 32e65ef..961141d

Rolling v8/tools/clang: 3c4a622..75625c6

Rolling v8/tools/luci-go: git_revision:6da0608e4fa8a3c6d1fa4f855485c0038b05bf72..git_revision:2aa3d7e5e8662c5193059a490f07b7d91331933e

Rolling v8/tools/luci-go: git_revision:6da0608e4fa8a3c6d1fa4f855485c0038b05bf72..git_revision:2aa3d7e5e8662c5193059a490f07b7d91331933e

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

Change-Id: I00a09d42cf91f226c661e97915d5a95fff84b079
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3615245
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80343}
2022-05-03 14:23:57 +00:00
Camillo Bruni
e3e8ea5d65 [flags] Rename --opt to --turbofan
To be consistent with the all the other tiers and avoid confusion, we
rename --opt to ---turbofan, and --always-opt to --always-turbofan.

Change-Id: Ie23dc8282b3fb4cf2fbf73b6c3d5264de5d09718
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610431
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80336}
2022-05-03 12:10:30 +00:00
Al Muthanna Athamina
6fecf48a60 Remove stress-concurrent-inlining flag from fuzzer because it is causing too many failures
Bug: v8:12842
Change-Id: Ice4ef2f1e62773238a0d9b08b6af36e9bed48ddd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3622919
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80330}
2022-05-03 10:36:27 +00:00
Rob Paveza
5e1f856d18 Add support for source hashing in stack traces.
This change adds support for computing SHA-256 hashes in the stack
output of errors by adding a function to the prototype of the
`CallSite` object, passed to `Error.prepareStackTrace`. Additionally,
it updates the `hash` property from `Debugger.scriptParsed` and
`Debugger.scriptFailedToParse` to be SHA-256 instead of the
proprietary hash it is today.

It is intended to be an advancement in indexing source maps to
support improved tooling, especially for post-hoc or in-production
diagnostics scenarios.

The explainer can be found here:
https://docs.google.com/document/d/13hNeeLC2Ve_FVieNndZUUUP15x2O4ltvjnGWwOsMlrU/edit?usp=sharing

Change-Id: Ifbbed4b22c8256e74e6d79974d2dd1e444143eda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3229957
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Robert Paveza <Rob.Paveza@microsoft.com>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80320}
2022-05-03 00:57:46 +00:00
Camillo Bruni
a42a2f4183 [tools] Add variants support for run_perf.py
We usually run benchmarks in multiple variants: default, future, noopt
This is currently only achieved by copying the run-perf json file and
changing the flags at the top-level (or copy whole subsections).

Using "variants" we can duplicate the tests at the current level with
different values and easily create benchmarks that differ only in v8
flags.

Drive-by-fix:
- Add Node.__iter__ and log the whole config graph in debug mode
- Add GraphConfig.__str__ method for better debugging
- Rename TraceConfig to LeafTraceConfig
- Rename RunnableTraceConfig to RunnableLeafTraceConfig
- Make --filter accept a regexp to better filter out variants

Bug: v8:12821, v8:11113
Change-Id: I56a2ba2dd24da15c7757406e9961746219cd8061
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596128
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80307}
2022-05-02 14:28:15 +00:00
George Wort
0e127bcef7 Make profile-guided optimization of builtins more configurable
Introduce get_hints.py and combine_hints.py in order to make
the interpretation of basic block counts into hints more
configurable and explicit, as well as allowing more accurate
and consistent methods of combining multiple profiles.

get_hints.py allows for the minimum count and threshold ratio
values to be easily altered for different profiles, while
combine_hints.py allows the hints produced from different
benchmarks and threshold values to be easily and sensibly
combined.

Simply summing together basic block counts from different
benchmarks could previously lead to a longer running benchmark
overshadowing multiple shorter benchmarks with conflicting
hints.

Allowing alteration of the current threshold values gives a
doubling of performance, while the new method of combining
distinct profiles can double the performance improvement of the
secondary benchmark while losing as little as 4% of the
improvement gained in the primary benchmark.

Design doc: https://docs.google.com/document/d/1OhwZnIZom47IX0lyceyt-S9i8AApDB0UqJdvQD6NuKQ/edit?usp=sharing

Bug: v8:10470
Change-Id: I1c09d1eabfdda5ed6794592e2c13ff8b461be361
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545181
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: George Wort <george.wort@arm.com>
Cr-Commit-Position: refs/heads/main@{#80282}
2022-04-29 15:21:31 +00:00
Andreas Haas
ee866433ad [wasm] Remove SIMD proposal tests
The SIMD proposal has been merged into the main spec, it is not
necessary anymore to execute the SIMD proposal tests additionally.

R=gdeepti@chromium.org

Change-Id: I1c5847a1bfba2d0c956cf353816fd71417506a1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3609848
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80241}
2022-04-28 05:22:59 +00:00
George Wort
d67a14b2fc [turbolizer] Display live ranges in portrait mode
Allow live ranges to be displayed beside the
instruction sequence in turbolizer.

Bug: v8:7327
Change-Id: Idec5130655ccc9365dd32ec6927d8615a3e5c570
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585960
Commit-Queue: George Wort <george.wort@arm.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80226}
2022-04-27 15:08:19 +00:00
Leszek Swirski
c3ac338bb9 [tools] Add a simple gdb frame unwinder
Add a simple unwinder for gdb which, on x64,  walks frame pointers
whenever there is no source information available. Ideally we would only
do this for V8 PCs but this appears hard to do in an Unwinder without
messing with gdb's internal assumptions.

Change-Id: Iba1e62a3768340ee912e81d691237c1920a8ae91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3608628
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80204}
2022-04-27 08:51:23 +00:00
Camillo Bruni
7a90c32032 [tools][system-analyzer] Add profiler-panel
Add basic profiler support
- Moved profiling-related helpers to profiling.mjs
- Added bottom-up profiler table
- Added mini-timeline overview wit opt/deopt events and usage graph
- Added flame-graph, pivoted on the currently selected function

Drive-by-fixes:
- Added/updated jsdoc type information
- Fixed static symbols (builtins, bytecodehandlers) that were both
  added by the CppEntriesProvider and from code-events in the v8.log
- Support platform-specific (linux/macos) dynamic symbol loader by
  adding a query path ('/v8/info/platform') to lws-middleware.js
- added css var --selection-color

Bug: v8:10644
Change-Id: I6412bec63eac13140d6d425e7d9cc33316824c73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585453
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80192}
2022-04-26 17:57:03 +00:00
Shu-yu Guo
ef82f4ddea [ShadowRealm] Look for importValue("path/to/file" patterns for test sync
ShadowRealm.prototype.importValue dynamically imports other files, so
the testing infrastructure need to look for these calls to gather files
to push to e.g. test devices.

The reason to do this over explicit Resources: comment lines is to also
cover test262.

Bug: v8:12829
Cq-Include-Trybots: luci.v8.try:v8_android_arm64_n5x_rel_ng
Change-Id: I6a06933d5da849157b2c7d5fa6b7b98d39f7d39f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3606391
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80189}
2022-04-26 15:47:24 +00:00
Camillo Bruni
69e7f23062 [tools][system-analyzer] Fix timeline zooming
Bug: v8:10644
Change-Id: Iff48e762fd895df63d599cf4663f8b6f44373a00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605241
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80160}
2022-04-25 17:37:52 +00:00
legendecas
d8bc4702d3 [builtins] Use builtin context for SourceTextModule closures
Invoking a JSBoundFunction is slightly slower than a normal
JSFunction (since we don't have to first jump to the
target_function).

The closure steps in SourceTextModule ExecuteAsyncModule is
controlled by the engine so it is better to create dedicated
context slots for the captured values.

Change-Id: I8163fc4b302d6d22906e578164470c9e28e768e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3584601
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#80155}
2022-04-25 15:30:52 +00:00
Camillo Bruni
19a991d578 [tools] Fix linux-perf-chrome.py renderer command path
Drive-by-fix:
- Wait for linux-perf to flush large profile files

No-try: True
Change-Id: I729aa897e3f55fc92a9412208322ee099029453f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605282
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80154}
2022-04-25 14:55:32 +00:00
Pierre Langlois
76b40ef6c0 [gdbinit] Do not enable ASLR if not possible.
The `set disable-randomization off` command may fail on some platforms,
such as the `rr` debugger. We can just ignore the error and carry on.

Change-Id: I9b8dae183a9852178a3d3411172bf3aef173c995
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602519
Auto-Submit: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80143}
2022-04-25 11:43:32 +00:00
Frank Tang
5c3627754e [Temporal] Add Calendar.prototype.fields
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.fields


Bug: v8:11544
Change-Id: I8df987ddbbf08372da637d7c4620c428fce97cae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534619
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80127}
2022-04-22 21:50:26 +00:00
legendecas
9135859a91 [ShadowRealm] Implement ShadowRealm.prototype.importValue
As per https://tc39.es/ecma262/#sec-hostimportmoduledynamically defined,
referencingScriptOrModule in HostImportModuleDynamically can be a Script
Record, a Module Record, or null.
So to https://tc39.es/proposal-shadowrealm/#sec-shadowrealmimportvalue,
the HostImportModuleDynamicallyCallback is been invoked with a `null`
resource_name. This may not be considered a breaking change as the
parameter resource_name is defined as Local<Value>.

Updates d8's DoHostImportModuleDynamically to handle null resource_name,
and resolve the dynamically imported specifier relative to the executing
script's origin. In this way, we have to set ModuleEmbedderData.origin
even if the JavaScript source to be evaluated is Script. Also, a
ModuleEmbedderData is created for each ShadowRealm to separate their
module maps from the initiator context's.

Bug: v8:11989
Change-Id: If70fb140657da4f2dd92eedfcc4515211602aa46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522883
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#80118}
2022-04-22 15:04:26 +00:00
Michael Achenbach
2056305c75 [foozzie] Drop unsuitable flag from correctness fuzzing
Using this flag has led to several duplicate issues. We need to stop
using the flag for a while until the issues are investigated.
Potentially these are all false positives.

No-Try: true
Bug: chromium:1317880
Change-Id: I09f4e1c642befc3a8f5b88c2eb003931dc112826
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602508
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80114}
2022-04-22 13:48:26 +00:00
Camillo Bruni
dd835c01b8 [tools] Move more profiling scripts to tools/profiling
Change-Id: I1ad5d4796168115fe2dc88d073a663c87cab73cb
No-try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596171
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80095}
2022-04-21 20:00:05 +00:00
Camillo Bruni
1920426b13 [tools][gcmole] Add run_gcmole.py --help and drop env vars
- Use explicit options when running gmcole.py from run-gcmole.py
- Use gcmole.py-relative paths to find the default V8 root dir for
  maximum convenience when running locally

Change-Id: Iba0da90b99b0321129f1c4099f437c76dabb1186
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3582386
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80058}
2022-04-20 15:26:35 +00:00
Camillo Bruni
6ca0c65c44 [tools][perf] Fix linux-perf-d8.py with relative path args
We do change CWD in the script which breaks relative input paths
to d8 and .js files for instance.

Drive-by-fix:
- Show clear warning if `perf record` failed

Change-Id: Ib900ca6b53307e13be459beba1e96ddfc8ee9b79
No-try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593784
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80057}
2022-04-20 14:30:04 +00:00
Camillo Bruni
87562a708c [tools] Remove obsolete ignition profiling tools
These tools haven't been used in a while and are unmaintained.
We can use pprof with stack-filtering to achieve similar results.

Change-Id: I84392c066dffc6b0d9efba27a8fdfb31091796bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593786
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80026}
2022-04-19 15:23:27 +00:00
Camillo Bruni
4b0737d29d [log] Rename logging classes
i::Logger          => i::V8Log
i::PerfJitLogger   => i::LinuxPerfJitLogger
i::PerfBasicLogger => i::LinuxPerfBasicLogger

Note: V8Log is currently still managing instances of other loggers,
this functionality will be moved to a separate class in the future.

Bug: v8:12795, chromium:1316443
Change-Id: Id1b44e65abb7819eb6d6c718a1baa9ed61ad51aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593133
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80016}
2022-04-19 12:07:16 +00:00
Dominik Inführ
394812a603 [heap] Turn on fuzzing for --no-use-map-space
Turn on fuzzing for disabled map space to get additional test coverage.

Bug: v8:12578
Change-Id: I82c577c8c24b51df627c873fde95fb239e16d36f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3592892
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80012}
2022-04-19 08:56:07 +00:00
Camillo Bruni
0c6ee45cb9 [tools][system-analyzer] Various fixes
- Fix processing lines that are longer than 1 chunk
- Add and use --code-font-size var
- Make minimum panel width 600px
- Track _lineNumber better Processor for easier debugging

Bug: v8:10644
Change-Id: I656e2ac5f0e9ba25ffa4b8c3ecc4b744144a691d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585568
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79995}
2022-04-14 18:06:40 +00:00
Jakob Kummerow
302e540879 [gm.py] Check for $DISPLAY before showing notifications
This improves the experience over an SSH connection.

No-Try: true
Change-Id: Id6971f2ad2c75c85f91bea71f7215ce7a948ee71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3586987
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79992}
2022-04-14 14:28:00 +00:00
Camillo Bruni
7dd7100502 [tools][perf] Adding linux-perf d8 helper
- Start moving profiler scripts to tools/profiling
- Add linux-perf-d8.py wrapper script that runs `perf record` and
  `perf inject`
- Improve waiting for the d8/chrome process and allow for early
  termination if --timeout is provided
- Allow fractional seconds for --timeout
- Delete run-perf.sh and provide equivalent functionality in
  linux-perf-d8.py

Change-Id: Iac1d6cf895aa7159a9bbb387aca7632df27a0ca3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585951
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79991}
2022-04-14 14:06:01 +00:00
Camillo Bruni
d9268ee88c [tools] Add linux-perf helper scripts for chrome
Change-Id: I3e3a59172a0ffa482a9a3d0c23f616bbf1cf7fb5
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3578858
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79927}
2022-04-11 17:42:49 +00:00
Camillo Bruni
1b8d4e3adb [api] Remove FLAG_log_api
API logging has not been used in a while and we have valid alternatives:
- Runtime call stats
- Profiling
- Timer events

Together they make --log-api superfluous and we can remove it and reduce
the number of branches when calling into the V8 API.

Change-Id: Ie10f70b61ebdb82166270e7630ebcf20a27c4902
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3574549
Reviewed-by: Marja Hölttä <marja@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79904}
2022-04-11 06:24:44 +00:00
Camillo Bruni
6078cb5283 [tools][system-analyzer] Various improvements
- Parse the condensed source position info support for jitted code
- Add progress bar/circle to loader
- Use temporary Array instead of concatenated strings in escapeField to
  reduce gc pressure
- Use bound functions as event handlers in more places
- Various timeline legend fixes:
  - Fix columns alignment when duration is present
  - Use fixed width to avoid breaking the UI
  - Correctly show total/percents for 'All' and 'Selection' entries
  - Improve usability of filtering buttons: added tooltips and fixed
    redrawing on filtering

Bug: v8:10644
Change-Id: I1275b31b7b13a05d9d6283d3067c1032d2d4819c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3574544
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79897}
2022-04-08 19:46:22 +00:00
jameslahm
8306599e9b [d8] Add unicode filename support on windows
This is a follow up CL for https://crrev.com/c/3538284.
Tests credited to https://crrev.com/c/3468352.

- Add unicode filename path test.
- Convert ansi encoded filename argv to utf8 encoded on windows. Because
the ansi encoded filename argv may lose some information for unicode
filename, and we need to use GetCommandLineW to get the actual unicode
filename argument. And we convert it to utf8 encoded to be consistent
with subsequent processing.
- Use REPLACEMENT CHARACTER to replace the characters which cannot be
encoded with sys.stdout.encoding in progress.py.

This CL should be **reverted** if new unicode filenames cause problems.

Bug: v8:12541
Change-Id: Ic5c5ae342b3a5b11c3119452af03c9165d429ed7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568926
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#79850}
2022-04-07 11:40:34 +00:00
Alexander Schulze
74f7a26de3 [presubmit] Use DEPS version of depot tools
Currently, v8_presubmit uses the system version of depot_tools for C++
and JS linting. This is an issue for branches which rely on a specific
depot_tools version for linting. This CL proposes the use of the
depot_tools version defined in DEPS.

This change was evaluated in https://crrev.com/c/3571813. The first
v8_presubmit attempt uses the system-defined depot_tools version, while
the second attempt is rebased on this CL and uses the DEPS defined
version.

Bug: v8:12743
Change-Id: I87e14ea5c1e3dc20b34106ff56f608d55ec3253d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3571805
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79828}
2022-04-06 16:44:44 +00:00
Camillo Bruni
190af788af [tools][system-analyzer] Speed up log parsing
Reduce the dispatching overhead in the hottest loop when parsing log-lines.

- Using a JSMap we can avoid internalizing strings
- Preprocess the dispatch table and only have varArgs or functions as
  parsers
- string[] seems to be slightly faster than string.charAt()

Bug: v8:10644
Change-Id: I03b13bdeecda1ad037191ff74e05142ceeb6533c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3571890
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79816}
2022-04-06 11:31:03 +00:00
Harshal Nandigramwar
54603f2ab0 [turbolizer] Improve edge drawing in graph view
* When the source node is above the target node we draw curved (cubic bezier) lines.
* Else, we fallback to rectangular lines.

Change-Id: Ic80245c7b449942e4477f0056e63618cfbeaaaf7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565715
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Harshal Nandigramwar <pro.bbcom18@gmail.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79807}
2022-04-06 09:14:15 +00:00
Camillo Bruni
c39e47aaa0 [tools][system-analyzer] Improve selection support
- Double click on the current timeline selection to focus and zoom in
- Make timeline-tracks focusable by setting a tabindex
- Add back arrow-key navigation for the map panel (only when focused)
- Prepare code for adding keyboard-based horizontal scrolling
- Use --code-font CSS variable

Bug: v8:10644
Change-Id: Ic473695c9fcdc795d173cd064b4660e100ae8b24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568475
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79786}
2022-04-05 18:42:03 +00:00
Alexander Schulze
9dd0d7147b [py3] Bump tools/unittests/*
Bug: v8:12581
Change-Id: Iea05e0171ad6edbda569c443c0db97e5c0bfc9ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3569222
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79769}
2022-04-05 08:12:20 +00:00
Camillo Bruni
f21e2a7f03 [tools][system-analyzer] Improve Deopt and assembly support
- Add references from CodeLogEntry to DeoptLogEntry
- Add simple basic blocks in the disassembly code view

Bug: v8:10644
Change-Id: I15f3b56751d515b902185b08f9454be3951ffa48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3540142
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79754}
2022-04-04 14:47:59 +00:00
Camillo Bruni
077622acd7 [tools] Fix grokdump mmap disposal
- Process the minidump in a separate function to avoid keeping
  references to the mmapped file during disposal
- Clear all MinidumpReader variables before disposing the mmapped file

Change-Id: I0ce468597329d6f7d703a08309e4be378d9c27cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568469
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79750}
2022-04-04 14:18:13 +00:00
Michael Achenbach
11874266d6 [tools] Switch script wrapper to Py3
Bug: chromium:1292013
Change-Id: I5d73c8a500d66143e569d4605133948a71c82c8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568468
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79749}
2022-04-04 14:13:17 +00:00
Michael Achenbach
ad93d4ee26 [tools] More test-runner Py3 clean-up
Bug: chromium:1292016
Change-Id: I9404ca1c38c6231cada6c5d9af5e5859e4c0e261
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568467
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79744}
2022-04-04 13:34:46 +00:00
Alexander Schulze
2139853732 [py3] Bump v8heapconstants.py and related files
Bug: v8:12581
Change-Id: I4d98e48801ffcfbe507c61ba296da67359e3f5cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568464
Auto-Submit: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79743}
2022-04-04 13:27:13 +00:00
Michael Achenbach
307e30c1eb [foozzie] Fix arguments in wrapper
No-Try: true
Bug: chromium:1288926
Change-Id: Ie28021a34649aeaa68c34252ffe181163a7df2ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568466
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79740}
2022-04-04 12:31:29 +00:00
Alexander Schulze
ea2bbcbe87 [py3] Bump tools/unittests/compare_torque_output_test.py
Bug: v8:12581
Change-Id: I2e869a81f6a8c785954a73cf2e97dae2a9ab3ade
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568450
Auto-Submit: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79738}
2022-04-04 12:16:16 +00:00
Alexander Schulze
ad7248787f [py3] Bump gcmole to py3
Bug: v8:12581
Change-Id: I6c665161a3f376321feb773d809c5453ef1d46f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568445
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79735}
2022-04-04 11:48:13 +00:00
Camillo Bruni
032dfb827a [tools] Update grokdump to python3
Change-Id: I38d0f52b7add9247af50aa5f470a88587e97203f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565725
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79731}
2022-04-04 11:08:17 +00:00
Alexander Schulze
4a28ce2351 [py3] Bump get_landmines to py3
Bug: v8:12581
Change-Id: I73d8248bd109c906aa0296b3b7bfc19ffd1c00ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568447
Auto-Submit: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79730}
2022-04-04 11:03:36 +00:00
Michael Achenbach
dfe465d1ba [foozzie] Switch wrapper to Py3
No-Try: true
Bug: chromium:1288926
Change-Id: I05402b802f6d17dfea1211a682d3ed38f83e5aeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565722
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79726}
2022-04-04 08:30:06 +00:00
Dominik Inführ
ca5055625f [heap] Remove sweeping_slot_set_ from MemoryChunk
Since the new space is always empty after a full GC, the old-to-new
remembered set is also always empty after a full GC. This means we can
get rid of the sweeping_slot_set_.

This slot set was used to allow the main thread to insert into the
old-to-new remembered set non-atomically. The sweeping slot set was
owned by the sweeper, which deletes slots in free memory from it. The
main thread would start with an empty old-to-new remembered set. After
sweeping both slot sets are merged again.

The sweeper now needs to behave differently during a GC. When sweeping
a page during full GC, the sweeper needs to delete old-to-new-slots in
free memory.

Outside of the GC the sweeper isn't allowed to remove from the
old-to-new slots anymore. This would race with the main thread that adds
slots to that remembered set while the sweeper is running. However,
there should be no recorded slots in free memory. DCHECKing this is
tricky though, because we would need to synchronize with the main
thread right-trimming objects and at least String::MakeThin only deletes
slots after the map release-store.

Bug: v8:12760
Change-Id: Ic0301851a714e894c3040595f456ab93b5875c81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560638
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79713}
2022-04-01 14:21:40 +00:00
Al Muthanna Athamina
54469edfb2 Re-enabling some migrated test files
Bug: chromium:1306474
Change-Id: Id01949dc413ca5af5132827001fbe380f8477368
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557250
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79691}
2022-03-31 14:44:19 +00:00
Shu-yu Guo
b8b9013541 [infra] Band-aid presubmit for new cpplint.py messages
Bug: v8:12743
Change-Id: I4a36c0b794759d47eb9436714dfd2417fc45dcd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3558327
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79661}
2022-03-29 22:33:19 +00:00
Camillo Bruni
54bb4b2e3f [tools][system-analyzer] Cleaner tooltips
- Always show the navigation buttons
- Format code with fixed-width font
- Limit the property-table height for more compact tooltips

Bug: v8:10644
Change-Id: I0a0f30056455371bad12b2c679d184948c5b52de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555772
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79652}
2022-03-29 11:43:08 +00:00
Al Muthanna Athamina
95a85701fd Allow V8 to run all unittests presubmit
Search for all files with testing naming convention and run that on v8_presubmit.
Also modify all PRESUBMIT files in the tools directory to include any test file
with the appropriate naming convention.

Bug: chromium:1306474
Change-Id: I61c1b7c71badbbc3b99705289588aa8280824d66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532266
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79651}
2022-03-29 11:14:09 +00:00
Danylo Boiko
959dd7d58d [turbolizer] Shortcuts for bidirectional phase switching.
Bidirectional phase switching by shortcuts "n", "b".
Improved selection of nodes when they are splitting or raising to a common ancestor.
Fixed minor inconsistencies in some variable names with the project style.
Added name and email to the AUTHORS file for first-time contribution.

Change-Id: I0c903dbf81c3d1d75503004ce412a81aace06a61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3537008
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79636}
2022-03-28 08:13:32 +00:00
legendecas
0a0ad98a5a [ShadowRealm] WrappedFunction properties
Implement WrappedFunction properties name/length.

Bug: v8:11989
Change-Id: I050af5814537552ef6c2077802ffc726f2e08fa3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507201
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#79628}
2022-03-25 16:00:33 +00:00
Michael Achenbach
b086206161 Reland "[tools] Clean up py2 code"
This is a reland of commit 1289704aae

Mac-arm64 problem fixed by:
https://crrev.com/c/3550199

Original change's description:
> [tools] Clean up py2 code
>
> Bug: chromium:1292013
> Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79507}

Bug: chromium:1292013
Change-Id: Iadf0ccf94c82012088b76a866296c8e008dff02f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550274
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79624}
2022-03-25 12:14:26 +00:00
Benedikt Meurer
3eb6b7aca6 [debug] Hold on to promises weakly from the debugger's promise stack.
The debugger maintains a stack of promises used for catch prediction
with promise builtins and async functions. Previously this stack would
hold on to the individual promises strongly, and subtle bugs that lead
to not properly cleaning up the stack in some corner cases would often
lead to significant memory issues (e.g. leaking whole iframes).

This refactors the PromiseOnStack to be

  (a) on the V8 heap, rather than allocating C++ structs with global
      handles pointing to the promises, and
  (b) hold on to the promises only weakly.

While this will not guarantee proper promise stack management, it will
at least ensure that edge cases don't lead to catastrophic (debugger
only) leaks.

Bug: chromium:1292063
Change-Id: I9c293ca2032de3a59e1e9624f132d37187805567
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545176
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79594}
2022-03-24 08:16:32 +00:00
Harshal Nandigramwar
767eef930b Fix looping edges
Some edges are self looping because of incorrect `horizontalPos`. This is occuring because of an unexpected scenario caused due to incorrect calculation of `inputApproch` and `outputApproach`. And all of this is occuring because of insufficient distance between two nodes.
An example of the problem is shown in the image: https://imgur.com/aAmnzaK.

Change-Id: I056e1fbcc420ce65a3ae9201e187b22ad3fbaaba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3535791
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79570}
2022-03-23 11:48:41 +00:00
Victor Gomes
d423178dba [maglev] Create test variant
Bug: v8:7700
Change-Id: Icd9c0ce6fce727759beec246253dbd16756abc09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545166
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79567}
2022-03-23 10:12:52 +00:00
Camillo Bruni
cff529a2cd [tools][gcmole] Rename suspects.whitelist to suspects.allowlist
Bug: v8:10009
Change-Id: I1f71b2783cd07331a65f46c316e87a46396e7eda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516153
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79541}
2022-03-21 10:24:39 +00:00
Camillo Bruni
8057caf72a [tools][system-analyzer] Speed improvements
- Avoid redrawing property-link tables if the contents don't change
- Don't update timeline legends if the selection doesn't change
- Use shorter class names for the flamechart for faster parsing
- Round positions in flamechart to avoid long strings that would be
  created from raw double positions
- Don't redraw the tooltip if the content is the same

Change-Id: I925f1708400286c7c9f8db62f75c3b5fe8a16b12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3521945
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79540}
2022-03-21 10:22:25 +00:00
Michael Achenbach
f7aac0cf9f Revert "[tools] Clean up py2 code"
This reverts commit 1289704aae.

Reason for revert:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20release/8735/overview

Original change's description:
> [tools] Clean up py2 code
>
> Bug: chromium:1292013
> Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79507}

Bug: chromium:1292013
Change-Id: I48c38209220b775d0caa45f487ed163f78333e0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532228
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/main@{#79508}
2022-03-17 10:07:38 +00:00
Michael Achenbach
1289704aae [tools] Clean up py2 code
Bug: chromium:1292013
Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79507}
2022-03-17 09:16:57 +00:00
Michael Achenbach
2c4133a0ce [tools] Clean up Py2 code
Bug: chromium:1292013
Change-Id: I8202fed4d59edcc98fff193f3a4b102a5c79d553
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525136
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79505}
2022-03-17 09:05:27 +00:00
Samuel Groß
ffbac83af0 Check instance type before initializing embedder data slots
JSObject::InitializeBody now checks whether the instance type of the
object being initialized can have embedder data slots around the
initialization logic for these slots. This fixes a performance
regression on certain benchmarks.

To perform this check efficiently, a new instance type,
JSObjectWithEmbedderSlots, is introduced so that the check becomes a
simple range check.

Bug: chromium:1304139
Change-Id: I00c892bc2276e950b59602257ca1c2435c10e517
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507712
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79497}
2022-03-16 11:34:54 +00:00
Al Muthanna Athamina
e7eac72803 Remove deprecated scripts in V8
Bug: chromium:1306416
Change-Id: I103602ed1bea71d79a17a9a37c7eaf198575d371
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3521944
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79483}
2022-03-15 15:00:51 +00:00
Clemens Backes
4e983705e5 [wasm] Tweak constants for estimating code space size
It turned out that on arm and arm64 we over-estimated the code size of a
Wasm module quite a bit. This CL adds some more output for the
--trace-wasm-compilation-times flag, and adds a script to compute the
factors we use for code size estimates from that output.
I ran the script on a few benchmarks (an older Epic module, the current
Photoshop module, and the benchmark from the linked bug), and adjusted
the constants accordingly.

Also, simplify the API of {ReservationSize} to only return a single
number, and fail internally if we need to allocate more than the engine
supports (which would only fail for artificially large modules).

R=jkummerow@chromium.org

Bug: chromium:1302310
Change-Id: I5b2c27ff3e360fb6738cf5dd697bcee09e106b6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522067
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79482}
2022-03-15 14:41:13 +00:00
Michael Achenbach
6d1825e21a [release] Clean up python2 code
No-Try: true
Bug: chromium:1292013
Change-Id: Id9966157d28528b28e820d328b4941287a310209
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3521790
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79476}
2022-03-15 11:09:49 +00:00
Marja Hölttä
3a43f6552e [fuzzing] Re-enable fuzzing for staged harmony features
The fuzzers were passing the flag --es-staging which doesn't exist. This
CL updates them to pass the flag --harmony which does exist.

Change-Id: I02c83026e5b9bdf49e51e700f16702bf56cd49e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522064
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79464}
2022-03-14 16:06:04 +00:00
Samuel Groß
5a968b08b3 Refactor ExternalObjects
Instead of implementing ExternalObjects as plain JSObjects with a single
EmbedderDataSlot pointing to a Foreign containing the actual raw
pointer, this CL now creates a new JSExternalObject type that directly
contains the external pointer.

As a side-effect of this refactoring, nullptr values are now no longer
valid for ExternalObjects.

Change-Id: Ic8ff334681c966e823ca70f34dd1efaaa21a0789
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3513234
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79459}
2022-03-14 10:50:58 +00:00
v8-ci-autoroll-builder
8231c651d5 [tools] Update gcmole
R=clemensb@chromium.org

Change-Id: I1d3513a75c32a505cb5cdb1a123f2d586f55ee02
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3513416
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79430}
2022-03-09 20:16:54 +00:00
Dominik Inführ
25981026dc [heap] Improve accounting of PagedSpace::CommittedPhysicalMemory()
Instead of using the high water mark for determining this metric, we use
a bitset for all active/used system pages on a V8 heap page. Each time
when allocating a LAB on a page, we add the pages of that memory range
to that bitset. During sweeping we rebuild that bitset from scratch and
replace it with the old one in case free pages are discarded by the GC.
We DCHECK here that the sweeper only ever removes pages. This has the
nice benefit of ensuring that we don't miss any allocations (like we
do now for concurrent allocations).

CommittedPhysicalMemory for a page is then calculated by counting the
set bits in the bitset and multiplying it with the system page size.
This should be simpler to verify and track the "real" effective size
more precisely.

One case where we are partially less precise than the current
implementation is for LABs. In order to reduce complexity we now treat
all pages of a LAB allocation as active immediately. In the current
implementation we tried to only account the actual used part of the LAB
when changing the LAB later. This is more complex to track correctly
but also doesn't account the currently used LAB in effective size.

Change-Id: Ia83df9ad5fbb852f0717c4c396b5074604bd21e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497363
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79428}
2022-03-09 18:28:21 +00:00
Frank Tang
ebb6716f42 [intl] Removed shipped flag
Clean up two flags which control features shipped in m99
  harmony_intl_locale_info
  harmony_intl_enumeration

Bug: v8:10743, v8:11638
Change-Id: I856afaceb0972052d1bcc70b162e8f9ee9071dd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3508169
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79397}
2022-03-08 07:06:23 +00:00
Frank Tang
a4bdc77fe8 [intl] Part 3 of NumberFormat v3
Add NumberFormat.prototype.formatRange(ToParts)?

https://github.com/tc39/proposal-intl-numberformat-v3

https://chromestatus.com/guide/edit/5707621009981440

Design Doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit


Bug: v8:10776
Change-Id: I9bb163c0c15ccac9d3a2d5e55ad38aa5c06bbaa6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3429464
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79373}
2022-03-04 22:53:20 +00:00
Tobias Tebbi
01b809d2fd [torque] fix bug in formatter
Change-Id: I05e7d0776eaa4722c5a5b9820ee6b34d9319d2ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497816
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79367}
2022-03-04 13:11:50 +00:00
Camillo Bruni
ecc3cd256a [tools] Improve gcmole part II
Prepare gcmole.cc for the next update:
- Print possible GC locations when discovering stale/dead variables
- Make error messages less confusing for the modern V8 engineer
- Prepare gcmole to read suspects.allowlist instead of .whitelist
- Use more readable variable names
- Only log non-found types with --verbose
- Change the currently unusued gccauses format in gcmole.py and
  support loading it back in gcmole.cc
- Implemented first basic gc call-chain printing (disabled by default)

GCmole packaging:
- Add debug mode to bootstrap.sh build script
- Update gcmole.py run instructions in bootstrap.sh and package.sh

Bug: v8:10009
Change-Id: I369d48baa2980455d2e8f57e7a803d0384fe83f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3480095
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79357}
2022-03-04 01:06:11 +00:00
Camillo Bruni
4db43bfa2f [tools] Improve gcmole part I: command line
- Convert gcmole to python3-ish code
  - use local Path implementation for future full migration
- Use optparse and explicit arguments for gcmole
  - Add explicit directories flags
  - Use backwards compatible env vars as fallbacks
- Add gn target v8_gcmole_files to avoid issues with missing or
  incompatible generated files

Drive-by-fixes for running gcmole without ignored files:
- Disable gcmole in Isolate::UnwindAndFindHandle
- Partially disable gcmole in V8HeapExplorer::AddEntry

Bug: v8:10009
Change-Id: I5b4d1c6554db300190226361b6c518419109ff3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497320
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79348}
2022-03-03 15:01:15 +00:00
Leszek Swirski
31abbcfb4d [maglev] Use RegList for free registers
Store the free registers as a RegList rather than stack of Register
values. This allows us to simplify some of the register freeing logic,
including passing the current free set to nodes for use as temporaries.

Drive-by: Replace ALWAYS_ALLOCATABLE_GENERAL_REGISTERS with
ALLOCATABLE_GENERAL_REGISTERS, which is the more general list (the former
is an implementation detail for optionally reserving a register for
the cage register).

Bug: v8:7700
Change-Id: I666e9a7547c2f4f4e578fbcbb4bd3fe3cb06dac5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497767
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79344}
2022-03-03 10:33:44 +00:00
Camillo Bruni
656675313c [tools] Improve system analyzer
Profiler:
  - Track profiler tick durations
  - Various speedups due to low-level hacking
Improve code-panel:
  - Better register highlighting
  - Added address navigation and highlighting
  - Removed obsolete inline source-view
Improve script-panel:
  - Keep current source position focused when showing related entries
  - Better tool-tip with buttons to focus on grouped entries per
    source postion
  - Focus by default on other views when showing related entries
Improve timeline-panel:
  - Initialise event handlers late to avoid errors
  - Lazy initialise chunks to avoid errors when zooming-in and trying to
    create tooltips at the same time


Change-Id: I3f3c0fd51985aaa490d62f786ab52a4be1eed292
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3492521
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79329}
2022-03-02 13:41:32 +00:00
Jakob Gruber
123c38a5aa [maglev] Basic tiering to Maglev
When --maglev is set, tier up to Maglev from unoptimized tiers based on
--interrupt-budget-for-maglev, initially set to 40KB (which should very
roughly by 1/10th of the time until the TF tierup decision is made).
On the first interrupt, a non-concurrent optimization to Maglev is
requested, which the next call to the marked function will perform.

- There is no support for tiering from Maglev to TF yet.
- Maglev's language support is minimal and tests are not expected to
  pass with --maglev.
- Disable --maglev by default for now.

Drive-by: fixes related to Maglev flag definitions.

Bug: v8:7700
Change-Id: I121bb3f4f3830fdd20e1d4a12d3e04f08a99be38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500302
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79328}
2022-03-02 13:35:32 +00:00
Jakob Gruber
56c6873507 Skip src/maglev for v8_check_header_includes
Maglev is currently enabled only on x64; BUILD.gn knows about this
through v8_enable_maglev, but v8_check_header_includes doesn't. It
thus tries to compile maglev files on platforms that don't have maglev
support yet.

Add an explicit maglev exclude rule until we support other platforms.

Bug: v8:7700
Change-Id: Iac991741c7d630dc4ed9f9fbf6df7656853cc743
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494536
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79305}
2022-02-28 10:54:50 +00:00
legendecas
62155dbd3c [ShadowRealm] ShadowRealm.prototype.evaluate and WrappedFunction
Bootstrap ShadowRealm.prototype.evaluate, WrappedFunction
and WrappedFunction.[[Call]].

Bug: v8:11989
Change-Id: Id380acb71cd5719e783c8f5d741cc4ccf2a93e78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3432729
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#79293}
2022-02-25 19:16:17 +00:00
jameslahm
8261497889 [symbol table] use plain hash table to implement symbol table in isolate
The per-Isolate Symbol tables are implemented using NameDictionary
before, which has additional property details overhead
And NameDictionary is limited to 2^23, which limits the Symbol
tables to be a maximum of 2^23.

- replace NameDictionary with SymbolTable in isolate

Bug: v8:12575
Change-Id: Ica4f05aac3494f7dfa3a074c240d4ba25df814e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3476897
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79285}
2022-02-25 13:40:20 +00:00
v8-ci-autoroll-builder
4d62c005f8 [tools] Update gcmole
R=machenbach@chromium.org

Change-Id: I9866742528d47210d39fcdeda522dcf29bdba38e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3486679
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79249}
2022-02-24 10:30:13 +00:00
Camillo Bruni
30756f21b4 [tools] Improve list_deprecated.py
- List the current v8 version
- Minor code cleanup

Change-Id: Ic7a89e42d27465cc5df8e2249eaeacf8ca1eb6a7
No-Try: true
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3477034
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79222}
2022-02-23 10:22:16 +00:00
Shu-yu Guo
efdf87aff8 Reland "[shared-struct] Prototype JS shared structs"
This is a reland of 1025bf26e3

Changes since revert:

- TSAN issue fixed by https://crrev.com/c/3475084
- Skip the shared-struct-workers test until shared GC deadlock is fixed,
  being tracked in v8:12645

Original change's description:
> [shared-struct] Prototype JS shared structs
>
> Unlike the Stage 1 proposal, for simplicity the prototype does not add
> any new syntax, instead opting for exposing a SharedStructType
> constructor which takes an array of field names. This type constructor
> returns constructors for shared structs.
>
> Shared structs can be shared across Isolates, are fixed layout, have no
> prototype, have no .constructor, and can only store primitives and
> other shared structs.
>
> The initial prototype does not have TurboFan support.
>
> Bug: v8:12547
> Change-Id: I23bdd819940b42139692bcdb53d372099b0d4426
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3390643
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79156}

Bug: v8:12547
Change-Id: Ic1f5cf9fa9791ae2d5d5dc7c110614ca10b5d98e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3475078
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79215}
2022-02-23 01:37:55 +00:00
Alexander Schulze
7601854ddd [v8] py3 migration of tools/predictable_wrapper.py
Migrate predictable_wrapper to py3. Run test in v8_presubmit.

R=liviurau@chromium.org, machenbach@chromium.org

Bug: chromium:1245634
Change-Id: I941e248ffcf12ce26a55a5f5889dab06ee74e66e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3448379
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79200}
2022-02-22 09:48:35 +00:00
Camillo Bruni
43cd697479 [tools] Remove html-version of the tickprocessor
The tool has been unmaintained for a while and doesn't work.

We do have either the system-analyzer or profview as valid web-based
replacements. For all other use-cases we recommend using the
command-line versions.

Change-Id: I3a07e80aebfb1f8d6ba16d6bffe16d9da7b9eac4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474677
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79178}
2022-02-18 16:25:37 +00:00
Tamer Tas
a513793048 [infra] migrate simple PRESUBMIT scripts to py3
R=machenbach@chromium.org,alexschulze@chromium.org

Bug: chromium:1298869
Change-Id: I1ef1ac1d48ccbea81cfebcc360194f5003da17d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474672
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79171}
2022-02-18 13:43:30 +00:00
Michael Achenbach
c1078b5e8e Revert "[shared-struct] Prototype JS shared structs"
This reverts commit 1025bf26e3.

Reason for revert: https://crbug.com/v8/12645

Original change's description:
> [shared-struct] Prototype JS shared structs
>
> Unlike the Stage 1 proposal, for simplicity the prototype does not add
> any new syntax, instead opting for exposing a SharedStructType
> constructor which takes an array of field names. This type constructor
> returns constructors for shared structs.
>
> Shared structs can be shared across Isolates, are fixed layout, have no
> prototype, have no .constructor, and can only store primitives and
> other shared structs.
>
> The initial prototype does not have TurboFan support.
>
> Bug: v8:12547
> Change-Id: I23bdd819940b42139692bcdb53d372099b0d4426
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3390643
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79156}

Bug: v8:12547
Change-Id: I44f2b8bb7487b4d39ba1282585e0b2282501230f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474676
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79170}
2022-02-18 13:33:38 +00:00
Dominik Inführ
2b63d5d093 [heap] Add flag for disabling map space
Now that we are able to compact map space, we can also get rid of the
map space and allocate maps in the old space instead. This CL introduces
a FLAG_map_space for enabling/disabling the map space but the map space
remains enabled by default for now.

Without a separate space for maps, the GC can't prevent relocation of
maps anymore. Therefore this CL always allows compaction of maps when
running without a map space. Rename flag to --compact-maps to better fit
this scenario.

mkgrokdump and debug_helper also need to be updated to look for maps
also in the old space. The map space is now optional.

Bug: v8:12578
Change-Id: Ic4e4abd0b58bee26e64329b1c92dbccb07d8105a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3424483
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79165}
2022-02-18 09:03:07 +00:00
Frank Tang
dfab3f44e8 [intl] Part 2 of NumberFormat v3
Change NumberFormat.prototpe.resolvedOptions to return new options in v3.
Also fix a heap allocation assertion bug in GetStringOrBooleanOption
while the useGrouping option is an invalid argument.

https://github.com/tc39/proposal-intl-numberformat-v3

https://chromestatus.com/guide/edit/5707621009981440

Design Doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit

Bug: v8:10776
Change-Id: Iaeeb0398b77394db3c941a2706d44b734a1f9d8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427298
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79161}
2022-02-18 08:47:59 +00:00
Shu-yu Guo
1025bf26e3 [shared-struct] Prototype JS shared structs
Unlike the Stage 1 proposal, for simplicity the prototype does not add
any new syntax, instead opting for exposing a SharedStructType
constructor which takes an array of field names. This type constructor
returns constructors for shared structs.

Shared structs can be shared across Isolates, are fixed layout, have no
prototype, have no .constructor, and can only store primitives and
other shared structs.

The initial prototype does not have TurboFan support.

Bug: v8:12547
Change-Id: I23bdd819940b42139692bcdb53d372099b0d4426
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3390643
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79156}
2022-02-17 19:45:56 +00:00
Camillo Bruni
3ecb92e3b7 [tools] Fix callstats
- Remove debug printing in callstats.py
- Handle non-version nested JSON files better in callstats.html
- Harden RCS extraction from telemetry JSON files

Change-Id: Ied921e54e6281a456c0a6369d797c21785080036
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3471856
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79155}
2022-02-17 19:12:24 +00:00
Camillo Bruni
2f50fc6a2f [tools] Fix callstats.py domain name extraction
Historically the tool only combined files where the run number was
separate by a hash: domain#1.txt , domain#2.txt...

Fix this to allow for underscores and/or abitrary number suffixes.

Change-Id: I85253a1b871eb75fce60fef9a61b7d50afe72abd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468900
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79134}
2022-02-17 10:19:30 +00:00
Camillo Bruni
4130834484 [tools] Make gcmole less verbose by default
Don't print command line invocations by default.

Change-Id: Ie67c883c92557a645fc8a681722f49a2c7c4bd17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468901
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79130}
2022-02-16 16:41:33 +00:00
Manos Koukoutos
890ce6fd3a [tools] Allow python3 for gm.py
The reason mentioned for requiring python2 is no longer valid.

Bug: chromium:1292013, chromium:1292016
Change-Id: Id8fc938d32c8e967fff74239ccba8ad79e517c57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3464034
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79118}
2022-02-16 09:42:13 +00:00
Camillo Bruni
cc0a8ae4ee [runtime] Add ReadOnlyRoots.empty_array_list()
- Simplify HeapObject::IsArrayList check
- Dehandlify ArrayList initialization
- Prevent auto-formatting of v8heapconst.py

Change-Id: I9849ad82dae1a2dc671433e8d5eb8ec63ed830c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3447906
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79114}
2022-02-16 08:17:06 +00:00