Commit Graph

77561 Commits

Author SHA1 Message Date
Camillo
2c0a49f39c [tools][profiling] Add googler pprof support for chrome helper
- Add gcert/gcertstatus support for chrome helper
- Skip pprof uploading for non-googlers
- Print better local results instructions for multiple chromium
  results files
- Fix docs link in --help text
- Exit silently when a keyboard interrupt ocurred

Drive-by-fix:
- format files
- sort imports

Change-Id: I88bae27102dbf3d560c4203774d9746e96fdbdc5
No-Try: True
No-CQ: True
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878166
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83069}
2022-09-08 11:43:06 +00:00
Ilya Rezvov
94c28eb72f Reland "Port JS-Wasm Promise Integration for arm64"
This is a reland of commit 0a1a579ad2

The original CL has a bag in assigning no_reg to scoped Register variable.
To fix it Scoped guard was added for automated release of scoped registers.

Original change's description:
> Port JS-Wasm Promise Integration for arm64
>
>
> Port Generic JS-Wasm Wrapper for arm64
>
> Change-Id: I256e6511d47af9ab04c577beb6b829dfee34a6ed
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3841074
> Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83038}

Change-Id: I7b8b355f5689e51529223f1156e74e980c3b50ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879492
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83068}
2022-09-08 11:36:25 +00:00
Leszek Swirski
5d201ee105 [meta] Add DIR_METADATA for src/maglev
Bug: v8:7700
Change-Id: I4efa8f8b3b7df03b3fb6b6bd35c7310b0da07d49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879613
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83067}
2022-09-08 11:23:45 +00:00
Al Muthanna Athamina
c66e6ea05f Disable interrupt-budget-for-maglev flag
Bug: v8:7700
Change-Id: Ieff3e3b053f418e73699a208993c4d0771326522
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879614
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83066}
2022-09-08 11:22:35 +00:00
Thibaud Michaud
721ae440ca [wasm] Fix stack-switching JS limit offset
Add the missing KB multiplier. Also add a flag to set the fixed stack
size.

R=clemensb@chromium.org

Bug: v8:12191
Change-Id: I9782192d2eef1986286f726a05444a4bec49fc66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875902
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83065}
2022-09-08 11:19:36 +00:00
Leon Bettscheider
924cf85e00 [heap] IsMarkingComplete only for MajorMC
ShouldFinalize should only be called if major incremental marking is
active, and can crash if minor incremental marking is active, if
MajorMC's local_marking_worklists_ was reset.

The only caller is IsMarkingComplete. This CL changes the IsMarking
check to IsMajorMarking to solve this issue, and renames
IsMarkingComplete to IsMajorMarkingComplete.

Bug: v8:13012
Change-Id: Iba6bd5b7977ec8566c3ab0f047646d8cafd45038
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879485
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83064}
2022-09-08 11:15:29 +00:00
Victor Gomes
8641d2609d Allow BytecodeArray::Disassemble to be called by a background thread
BytecodeArray::Disassemble fails a SLOW_DCHECK when invoking from
a background thread, due to the little hack to recover the handle
inside the function.

This CL changes the method to static with a handle as input.
The old method calls the static one, since it is allowed to be
called by the main thread.

Change-Id: I3546f0d2b160d15386da0980efc539693672c230
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879498
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83063}
2022-09-08 11:14:25 +00:00
Michael Achenbach
2acd2f9d44 [test] Add more logging to results-processing loop.
Bug: v8:13113
Change-Id: Ie42a654378660e4a2dc45d53d40683281e7343dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879496
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83062}
2022-09-08 10:43:16 +00:00
Omer Katz
a5b3c3df9b [heap] Minor MinorMC fixes
Fix broken DCHECK:
When using MinorMC, new space is a paged space and only uses the
TO_PAGE page flag. New large object space however still uses both
TO_PAGE and FROM_PAGE page flags. With MinorMC it still possible
to find reference to FROM_PAGEs, but those pages have to be large
pages.

Fix broken test:
MinorMC may only free empty pages when shrinking. Therefore, shrink
may actually not change the space capacity at all (e.g. when all
pages have live objects on them). More specifically, the capacity is
not guaranteed to be half the previous capacity.

