The CpuProfile previously emitted a CpuProfileMaxSamplesCallbackTask
if there was a sample where V8 could not resolve the stack.
This resulted in a premature "samplebufferfull" events for the
self-profiling API.
Skipping over samples without a resolved stack solves this issue.
Bug: chromium:1334366
Change-Id: If7a375dbf533c391307e8e506b37c0e3705f63b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776680
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81871}
The previous declaration was failing on GCC, because the argument types
did not match the actual constructor. The second parameter needs to be a
reference.
R=jkummerow@chromium.org
Bug: v8:13069
Change-Id: I151b44e05cd8b45da8f737ab84da063e491f3292
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779683
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81866}
Introduce `TraceStrongContainer()` to retain containers strongly. This
makes the use of `Trace(T*)` obsolete as all other use cases should
refer to Member overloads.
Bug: v8:13089
Change-Id: Ib0e762bf3298f1818528e45cc842d14a63f2c684
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779680
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81864}
Some tests and testing infrastructure had to be changed because it
relied on nominal types.
Drive-by: Support function supertypes in wasm-module-builder.js.
Bug: v8:7748
Change-Id: Ife92431d1842ff9de91e296a50421aa48f02c0de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776197
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81862}
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}
In order to make the shared code write barrier thread-safe, we simply
lock the page mutex when appending to the typed_slot_set. We can later
improve this when performance isn't good enough.
Bug: v8:13018
Change-Id: I5e12f83f459f8976c22ec488cfa9b6f16d4a8a8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763867
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81855}
Enable a clang warning that embedders might enable, and fix issues
found by it.
R=ahaas@chromium.org, nicohartmann@chromium.org, mlippautz@chromium.org
Bug: v8:13069
Change-Id: I935f18872178f4421b441f33ef8ab1d8f030dfc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760443
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81853}
Instead of one big test which tests multiple functions, split the unit
test into multiple smaller tests.
Also, use TestWithZone instead of TestWithIsolate, because the isolate
is never used.
R=jkummerow@chromium.org
Bug: v8:12425
Change-Id: I32148e40b5ed2b006cc647d42bdfe564ccc6d0ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776676
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81852}
This reverts commit 218d17d3ff.
Reason: Temporary things should be temporary.
Bug: v8:11111
Change-Id: Ic7c9d01d4c75863ceee89efe8493da3a84eb0894
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776683
Auto-Submit: Marja Hölttä <marja@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81851}
Setting the highest bit first saves cost for repeatedly growing the
underlying bitvector.
R=jkummerow@chromium.org
Bug: v8:13063
Change-Id: Ic324caa20c91dd6f55760944c3dafe7f1dc018b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776340
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81849}
Pop the correct number of bytes from the stack on return from the
WasmResume builtin.
R=ahaas@chromium.org
Bug: v8:13078
Change-Id: Ie1fffe1d02baab0ed91deca7dccadf1539068dd8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776338
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81848}
This way we make tests more flexible wrt. future changes, especially
when it comes to module offsets.
Bug: v8:12868
Change-Id: Ie99806603603e5c731c61267469b14f81c88ffac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776195
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81846}
By making "v8_heap_base_headers" a "v8_header_set" instead of
a "v8_source_set".
Reported by Paul Harris on v8-users@.
Change-Id: I33263230631766e73f5d13aab497c47c98f807b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776339
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81845}
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}
This CL hardens a test to avoid static_cast-ing doubles that don't fit
into the 32-bit integer range.
Bug: chromium:1344965
Change-Id: I1f3a05800158cda9dc582bfa4427516932db9679
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776337
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81843}
Now that the main thread has its own LocalHeap, we don't need a
separate instance of MarkingBarrier in Heap for the main thread
anymore. We can just use the MarkingBarrier in
main_thread_local_heap(). This makes code between main and background
threads more uniform.
Bug: v8:13018
Change-Id: I3d2dab1b11815df9a92c2fa7eebf52bf2cb130f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3769687
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81841}
Tasks may contain Globals, which have to get destroyed before isolate
shutdown.
R=cbruni@chromium.org
Bug: chromium:1345081
Change-Id: I915baafd870c7bb8475b19736878179d8a22ca5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3770108
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81840}
Normalize flag names, and print boolean flags using the canonical
"--no-<foo>" syntax.
Before (with fuzzing):
Cycle in flag implications:
assert_types -> concurrent_recompilation = 0
stress_concurrent_inlining -> concurrent_recompilation = 1
After (with fuzzing):
Cycle in flag implications:
--assert-types -> --no-concurrent-recompilation
--stress-concurrent-inlining -> --concurrent-recompilation
Before (no fuzzing):
Contradictory flag implications from --assert_types and
--stress_concurrent_inlining for flag concurrent_recompilation
After (no fuzzing):
Contradictory flag implications from --assert-types and
--stress-concurrent-inlining for flag --concurrent-recompilation
R=tebbi@chromium.org
Bug: chromium:1336577
Change-Id: Id82cff4845d845e964c43b922067905b8b378a0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3750935
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81839}
This reverts commit 9981f2e592.
Reason for revert: This CL landed by accident, we decided back then to land a different CL.
Original change's description:
> [d8] quit() should not dispose the isolate
>
> R=cbruni@chromium.org
>
> Bug: chromium:1338150
> Change-Id: I5e5f8ede942dd37112766812a3c84a356f0b6ca9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3714355
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81827}
Bug: chromium:1338150
Change-Id: Ib058d90a0c09e7cc65bdecee20580dd9e1f184d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773776
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81838}
This CL re-structures the write barrier slow path in order to prepare
for adding the shared write barrier. Behavior remains the same in this
CL, only code structure changes a bit (e.g. the branch for when
marking is off, got moved up to the IsMarking() check).
Bug: v8:13018
Change-Id: I991f896abb88e0c85de3123fa67d8f47282f632d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3771840
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81836}
We will provide a replacement for raw pointers in future which should
only be used by backing stores. Any other callsite must go through
Trace(BasicMember<>).
Bug: v8:13089
Change-Id: Ibdae439b44ad94bd7af2532855be941c5334db99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3772328
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81833}
This CL fixes macro-asm to take in scratch registers as arguments.
Change-Id: Ib6070c9a9df050ce201d36027a0be44c77a54ba3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773875
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81832}
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}
The used_or_unused_instance_size_in_words field already determines
whether the used fields are in- or out-of-object, so we can use it's
value for a fast HasOutOfObjectProperties check rather than using
NumberOfFields (which includes an iteration over the descriptor
array).
Change-Id: I6c5b4f3f793b8df7832def7465106f2af7306759
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1718152
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81828}
This is a reland of commit c66a80172e
The reland suppresses the deprecation warning on windows for
google_benchmark.
Original change's description:
> Update V8 DEPS
>
> Rolling both trusted-versions and trusted-origins and an additional patch coming from https://crrev.com/c/3706887.
>
> Rolling v8/buildtools/third_party/libc++/trunk: b126981..88bf407
>
> Rolling v8/buildtools/third_party/libunwind/trunk: 49191c5..955e2ff
>
> Rolling v8/third_party/depot_tools: 8168f76..f05fcf7
>
> Rolling v8/build: 679de1e..6e435d6
>
> Rolling v8/buildtools: 5cee6a2..a4506d5
>
>
>
> R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com
>
> Bug: chromium:1345621
> Change-Id: I0659a5f98c83bbc6f061259e798a4b85a7cd7c63
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3766889
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81815}
Bug: chromium:1345621
Change-Id: I2975ca6ae04c99a9e53f3bbd6872b7d114febb7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773775
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81823}