Instead of storing both the {NativeModule} and the {WasmModule} in a
{Managed} object, just store the {WasmModule} in the {NativeModule}
directly. This fixes crashes that happen if the {Managed<WasmModule>}
dies before the {Managed<NativeModule>}.
R=mstarzinger@chromium.org
Bug: chromium:854794, v8:7879, v8:7889
Change-Id: I6b11729943fe7a03d225138782655ee5dafd26a6
Reviewed-on: https://chromium-review.googlesource.com/1118171
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54090}
This CL adds the newline character as a valid character
in Torque strings.
You can now write Print('Hello, World!\n') in Torque and it works!
Change-Id: I2a1f87cfef492fedd3d24086e226d3ebaf882115
Reviewed-on: https://chromium-review.googlesource.com/1118229
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#54089}
When run locally, one times out and the other runs out of stack space.
R=sigurds@chromium.org
Change-Id: I7cc1aa9bb0857f12ac46baf80de18a2c5175b8b9
Reviewed-on: https://chromium-review.googlesource.com/1118231
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54087}
This CL removes the friendship between {NativeModule} and
{NativeModuleSerializer}/{NativeModuleDeserializer}.
Instead, it adds a new public method ({AddDeserializedCode}) which is
being called from the deserializer.
Drive-by: Unify the argument order to {AddCode}, {AddOwnedCode} and
{WasmCode}.
R=mstarzinger@chromium.org
Bug: chromium:856938
Change-Id: I88943c90c45650e21ae6bc17395a17f86319c046
Reviewed-on: https://chromium-review.googlesource.com/1117075
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54084}
This CL complements commit f2695f7363
for MIPS32. That commit addressed problem for MIPS64.
Original message:
>ArraySpliceTorque builtin triggers generation of MIPS specific
>trampolines due to its large size, and this code is not PIC
>and cannot be isolate independent.
>
>This CL is a workaround that marks ArraySpliceTorque as
>isolate dependent on MIPS64.
>
>Bug: v8:7882
>Change-Id: I0b5764236268c2529e149b275dcf382dab709682
>Reviewed-on: https://chromium-review.googlesource.com/1111847
>Commit-Queue: Jakob Gruber <jgruber@chromium.org>
>Reviewed-by: Michael Stanton <mvstanton@chromium.org>
>Reviewed-by: Jakob Gruber <jgruber@chromium.org>
>Cr-Commit-Position: refs/heads/master@{#53968}
Bug: v8:7882
Change-Id: Iffdfab673781cca1eb14d11428ffcf7a01c21f27
Reviewed-on: https://chromium-review.googlesource.com/1117186
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54083}
Merges DebugInfo field into the function_identifier field, storing the function
identifier in the DebugInfo. Also moves some debugging_hints bits to the SFI flags,
and others to the DebugInfo. Finally, changes the logic to store debugger patched
bytecode array on the SFI instead of the DebugInfo, simplifying the logic in the
InterpreterEntryTrampoline.
BUG=chromium:818642,chromium:783853
TBR=hpayer@chromium.org
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: If440080c0f08fac4fb96f5e18dcc0eb9b86d4821
Reviewed-on: https://chromium-review.googlesource.com/1115819
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54081}
This is a reland of 7a0d6a5000
Original change's description:
> [build] Disable slow asserts for v8_enable_fast_mksnapshot
>
> Slow asserts double the time spent in mksnapshot. While we want them
> enabled on our bot builds, local builds should be fast and don't
> necessarily need them.
>
> This also adds v8_enable_fast_mksnapshot as default in gm.py.
>
> Bug: v8:7891,v8:6688
> Change-Id: I5ab1491f3396c4351de30dbbb80a81e2242c5db9
> Reviewed-on: https://chromium-review.googlesource.com/1116552
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54074}
TBR=jkummerow@chromium.org
Bug: v8:7891, v8:6688
Change-Id: I3b1e80b3ca156b7d571ebc7f04e341f0ba716691
Reviewed-on: https://chromium-review.googlesource.com/1118139
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54080}
The multi-snapshot feature is only used on bots, where we need the
ability to execute tests with/without mitigations controllable through a
runtime flag.
This disables the flag by default and only enables it on bot configs.
Note: standard single-snapshot builds silently use the available
snapshot regardless of the value of --untrusted-code-mitigations.
Bug: v8:7891,v8:6688
Change-Id: I0d1a91e5c1c17b4d91b42d176b50ea44d2128d48
Reviewed-on: https://chromium-review.googlesource.com/1117687
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54079}
We pass the {WasmModule} by non-const pointer and by non-const
reference a lot. This violates the style guide, and adds the risk of
accidentally modifying it.
This CL makes the {WasmModule} const during compilation and
instantiation.
R=mstarzinger@chromium.org
Bug: v8:7754
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ie1878322828b63284b341d97da595e8e91dd4f51
Reviewed-on: https://chromium-review.googlesource.com/1117194
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54078}
This reverts commit 7a0d6a5000.
Reason for revert: Breaks no-slow-assert builds.
Original change's description:
> [build] Disable slow asserts for v8_enable_fast_mksnapshot
>
> Slow asserts double the time spent in mksnapshot. While we want them
> enabled on our bot builds, local builds should be fast and don't
> necessarily need them.
>
> This also adds v8_enable_fast_mksnapshot as default in gm.py.
>
> Bug: v8:7891,v8:6688
> Change-Id: I5ab1491f3396c4351de30dbbb80a81e2242c5db9
> Reviewed-on: https://chromium-review.googlesource.com/1116552
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54074}
TBR=jkummerow@chromium.org,jgruber@chromium.org
Change-Id: I6b048e819846c4bd9a064f82e2f3c7609369cd33
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7891, v8:6688
Reviewed-on: https://chromium-review.googlesource.com/1118138
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54077}
This loads the stack limit address from the instance object instead of
embedding it into the instruction stream. It is another piece towards
making the generated code independent of the Isolate.
R=clemensh@chromium.org
BUG=v8:7424
Change-Id: I9381956adf2d7c42f6626708229cfdd5c4ca114f
Reviewed-on: https://chromium-review.googlesource.com/1117189
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54076}
This reverts commit 9cd33e9eed.
Reason for revert: Didn't add value.
Original change's description:
> [build] Temporarily make ubsan bot use no snapshot
>
> Currently mksnapshot fails due to ubsan issues. With a nosnap build it
> will be easier to track down failures initially as normal test
> failures, since mksnapshot isn't called with the sanitizer
> environment variables.
>
> NOTRY=true
> TBR=jgruber@chromium.org
>
> Bug: v8:7860
> Change-Id: I897a8d307d90f545c80a90e1e1a2a632ffae1c3e
> Reviewed-on: https://chromium-review.googlesource.com/1116783
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54051}
TBR=machenbach@chromium.org,jgruber@chromium.org
Change-Id: I31e06fafb845c07bbaeb7a104d130f923d3be062
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7860
Reviewed-on: https://chromium-review.googlesource.com/1118039
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54075}
Slow asserts double the time spent in mksnapshot. While we want them
enabled on our bot builds, local builds should be fast and don't
necessarily need them.
This also adds v8_enable_fast_mksnapshot as default in gm.py.
Bug: v8:7891,v8:6688
Change-Id: I5ab1491f3396c4351de30dbbb80a81e2242c5db9
Reviewed-on: https://chromium-review.googlesource.com/1116552
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54074}
This reverts commit fdf69d53b6.
Reason for revert: Speculative revert for broken GPU bots:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/Linux%20V8%20FYI%20Release%20%28NVIDIA%29/1638https://ci.chromium.org/p/v8/builders/luci.v8.ci/Mac%20V8%20FYI%20Release%20%28Intel%29/1624
Original change's description:
> [heap] Adds a young generation large object space
>
> This CL adds the young generation lage object spaces and a flag
> --young-generation-large-objects that by default allocates all
> large objects in this space. This is a preparation CL. The space
> is not fully functional.
>
> Bug: chromium:852420
> Change-Id: Ib66d26fa52cda89bf04787084826aeb84b6ec1ac
> Reviewed-on: https://chromium-review.googlesource.com/1099164
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54056}
TBR=ulan@chromium.org,yangguo@chromium.org,hpayer@chromium.org
Change-Id: I175514f806a19c7837022795210625ca40e3c318
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:852420
Reviewed-on: https://chromium-review.googlesource.com/1118038
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54072}
This is required for jumbo builds to work before the stable jumbo chunk
algorithm[*] can reland.
[*] https://chromium-review.googlesource.com/c/chromium/src/+/1102218
Bug: chromium:856964, chromium:782863
Change-Id: Ibbe0994980eb554acd4e1557e733d07526a90608
Reviewed-on: https://chromium-review.googlesource.com/1117059
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Cr-Commit-Position: refs/heads/master@{#54070}
The name itself does not make sense any more since the {NativeModule} is
shared across instances. It is also only used for debugging, so remove
it, and replace it by the address of the {NativeModule} itself in debug
output.
R=mstarzinger@chromium.org
Bug: v8:7754
Change-Id: I02f9252981b776934811a904287be31c7076e90b
Reviewed-on: https://chromium-review.googlesource.com/1114965
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54064}
The motivation for this CL were the expensive UnhandledIsSorted() checks,
which increase mksnapshot time (v8:7895).
In addition, it is a cleanup and removes a potential for quadratic
performance.
Change-Id: I33e734e4e20183768dbf8222adcbb3abc1f1a6bf
Reviewed-on: https://chromium-review.googlesource.com/1116960
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54063}
This fixes include violations where normal "foo.h" headers included
inline "bar-inl.h" headers. It also removes two (almost) dead methods.
R=clemensh@chromium.org
BUG=v8:7754
Change-Id: I11c6ce71650db22f3c1d7cf5ca50529c94b94839
Reviewed-on: https://chromium-review.googlesource.com/1117076
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54060}
Replace two more pairs of {std::unique_ptr} and {size_t} by
{OwnedVector}.
R=mstarzinger@chromium.org
Change-Id: Ifdf03abf9759fbbb4adde76a494073625723a03d
Reviewed-on: https://chromium-review.googlesource.com/1116785
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54057}
This CL adds the young generation lage object spaces and a flag
--young-generation-large-objects that by default allocates all
large objects in this space. This is a preparation CL. The space
is not fully functional.
Bug: chromium:852420
Change-Id: Ib66d26fa52cda89bf04787084826aeb84b6ec1ac
Reviewed-on: https://chromium-review.googlesource.com/1099164
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54056}
Rolling v8/third_party/icu: f61e46d..172d331
This also disables the test that is broken by this roll.
TBR=gsathya@chromium.org
Bug: chromium:856119
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If400b5b388b683d6e2d013673b53ca0c1b7572ce
Reviewed-on: https://chromium-review.googlesource.com/1116794
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54055}
This is a reland of 91f113e2bb
Original change's description:
> Reland "[heap] Visit individual ephemerons instead of collections"
>
> This is a reland of 9aba015976
>
> Original change's description:
> > [heap] Visit individual ephemerons instead of collections
> >
> > When marking ephemerons visit individual ephemerons with key and value
> > unreachable instead of simply iterating all ephemerons in all weak
> > collections. Also visit ephemerons at end of concurrent marking to do
> > work we would otherwise need to do in the atomic pause.
> >
> > Bug: chromium:844008
> > Change-Id: I3400ad1f81c0cdc0fe6506a1f1146a6743a7fcd7
> > Reviewed-on: https://chromium-review.googlesource.com/1113934
> > Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54039}
>
> Bug: chromium:844008
> Change-Id: I4c44e74c7cf5fe380ffa4ce9f106bebb57bc023d
> Reviewed-on: https://chromium-review.googlesource.com/1116438
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Cr-Commit-Position: refs/heads/master@{#54046}
Bug: chromium:844008
Change-Id: Ie9d606c51aacdfa9ffe77fe4cf780e30dd445d52
Reviewed-on: https://chromium-review.googlesource.com/1116639
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#54053}
We currently store the protected instructions per code object in a
{std::unique_ptr<std::vector<ProtectedInstructionData>>}. This wastes
memory, because it requires two heap allocations, plus the vector might
over-allocate (and it currently does, because it is filled dynamically
during compilation).
This CL changes that to store the protected instructions in an
{OwnedVector}. This requires one copy after generating the list of
{ProtectedInstructionData} in an {std::vector} during compilation, but
saves memory afterwards.
R=mstarzinger@chromium.org
Bug: chromium:856938
Change-Id: Ie290a17dc32f27fbbfe0c000a52297181c954550
Reviewed-on: https://chromium-review.googlesource.com/1116701
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54052}
Currently mksnapshot fails due to ubsan issues. With a nosnap build it
will be easier to track down failures initially as normal test
failures, since mksnapshot isn't called with the sanitizer
environment variables.
NOTRY=true
TBR=jgruber@chromium.org
Bug: v8:7860
Change-Id: I897a8d307d90f545c80a90e1e1a2a632ffae1c3e
Reviewed-on: https://chromium-review.googlesource.com/1116783
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54051}
We spend 2/3rds of all time in mksnapshot in UnhandledIsSorted.
This was found by tikuta@ (see https://crbug.com/v8/7891#c15).
This CL does two things: it optimizes the function a bit (it's now
twice as fast), and turns all related DCHECKs into SLOW_DCHECKs, which
means that they disabled by the v8_enable_fast_mksnapshot build flag.
Bug: v8:7891, v8:6688, v8:7895
Change-Id: Iec2b230be39ec0a0ba0863f1153073e9bf1a47ce
Reviewed-on: https://chromium-review.googlesource.com/1116556
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54050}
{PrintCollection} can print any collection which is iterable via a
standard for-each loop in C++. The output format of {4, 7, 11} is:
[4, 7, 11]
This helper avoids a few repetitions of manually outputting such
collections.
R=titzer@chromium.org
Bug: v8:7754
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Iaa91e5465968a029815b3aa2b35948f711956cdb
Reviewed-on: https://chromium-review.googlesource.com/1112005
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54048}
This is a reland of 9aba015976
Original change's description:
> [heap] Visit individual ephemerons instead of collections
>
> When marking ephemerons visit individual ephemerons with key and value
> unreachable instead of simply iterating all ephemerons in all weak
> collections. Also visit ephemerons at end of concurrent marking to do
> work we would otherwise need to do in the atomic pause.
>
> Bug: chromium:844008
> Change-Id: I3400ad1f81c0cdc0fe6506a1f1146a6743a7fcd7
> Reviewed-on: https://chromium-review.googlesource.com/1113934
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54039}
Bug: chromium:844008
Change-Id: I4c44e74c7cf5fe380ffa4ce9f106bebb57bc023d
Reviewed-on: https://chromium-review.googlesource.com/1116438
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#54046}
This reverts commit 9aba015976.
Reason for revert: causes widespread breakage on Chromium-integrated builds, failing here:
CHECK_EQ(0, heap()->local_embedder_heap_tracer()->NumberOfWrappersToTrace());
in MarkCompactCollector::ProcessEphemeronMarking(). See e.g. https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.v8.fyi%2FV8-Blink_Linux_64__dbg_%2F12321%2F%2B%2Frecipes%2Fsteps%2Fwebkit_unit_tests%2F0%2Fstdout and more on https://ci.chromium.org/p/v8/g/fyi/console
Original change's description:
> [heap] Visit individual ephemerons instead of collections
>
> When marking ephemerons visit individual ephemerons with key and value
> unreachable instead of simply iterating all ephemerons in all weak
> collections. Also visit ephemerons at end of concurrent marking to do
> work we would otherwise need to do in the atomic pause.
>
> Bug: chromium:844008
> Change-Id: I3400ad1f81c0cdc0fe6506a1f1146a6743a7fcd7
> Reviewed-on: https://chromium-review.googlesource.com/1113934
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54039}
TBR=ulan@chromium.org,dinfuehr@google.com
Change-Id: Ib44bfe8c49e8fc30c3d0f2beba03a2895530dfd6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:844008
Reviewed-on: https://chromium-review.googlesource.com/1116118
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54045}