Bug: v8:12612
Change-Id: Ib0edcafd758828f821f82bc8c796c205f162809c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879493
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83061}
2022-09-08 10:22:56 +00:00
Omer Katz
cab126f9ee [heap] Do full GC on allocation failure
On allocation failure in new space we used to do at most 2 GCs before
calling the near heap limits callback. The 2 GCs would empty new space,
thus insuring that the current allocation can succeed.
With MinorMC the 2nd GC has no effect and we should do a full GC instead
to empty new space.

Bug: v8:12612
Change-Id: I4f767136283b5d26fee4f4a3998359b3c1e2108b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879495
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83060}
2022-09-08 10:03:05 +00:00
Leszek Swirski
556e44de28 [ic] Store the getter in the FBV
For accessors, instead of storing the descriptor index + holder in the
LoadHandler, store the getter directly (avoiding the
map->descriptor->pair->getter hops). For the non-prototype case, where
there's no LoadHandler, store the AccessorPair directly as a weak
handler instead of the Smi handler. We can't store the getter here
directly, because it could be in new space, and then we can't use it in
the stub cache.

Required some rejiggling of ic.cc method signatures, to allow
ComputeHandler to return a weak ref.

Change-Id: I22c0e64bec9880a3ba23c2d1eeb3a1c23179ca4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865557
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83059}
2022-09-08 09:35:15 +00:00
Matthias Liedtke
319af35d1d [mjsunit] assertEquals: Assert equality of non-enumerable properties too
assertEquals() compares objects by comparing each property for both
objects. This was done by using Object.keys() which however only returns
enumerable properties.
With this change also non-enumerable properties are compared.

Still, the comparison doesn't require the properties to be equal.
So, if one property is marked enumerable in one object but not the
other, the objects would still be considered equal.
This could be adapted in a follow-up CL if desired.
The prototype is still ignored for the comparison.

Change-Id: I1bb9df055bfb764ac1c02d971ac6f4a50f4a98e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876384
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83058}
2022-09-08 09:25:26 +00:00
Jakob Linke
178f2eeb13 Reland "[maglev] Deopt on overflow in >>>"
This is a reland of commit 24e60017d4

The reland changes %ClearFunctionFeedback to clear *all* feedback
slot kinds including binary/compare/for-in slots. In the tests we
thus no longer have to resort to tricks to restore the function to
it's initial state, instead simply call %ClearFunctionFeedback.

Original change's description:
> [maglev] Deopt on overflow in >>>
>
> Re-enable the int32 fast path for ShiftRightLogical, but account for
> Maglev's missing signed/unsigned representation tracking by a)
> removing rhs==0 as the identity value (a shift by 0 is still a
> signed-unsigned conversion) and b) deoptimizing if the result cannot
> be converted to a non-negative smi.
>
> Note this is not a deopt loop, since a non-smi result will change the
> feedback to kSignedSmallInputs (from kSignedSmall).
>
> To fix this properly, we should track signed/unsigned representations
> and convert the result to a heap number if it doesn't fit within smi
> range.
>
> Bug: v8:7700
> Change-Id: Ifd538d227a6f1290eb7f008d9bfad586ff91ea0f
> Fixed: v8:13251
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876366
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83025}

Bug: v8:7700
Change-Id: I2f607a0fb863b80e8589c9c1e86ee31fbac48c25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879491
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83057}
2022-09-08 09:16:46 +00:00
Michael Achenbach
3c4654da69 [test] Dump traceback on test-runner interrupts
Bug: v8:13113
Change-Id: I7cd37446d9ecbe271e0e5df96a4dcfd43b307c27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879489
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83056}
2022-09-08 09:08:35 +00:00
Leszek Swirski
f1026c1917 [api] Add a check that FunctionTemplate getters have code
Attempting to set a FunctionTemplate without a code handler as an
accessor for a property will fail in the runtime, which expects to be
able to call the handler. Add an API check that guards against this.

Change-Id: I270f0ca3d20de507bc9bde2c4c8d23b2614313dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879490
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83055}
2022-09-08 08:42:25 +00:00
Victor Gomes
7cdd1ed397 [maglev] Workaround for generator resume middle loop issue
The current abort will crash if the generator is created by the
interpreter and resumed by the maglevved code.

