condition that is causing intermittent crashes. The fix for the race is
a bit involved as it requires changing the IdleNotifier class to avoid
the lock inversion issue.
Change-Id: Id724276a68567e48297bd086d828abee63d129ee
Reviewed-on: https://dart-review.googlesource.com/c/82525
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
- Convert _List.[]= and _List._setIndexed to graph intrinsics.
- Remove _GrowableList.add intrinsics (dead since Dart 2).
Eliminates need to shuffle registers at the assembler level when introducing card-remembering.
Change-Id: Ia94ae3229a5eb90215ac74ab624db843a0cda01c
Reviewed-on: https://dart-review.googlesource.com/c/82380
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This makes the ImageWriter remember at which offsets it wrote
RawInstructions.
This is preparation work for allowing the ImageWriter write the
instructions in a specific order (currently instructions are written
"on-demand" when the object serializer encounters references to them)
Issue https://github.com/dart-lang/sdk/issues/33274
Change-Id: Ie50cf8a600dd4e9ce0413fe4189d4f2211f0325e
Reviewed-on: https://dart-review.googlesource.com/c/82065
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
On a Flutter app scrolling through a large table running on a Moto G 4, max pause time reduces from 129ms to 52ms.
Before
6-44ms CollectNewGeneration
118-129ms CollectOldGeneration
After
6-52ms CollectNewGeneration
3-10ms StartConcurrentMarking
20-42ms CollectOldGeneration (i.e., finalize marking)
Code size increases on Flutter Gallery:
ARM32 Instructions(CodeSize): 5772688 -> 5968624 (+3.39%)
ARM64 Instructions(CodeSize): 6082400 -> 6251008 (+2.77%)
Bug: https://github.com/dart-lang/sdk/issues/34002
Change-Id: Iac9a0b3d91b497b5016c4f89e8779c488f105a5b
Reviewed-on: https://dart-review.googlesource.com/c/76780
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Threads in the native or blocked states don't prevent safepoints, so they may run concurrently with a safepoint operation like GC. It is not safe for handles to be allocated while the GC is visiting them, so these threads must not allocate handles. Assert only threads in the VM or generated states, which prevent safepoints until they check in, may allocate handles. (Generated code does not allocate handles, but leaf runtime entries remain in the generated state.)
Bug: https://github.com/dart-lang/sdk/issues/34883
Change-Id: I1a211778f7ef96b53a2405f0ee9dde7871b122b6
Reviewed-on: https://dart-review.googlesource.com/c/81540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
* On Windows dump stacks from all collected dumps into the output so
that one would not need to download the dump to analyse it.
* Document crash dump archiving so that engineers know where to look
for dumps and how look at them.
Change-Id: Ibf53bb597c07702b3e051cf24bea8f6bfb1d5e8f
Reviewed-on: https://dart-review.googlesource.com/c/82066
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
When using a concatenated dill file, several scripts with the same URL
can exist. They are not the same though, and should not be treated as
such.
Bug: #34841
Change-Id: Icd46357ffcf72ed35251b2a2793e1f83c02c4a8e
Reviewed-on: https://dart-review.googlesource.com/c/80821
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This reverts commit c1e6140323.
Reason for revert:
On Windows
.\out\DebugX64\run_vm_tests.exe --dfe=out\DebugX64\gen\kernel-service.dart.snapshot IsolateReload_TearOff_List_Set
fails with:
sdk\runtime\vm\raw_object.cc: 231: error: Size mismatch: -2459565876494606883 from class vs 112 from tags c0718
Original change's description:
> Reland: [vm] Add a library and class cache to KernelProgramInfo
>
> Relands with fixed locking to protect the caches.
>
> Original message:
> Also create fewer handles in the KernelLoader.
>
> GenKernelKernelReadAllBytecode improves a further
> 15-20% after removing the timeline event argument
> in the bytecode reader.
>
> fixes#34939
>
> Change-Id: I88c57bdb673392a7677c5c6bbb16cfed8c95c0d7
> Reviewed-on: https://dart-review.googlesource.com/c/81620
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
TBR=rmacnak@google.com,alexmarkov@google.com,zra@google.com,asiva@google.com
Change-Id: I4f3ff1866db2990b512b3ee7e59bf66bdc480dcc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/81745
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Relands with fixed locking to protect the caches.
Original message:
Also create fewer handles in the KernelLoader.
GenKernelKernelReadAllBytecode improves a further
15-20% after removing the timeline event argument
in the bytecode reader.
fixes#34939
Change-Id: I88c57bdb673392a7677c5c6bbb16cfed8c95c0d7
Reviewed-on: https://dart-review.googlesource.com/c/81620
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This reverts commit 0170b8d529.
Reason for revert:
The underlying problem has been fixed.
Original change's description:
> Revert "[vm/compiler] Use loop framework for AOT inline heuristics"
>
> This reverts commit daae20d32e.
>
> Reason for revert:
>
> The kernel-precomp bots are seeing this error:
>
> ../../runtime/vm/object.h: 3134: error: Handle check failed: saw 2249186640 expected Function
>
> Not sure what that is yet, but reverting to get bots green again while I investigate.
>
>
> Original change's description:
> > [vm/compiler] Use loop framework for AOT inline heuristics
> >
> > Rationale:
> > Without proper execution counters, the inline AOT inliner
> > marks every call site "cold", effectively disabling inlining
> > altogether. This change introduces loop-based static heuristic
> > that assumes statements nested inside loops are executed more
> > frequently. This results in more inlining.
> >
> > Note:
> > Conservative version is used for now which yields
> > more performance without increasing code size too much.
> > There is still a lot of performance left at the table
> > which we could exploit if we fine tune heuristics
> > regarding code size.
> >
> > Bug:
> > https://github.com/dart-lang/sdk/issues/34473
> > https://github.com/dart-lang/sdk/issues/32167
> >
> >
> > Change-Id: I86ba60f93bdab363cd22ab6bdbcf6688f2042fea
> > Reviewed-on: https://dart-review.googlesource.com/c/81187
> > Commit-Queue: Aart Bik <ajcbik@google.com>
> > Reviewed-by: Alexander Markov <alexmarkov@google.com>
>
> TBR=vegorov@google.com,alexmarkov@google.com,ajcbik@google.com
>
> Change-Id: If5ca82966966ebef4ec0b4e921515d23f6bd492b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/81335
> Reviewed-by: Aart Bik <ajcbik@google.com>
> Commit-Queue: Aart Bik <ajcbik@google.com>
TBR=vegorov@google.com,alexmarkov@google.com,ajcbik@google.com
Change-Id: I8c160f59f8e91782f235cbcea607aef4227963f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/81500
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Previously MoveSpecial bytecode instruction used unsigned 8-bit A field
to encode target local variable index. This is too restrictive as we allow
signed 16-bit local variable indices.
After this change MoveSpecial has A_X encoding, with A field used for
special index (0 or 1), and signed 16-bit X field used for target local.
Change-Id: Ib87992e192b2923a39a9968913c39476947d3ea5
Reviewed-on: https://dart-review.googlesource.com/c/81440
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>