This CL includes db26c89347 (patch set #1)
with fix (patch set #2):
* Include simulator.h explicitly where it is required as it is no
longer included implicitly through other header files.
Original review: https://codereview.chromium.org/2995803002/
When running on the simulator for arm/arm64, compare-and-swap operations
used in VM were synchronized with simulator using mutex.
It heavily impacts performance when doing parallel marking due to high
contention (see #30317).
This synchronization was implemented in order to make simulated
LDREX/STREX instructions aware of CAS performed in VM.
This CL drops this synchronization between VM and simulator:
CAS operations in VM become regular, and simulator remembers value loaded
with load-exclusive and performs CAS when doing store-exclusive to catch
any concurrent modifications.
Speeds up gen_snapshot of flutter benchmark complex_layout from 9.2s
to 8.0s on my MacBook.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2999853002 .
When running on the simulator for arm/arm64, compare-and-swap operations
used in VM were synchronized with simulator using mutex.
It heavily impacts performance when doing parallel marking due to high
contention (see #30317).
This synchronization was implemented in order to make simulated
LDREX/STREX instructions aware of CAS performed in VM.
This CL drops this synchronization between VM and simulator:
CAS operations in VM become regular, and simulator remembers value loaded
with load-exclusive and performs CAS when doing store-exclusive to catch
any concurrent modifications.
Speeds up gen_snapshot of flutter benchmark complex_layout from 9.2s
to 8.0s on my MacBook.
R=asiva@google.com, rmacnak@google.com
Review-Url: https://codereview.chromium.org/2995803002 .
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.
Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2750843003 .
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER
This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/2450713004 .
1. Setting the IC data array. This may have caused corrupt IC data seen by the
background compiler when cloning IC data.
2. Reading the thread_interrupt_disabled_ flag. This was reported as a race with TSAN.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2176803003 .
Remove potentially dangerous (but currently unused) Isolate::stack_limit() accessor.
Add method to test whether interrupts are scheduled, using relaxed memory ordering.
Document and test correct usage by adding a new unit test.
This will be used to periodically check for safepoints in C++ (which will then be equivalent to our generated code).
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1277473004 .