This current workaround is not ideal since it can introduce
a deopt-reopt loop.

Bug: v8:7700, v8:13109
Change-Id: I7db71a896711255d866ace98eddde85538aa2903
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879228
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83054}
2022-09-08 08:31:09 +00:00
Jakob Linke
854a37282b [maglev] Move deferred code helpers to masm
Bug: v8:7700
Change-Id: Ie9be2aaf0a75cf1fd19f50ce4697f71e92a36df6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879223
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83053}
2022-09-08 08:13:55 +00:00
Shu-yu Guo
43b4e42415 [rab/gsab] Remove unused string
Bug: v8:11111
Change-Id: I4af1cc85a15833c360a5a454f8d36f43840232ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878254
Reviewed-by: Marja Hölttä <marja@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83052}
2022-09-08 08:12:25 +00:00
Victor Gomes
62522ffb0c Add more owners to src/deoptimizer
Change-Id: If4c6792d36423daafb2a4454354db2d9e4abe297
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879229
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83051}
2022-09-08 07:55:59 +00:00
Dominik Inführ
8d6c969feb [execution] Introduce Isolate::shared_space_isolate()
At the moment the shared heap is internally implemented as its own
isolate - the shared isolate. This CL prepares to remove the shared
isolate and replace it with shared spaces in the main isolate.

This CL introduces the --shared-space flag to opt-in into this shared
heap-approach. Isolate::is_shared_space_isolate() and
Isolate::shared_space_isolate() are added as well to identify the
main isolate (or shared space isolate).

Bug: v8:13267
Change-Id: I1a79c839de3b3b9cc988401e2e6e70ce3b02fa22
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3874928
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83050}
2022-09-08 07:54:55 +00:00
Jakob Linke
7a6caf0268 [interpreter] Add more owners
.. to increase bus factor in EU time zones.

Change-Id: I7f1bca0fd765f8f1720ff5534823b4daaa290ea3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879488
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83049}
2022-09-08 07:25:48 +00:00
Feng Yu
fee12dde9b [test] Cleanup superfluous test skips
Bug: None
Change-Id: I8cf2e4b651c0ccb784a5d668656cbfcd573b271d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878450
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Feng Yu <f3n67u@gmail.com>
Cr-Commit-Position: refs/heads/main@{#83048}
2022-09-08 06:49:47 +00:00
Dominik Inführ
d2be8de936 [heap] Assume COMPACTION_WAS_ABORTED page flags in ReRecordPage
Set COMPACTION_WAS_ABORTED page flag also when aborting evacuation
due to OOM.

Bug: chromium:1359294, v8:12578
Change-Id: Ia9833dbf9213375698cb7b1595ade7df5e24189d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3877145
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83047}
2022-09-08 06:24:16 +00:00
Frank Tang
0b670eef36 [Temporal] Fix bug in DifferenceTemporalPlainDateTime
The days is passing incorrectly between calls.
Spec text:
https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalplaindatetime

Bug: v8:11544
Change-Id: If818d0f42bdd3260e68eef2c6aba1c3781632c93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3857869
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83046}
2022-09-08 01:48:36 +00:00
Frank Tang
edb902d99e [Temporal] Fix bug in RoundDuration
Access the correct years, months and weeks which modified previously
instead of the value from the input.

Spec text:
https://tc39.es/proposal-temporal/#sec-temporal-roundduration

Bug: v8:11544
Change-Id: I2ffaca5545e2359bc1cc03320068424bba4c7907
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3860649
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83045}
2022-09-08 01:45:06 +00:00
Shu-yu Guo
87ce9fce74 [shared-struct] Rework shared value serializer API again
This CL fixes redesigns the current API, which does not correctly
manage lifetimes of the shared object conveyors.

See design doc at
https://docs.google.com/document/d/1TV6agY9dafVJFvdPrUAGbEvos8wL2WDnsmf84n3OJVU/edit?usp=sharing

This CL also removes the incorrect behavior of serializing all shared
strings by sharing instead of copying. Shared strings may be sent to
another process, which should still work.

