v8/test/unittests
Jakob Linke ee0c7f459d Fix CodeMoveEvent
The invariants in this method are fairly strict since it is called
during object evacution and thus a) objects may be in transitory states
and b) multiple threads are working on evacuation objects concurrently.

Previously, this method ensured valid object accesses because only the
object currently being observed by ProfilingMigrationObserver was
accessed. This changed with crrev.com/c/4178821, where we (incorrectly)
also accessed another object (InstructionStream::code), leading to data
races and incorrect behavior.

This CL fixes that problem by changing LogEventListener API as follows:

 void CodeMoveEvent(InstructionStream from, InstructionStream to);
 void BytecodeMoveEvent(BytecodeArray from, BytecodeArray to);

With this change we again correctly observe invariants, and also remove
one use of AbstractCode.

Bug: v8:13654
Change-Id: Ida022e8c7f14d821e1139f025edc71c20fa386c0
Fixed: chromium:1409786
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194192
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85474}
2023-01-25 13:55:28 +00:00
..
api [compile hints] Collect compile hints data in v8 2023-01-24 16:14:23 +00:00
asmjs [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
assembler Various post-Code rename cleanups 2023-01-18 16:26:26 +00:00
base Adds flag for which sin/cos implementation to use 2022-12-15 15:00:17 +00:00
codegen Various post-Code rename cleanups 2023-01-18 16:26:26 +00:00
compiler [wasm][revec] Reorder load chain to avoid breaking effect dependency 2023-01-19 02:29:35 +00:00
compiler-dispatcher [unittests] Use v8_flags for accessing flag values 2022-09-15 17:51:59 +00:00
date [test] Move cctest/test-date to unittests 2022-04-26 08:14:32 +00:00
debug [debug] Use context isolate when creating PropertyIterator 2022-11-03 19:37:55 +00:00
deoptimizer [deoptimizer] Remove deoptimized code list 2022-11-17 13:32:17 +00:00
diagnostics [gdbjit] Fix overlapping AddressRegion check 2021-08-19 17:29:57 +00:00
execution [execution] Pushed microtask queue suppression must be for current queue 2022-11-07 16:30:13 +00:00
flags [unittests] Use v8_flags for accessing flag values 2022-09-15 17:51:59 +00:00
heap [heap] Re-introduce stack markers 2023-01-24 13:32:55 +00:00
inspector Fix error dispatch in the v8 inspector session. 2023-01-24 07:12:12 +00:00
interpreter [class] set function name for computed fields 2023-01-23 20:10:44 +00:00
js-atomics [shared-struct, api] Support shared isolates in API 2022-08-26 23:41:57 +00:00
libplatform [Tracing w/SDK] Replace TraceStateObserver with TrackEventSessionObserver 2022-12-01 11:18:24 +00:00
libsampler [test] move cctest/libsampler to unittests/libsampler 2022-05-17 09:51:27 +00:00
logging Fix CodeMoveEvent 2023-01-25 13:55:28 +00:00
numbers [test] Move cctest/test-diy-fp to unittests/numbers/ 2022-05-31 07:34:19 +00:00
objects [heap] Enable conservative stack scanning on tests 2022-12-14 16:14:12 +00:00
parser Rename Code to InstructionStream 2023-01-17 12:45:45 +00:00
profiler [test] Move cctest/test-circular-queue to unittests 2022-04-25 14:49:26 +00:00
regexp Rename CodeDataContainer to Code 2023-01-18 08:44:08 +00:00
regress [heap] Remove Factory::NewUninitializedFixedArray 2021-04-26 13:52:38 +00:00
runtime [wasm] Fix inspection of imported wasm tables created in JS 2022-09-22 12:01:44 +00:00
sandbox [sandbox] Initialize sandbox during V8::Initialize 2022-07-15 09:29:32 +00:00
strings [unittests] Use v8_flags for accessing flag values 2022-09-15 17:51:59 +00:00
tasks [unittests] Use v8_flags for accessing flag values 2022-09-15 17:51:59 +00:00
temporal [Temporal] Clean up parser 2022-09-27 20:38:54 +00:00
torque Rename Code to InstructionStream 2023-01-17 12:45:45 +00:00
tracing [test] Move cctest/test-traced-value to unittests/tracing/ 2022-05-30 06:03:18 +00:00
utils Reland "[heap] Transition/Shortcut strings only during GCs without stack" 2022-11-22 16:37:57 +00:00
wasm [wasm-gc] Subtyping: Fix dcheck for nofuncref in type union 2023-01-18 15:25:54 +00:00
web-snapshot [heap] Enable conservative stack scanning on tests 2022-12-14 16:14:12 +00:00
zone [test] Add a unittest platform setup mixin 2022-04-06 13:07:43 +00:00
avoid-windows-h-includes.cc Test that heap-inl.h doesn't include windows.h 2021-10-14 21:18:51 +00:00
BUILD.gn [turbofan] Add the v8_enable_turbofan build option 2023-01-11 10:57:54 +00:00
DEPS Reland "Reland "[test] Move tracing cctest to unittests"" 2022-05-31 16:16:57 +00:00
gay-fixed.cc [test] Move cctest/{test-bignum-dtoa, test-dtoa 2022-05-17 01:38:57 +00:00
gay-fixed.h [test] Move cctest/{test-bignum-dtoa, test-dtoa 2022-05-17 01:38:57 +00:00
gay-precision.cc [test] Move cctest/{test-bignum-dtoa, test-dtoa 2022-05-17 01:38:57 +00:00
gay-precision.h [test] Move cctest/{test-bignum-dtoa, test-dtoa 2022-05-17 01:38:57 +00:00
gay-shortest.cc [test] Move cctest/{test-bignum-dtoa, test-dtoa 2022-05-17 01:38:57 +00:00
gay-shortest.h [test] Move cctest/{test-bignum-dtoa, test-dtoa 2022-05-17 01:38:57 +00:00
run-all-unittests.cc [test] Add perfetto initialisation to unittest runner 2022-06-01 12:32:17 +00:00
test-helpers.cc [compiler-dispatcher] Move Job pointer to SFI 2021-12-08 16:03:35 +00:00
test-helpers.h [compiler] Introduce ReusableUnoptimizedCompileState 2021-12-08 11:14:27 +00:00
test-utils.cc [heap] Convert unittest to avoid using deprecated APIs 2022-12-20 08:12:07 +00:00
test-utils.h [ic] Allow resetting interrupt budget on IC change 2023-01-12 09:35:41 +00:00
testcfg.py [heap] Run unittests for MinorMC variant 2022-11-25 19:47:56 +00:00
unittests.status Skip flaky test 2023-01-16 13:19:26 +00:00
v8_unittests.cml [fuchsia][v8_unittests] migrate v8_unittests.cmx to .cml 2022-08-24 13:36:40 +00:00