Bug: v8:12547
Change-Id: I7413abd2d871fd3d52c9b433445cfa1d03e4a732
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868713
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83044}
2022-09-07 23:41:26 +00:00
Michael Lippautz
99d2934c9a [d8] Fix cov build
Change-Id: I46763c17f7078a3a5730c5a160ec899663ed990b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879483
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83043}
2022-09-07 17:53:16 +00:00
Victor Gomes
df986b4e64 [maglev] Show dead bytecodes when building the graph
Bug: v8:7700
Change-Id: I3da7bbd928e0a587b4eb2c90c86f71405da67323
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876378
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83042}
2022-09-07 16:21:04 +00:00
Michael Achenbach
99d7cfae25 Revert "Port JS-Wasm Promise Integration for arm64"
This reverts commit 0a1a579ad2.

Reason for revert:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20ASAN%20arm64%20-%20debug%20builder/30617/overview

Original change's description:
> Port JS-Wasm Promise Integration for arm64
>
>
> Port Generic JS-Wasm Wrapper for arm64
>
> Change-Id: I256e6511d47af9ab04c577beb6b829dfee34a6ed
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3841074
> Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83038}

Change-Id: I83b6c3596561b56d3df34ac2177aa334780dbf87
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879482
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@{#83041}
2022-09-07 16:13:26 +00:00
Leszek Swirski
f50146176f [maglev] Fix slow path in CheckedInternalizedString
Test for non-string objects in the CheckedInternalizedString slow path.

Bug: v8:7700
Change-Id: Iac82a39ad0a0a93b328f8c574ed0bb7e2f39703b
Fixed: chromium:1360432
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879227
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83040}
2022-09-07 15:28:19 +00:00
Thibaud Michaud
ced65be69f [wasm] Move some code from .h to .cc file
The src/wasm/stacks.h file became progressively bigger, create a
cc file for it and move some function definitions there.

R=clemensb@chromium.org

Bug: v8:12191
Change-Id: I6880a4e11884856bd2f4d777cb745a3c06c71841
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3874936
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83039}
2022-09-07 15:23:46 +00:00
Ilya Rezvov
0a1a579ad2 Port JS-Wasm Promise Integration for arm64
Port Generic JS-Wasm Wrapper for arm64

Change-Id: I256e6511d47af9ab04c577beb6b829dfee34a6ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3841074
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83038}
2022-09-07 14:43:26 +00:00
Dominik Inführ
b1b8190e3a [heap] Add Heap::IsGCWithStack() method
Replace Heap::IsGCWithoutStack() with Heap::IsGCWithStack() to avoid
double-negation.

Bug: chromium:1359294, v8:12578
Change-Id: I8f2e9feb48e574fae6a7721f86a70728b089ec67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878170
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83037}
2022-09-07 14:42:23 +00:00
Dominik Inführ
349837a56a [heap] Revise stress testing for aborting evacuation in middle of page
When stress testing compaction, also abort evacuation for 5% of the
pages somewhere in the middle of the page.

Bug: chromium:1359294, v8:12578
Change-Id: Ie2e9873660ea2c330f175607b443f536f5d3abd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876369
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83036}
2022-09-07 14:41:21 +00:00
Michael Achenbach
fb84e9c72b [test] More logging when terminating workers
Bug: v8:13113
Change-Id: Ib80f4517075f806950d57f97da4e5181248f2276
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879225
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83035}
2022-09-07 14:40:16 +00:00
Leszek Swirski
511f6ed079 [ic] Add leszeks to src/ic/OWNERS
Change-Id: I0c11c0ba51af8e1e1c66ca6cf7e351b54464fd2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879226
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83034}
2022-09-07 14:39:14 +00:00
Jakob Linke
7beee00565 [maglev] Add and enable --stress-maglev on fyi bots
.. which sets the --interrupt-budget-for-maglev to a very low value
s.t.  that tiering to Maglev happens very early. Note this affects
both normal tierup and OSR.

Also add flag handling to fuzzer.py, both as added globally with
probability 0.1, and added to InterruptBudgetFuzzer (which I also
updated with other tiering-related flags).

Bug: v8:7700
Change-Id: I844cf53a6a2da459565d0ad0ccae02b04853cd26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878165
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83033}
2022-09-07 14:38:12 +00:00
Liu Yu
d15d4ec4f8 [loong64][mips64][wasm][simd] Fix SpillAdjacentFpRegisters...
Port commit 8e069d6294

Change-Id: Ifc21ac1bb2d2b93af07ed7b548204b634f1708b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875382
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#83032}
2022-09-07 14:37:09 +00:00
Manos Koukoutos
b5919c416a [wasm-gc] Always use JSToWasmObject at the JS-to-Wasm boundary
- Remove the {ValueRepr} parameter from Wasm table and global object
  internals. It is now the responsibility of the user to transform
  to/from a JS object. This removes duplicate work in some cases (type
  checking in the caller, transforming in the callee).
- For the reverse direction in the JS API, introduce
  {WasmObjectToJSReturnValue}.

Bug: v8:7748
Change-Id: Ie7625cc0f08d38fe74dbe57e69004de2d93b8a11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876184
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83031}
2022-09-07 14:36:05 +00:00
Teodor Dutu
a77183b126 Revert "[ptr-compr-8gb] Align runtime allocations to 8 bytes"
This reverts commit 703b0b31db.

Reason for revert: a simpler approach will be used instead.

Original change's description:
> [ptr-compr-8gb] Align runtime allocations to 8 bytes
>
> In order to support a larger heap cage (8GB, 16GB), the cage offset
> will take up more than 32 bits. As a consequence, for 8GB cages, the
> least significant bit of the cage offset will overlap with the most
> significant bit of the tagged offset. To avoid this, allocations need
> to be aligned to 8 bytes to free up one bit from the offset.
> All changes are deactivated behind the build flag
> `v8_enable_pointer_compression_8gb`.
>
> Bug: v8:13070
> Change-Id: Ibb0bd0177f3e88dcd24fc0ee7526335df0faa987
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791052
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Auto-Submit: Teo Dutu <teodutu@google.com>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82299}

Bug: v8:13070
Change-Id: I5cb60f8e4500c908bdef5d417393edbe89652c9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3877146
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Teo Dutu <teodutu@google.com>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83030}
2022-09-07 14:35:01 +00:00
Matthias Liedtke
569e32af0d Revert "[maglev] Deopt on overflow in >>>"
This reverts commit 24e60017d4.

Reason for revert: Change breaks maglev GC stress tests.

Original change's description:
> [maglev] Deopt on overflow in >>>
>
> Re-enable the int32 fast path for ShiftRightLogical, but account for
> Maglev's missing signed/unsigned representation tracking by a)
> removing rhs==0 as the identity value (a shift by 0 is still a
> signed-unsigned conversion) and b) deoptimizing if the result cannot
> be converted to a non-negative smi.
>
> Note this is not a deopt loop, since a non-smi result will change the
> feedback to kSignedSmallInputs (from kSignedSmall).
>
> To fix this properly, we should track signed/unsigned representations
> and convert the result to a heap number if it doesn't fit within smi
> range.
>
> Bug: v8:7700
> Change-Id: Ifd538d227a6f1290eb7f008d9bfad586ff91ea0f
> Fixed: v8:13251
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876366
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83025}

Bug: v8:7700
Change-Id: Ibd4c29cc57b999e1cfcd040cee3228ea27a74029
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876374
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83029}
2022-09-07 14:02:58 +00:00
Igor Sheludko
f8a99dc81e [ext-code-space] Use Object::SafeEquals() in PrintMentionedObjectCache
... which works for stale pointers. The default == operator contains
a DCHECK guarding against Code vs. non-Code object comparisons and
thus it can't be used for stale pointer.

Bug: chromium:1360793, v8:11880
Change-Id: Ic5faf9b05e1586a15388cc1cbf3e8dcddbea452f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879222
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83028}
2022-09-07 12:39:06 +00:00
Jakob Linke
32f48c47f9 [maglev] Move simple helpers to masm
Bug: v8:7700
Change-Id: I8880a12e67474c630fe3e09dfeb695474e7d2e8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876368
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83027}
2022-09-07 12:23:06 +00:00
Samuel Groß
8137040c3a Reland "[sandbox] Sandboxify ExternalString external pointers"
This is a reland of commit e7bf81100a

Shared string GC issues have been fixed in https://crrev.com/c/3875028

Original change's description:
> [sandbox] Sandboxify ExternalString external pointers
>
> Bug: v8:10391
> Change-Id: I0f737e5adf6e4fd24f93436fa5680ff20c1536da
> 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/+/3757901
> Commit-Queue: Samuel Groß <saelo@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82958}

Bug: v8:10391
Change-Id: I555498973dc9d5dcc4163b3b1258e41d7148e2d5
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/+/3872273
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83026}
2022-09-07 12:15:46 +00:00
Jakob Linke
24e60017d4 [maglev] Deopt on overflow in >>>
Re-enable the int32 fast path for ShiftRightLogical, but account for
Maglev's missing signed/unsigned representation tracking by a)
removing rhs==0 as the identity value (a shift by 0 is still a
signed-unsigned conversion) and b) deoptimizing if the result cannot
be converted to a non-negative smi.

Note this is not a deopt loop, since a non-smi result will change the
feedback to kSignedSmallInputs (from kSignedSmall).

To fix this properly, we should track signed/unsigned representations
and convert the result to a heap number if it doesn't fit within smi
range.

Bug: v8:7700
Change-Id: Ifd538d227a6f1290eb7f008d9bfad586ff91ea0f
Fixed: v8:13251
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876366
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83025}
2022-09-07 12:11:12 +00:00
Marja Hölttä
7b49edbc39 [web snapshot] Test cleanup + remove assertEquals misuse
Some assertEquals:s should've been assertSame.

Drive-by: Coding style fixes
Drive-by: Fix the parameter order of assertEquals, it should be
(expected, found).

Bug: v8:11525
Change-Id: I4e6db32329cbbe455853d19c20abe9d251263505
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3877148
Auto-Submit: Marja Hölttä <marja@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83024}
2022-09-07 12:00:45 +00:00
Dominik Inführ
8a281f52b2 [heap] Randomly abort evacuation while stress testing
Abort evacuation for ~10% of evacuation candidates during stress
testing. This should make aborting of evacuation more frequently and
uncover bugs sooner.

Bug: chromium:1359294, v8:12578
Change-Id: I2fb2124b10456ea71da12df71ef92cf2c3d89c03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878173
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83023}
2022-09-07 11:34:16 +00:00
Yolanda Chen
6a210560dd [compiler] Fix PrintParameter of LoadLane
The laneidx of LoadLaneParameters will be taken as char type when
PrintParameter. Fix operator<< to print laneidx with integer type.

Change-Id: Ibe9992326014d912f9aa09e785c8c3632ed02c06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878768
Auto-Submit: Yolanda Chen <yolanda.chen@intel.com>
Commit-Queue: Yolanda Chen <yolanda.chen@intel.com>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83022}
2022-09-07 10:12:07 +00:00
Jakob Linke
e5eab3d67a [maglev] Add a (mostly empty for now) MaglevAssembler
Bug: v8:7700
Change-Id: Idf4cd2544e7ee3912809cbf95cee4823be36d1dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875905
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83021}
2022-09-07 10:10:16 +00:00
Jakob Linke
49abe45e41 [tiering] Fix active tier detection in OnInterruptTick
We've previously used JSFunction::GetActiveTier, which looks at
JSFunction::code to determine the active tier. However, that may
diverge from the actually active tier (i.e. the calling frame type),
e.g. when Turbofan code is available but we haven't yet tiered up
because we're stuck in a longrunning loop.

With this CL, we determine the caller code_kind by splitting the
BytecodeBudgetInterrupt runtime function up into _Ignition,
_Sparkplug, and _Maglev variants s.t. the tier is passed implicitly
without extra overhead at runtime.

Bug: v8:7700
Change-Id: I46d19c4676e3debb6d608d9fbc53495feef5cadf
Fixed: chromium:1358577
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871196
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83020}
2022-09-07 10:02:16 +00:00