We only check the expected stack starting from the call to
foo in main, so we no longer depend on what is captured in
the stacktrace for how main is invoked.
Also removes the old status lines for this test, which are no
longer applicable, and cleans up the documentation a little.
Fixes https://github.com/dart-lang/sdk/issues/39766.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Change-Id: I66746f5a5169bce425bfd1f01a6a912b062e99c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128737
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
REASON: the first commit in the chain contains a change that breaks internal
Flutter roll due to duplicated symbols for type testing stubs in assembly
snapshots.
Revert "[vm/compiler] Add --save-debugging-info flag to gen_snapshot."
This reverts commit c2b6c2e1db.
Revert "[vm] De-obfuscate function and file names in DWARF sections."
This reverts commit 4b8fd3c412.
Revert "[vm] Add docs for DWARF stack traces and related tools/libraries."
This reverts commit 5543e5ceb8.
Revert "[vm] Weaken dwarf_stack_trace expected stack trace."
This reverts commit 5824d3ed53.
Change-Id: I95ecd16fe493f61ae761dabfdd91a6ec0c2f0ca3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128776
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
We only check the expected stack starting from the call to
foo in main, so we no longer depend on what is captured in
the stacktrace for how main is invoked.
Also removes the old status lines for this test, which are no
longer applicable, and cleans up the documentation a little.
Fixes https://github.com/dart-lang/sdk/issues/39766.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Change-Id: I61f0465dcd55d090c49db9c6af503ae9c0df6313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128401
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
This adds runtime/docs/aot_binary_size_analysis.md describing how to
visualize the breakdown of generated code size from our AOT.
Change-Id: I63ae3728db808532fad0ca178e1947e5b8280521
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112397
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This change introduces two new pragmas:
* `@pragma('vm:never-inline')`
* `@pragma('vm:prefer-inline')`
These replaces the old way of specifying AlwaysInline or NeverInline
annotations when the (now removed) --enable-inlining-annotations flag
was used.
Bug: https://github.com/dart-lang/sdk/issues/36571
Change-Id: Iee152c1d67abde8d58c58fa967449d36e77c8c93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110440
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
This reverts commit 629f38cf87.
Reason for revert: This CL seems to depend on constant_update_2018 flag being turned on by default. The CL that turns on constant_update_2018 has been reverted, so this CL is also being reverted.
Original change's description:
> [vm/compiler] Implement new inlining pragmas.
>
> This change introduces two new pragmas:
>
> * `@pragma('vm:never-inline')`
> * `@pragma('vm:prefer-inline')`
>
> These replaces the old way of specifying AlwaysInline or NeverInline
> annotations when the (now removed) --enable-inlining-annotations flag
> was used.
>
> Bug: https://github.com/dart-lang/sdk/issues/36571
> Change-Id: I2495c72819d94e43cefc837d4eb454b7b3d4140c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99148
> Commit-Queue: Teagan Strickland <sstrickl@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>
TBR=sjindel@google.com,sstrickl@google.com
Change-Id: Idc8e8344adb026a308af20c8b0d0224edb891d9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36571
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109320
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This change introduces two new pragmas:
* `@pragma('vm:never-inline')`
* `@pragma('vm:prefer-inline')`
These replaces the old way of specifying AlwaysInline or NeverInline
annotations when the (now removed) --enable-inlining-annotations flag
was used.
Bug: https://github.com/dart-lang/sdk/issues/36571
Change-Id: I2495c72819d94e43cefc837d4eb454b7b3d4140c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99148
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
This makes it an actual Pub package like most other code inside the SDK
repo. The main goal is to make it easier to write tests for the test
runner itself.
This change:
- Moves all of the code from tools/testing/dart/ over to
pkg/test_runner. Most of it ends up under test_runner/lib/src.
- Move tools/testing/dart/main.dart to
pkg/test_runner/bin/test_runner.dart.
- Move standalone_2/io/test_runner_test.dart to
pkg/test_runner/test/test_runner_test.dart. I don't think it currently
works, but it wasn't being run in its old location either.
- Add test_runner to the analysis-server bot. This ensures the
test_runner package is static error clean.
- Remove standalone_2/io/test_runner_analyze_test.dart which used to
attempt to do the above and is no longer needed.
- Update test.py to look for the test runner at its new location.
- Add test_runner to the repo .packages file and remove the weird
test_dart pseudo-package. (I think this fixes #35279.)
- Remove status file entries for the removed standalone_2 tests.
There are no code changes to the test runner itself aside from fixing
up import paths.
Change-Id: I3d05d50d222b291848fa5a30de2846e803bc81e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105821
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Two fixes:
- Make entrypoints_verification_test work on configurations where CFE compilation
is separate from execution.
- Add missing entry-point annotation for Windows.
The original revision is in patchset 1.
Change-Id: I6c4b52b1bae7bc730546dad6a3e31d8625f850b1
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/90942
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This reverts commit 0203243381.
Reason for revert: breaking several bots
Original change's description:
> [vm] Prevent access to non-annotated members through native API.
>
> We will issue warnings and throw an API error when the native API is used to access members which were not appropriately
> annotated as entry-points, if the flag "--verify-entry-points" is passed.
>
> Also, fixes Class::Invoke against fields (isn't allowed through native API but
> could be allowed with mirrors, and is inconsistent with Library::Invoke behavior).
>
> I've checked locally that this would have caught the bug in
> "Wrap the user entrypoint function in a zone with native exception callback. (#7512)".
>
> Change-Id: I617c71e1965457c956c97761359765bb9bb18c1c
> Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/90060
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
TBR=alexmarkov@google.com,sjindel@google.com
Change-Id: I554b389780e4ba652183c044b040b0c524beb5c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/90841
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
We will issue warnings and throw an API error when the native API is used to access members which were not appropriately
annotated as entry-points, if the flag "--verify-entry-points" is passed.
Also, fixes Class::Invoke against fields (isn't allowed through native API but
could be allowed with mirrors, and is inconsistent with Library::Invoke behavior).
I've checked locally that this would have caught the bug in
"Wrap the user entrypoint function in a zone with native exception callback. (#7512)".
Change-Id: I617c71e1965457c956c97761359765bb9bb18c1c
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/90060
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This reverts commit 41f3d4326e.
Reason for revert: I hit +2 by accident when I wanted to submit do a dry run
Original change's description:
> [vm/compiler] Express control dependence as data dependence.
>
> Rationale:
> This provides a more robust way of expressing control
> dependences between bounds checks and their uses, while
> still allowing for CSE and LICM where possible.
> This also fixes the original bug that started this
> whole redesign: invalid LICM of checkbound.
>
> Note:
> Deals with bounds check, null check still TBD.
>
> Mini design doc:
> runtime/docs/compiler/data_dep_for_control_dep.md
>
> https://github.com/dart-lang/sdk/issues/35139
> https://github.com/dart-lang/sdk/issues/34684
> https://github.com/dart-lang/sdk/issues/30633
>
> Change-Id: Icfbd3ca60662e37046e48b95be7f81d05d94af88
> Reviewed-on: https://dart-review.googlesource.com/c/85470
> Commit-Queue: Aart Bik <ajcbik@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,asiva@google.com,ajcbik@google.com
Change-Id: Id20699f957681c248851b37d545b330fd4972d7a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/85522
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Rationale:
This provides a more robust way of expressing control
dependences between bounds checks and their uses, while
still allowing for CSE and LICM where possible.
This also fixes the original bug that started this
whole redesign: invalid LICM of checkbound.
Note:
Deals with bounds check, null check still TBD.
Mini design doc:
runtime/docs/compiler/data_dep_for_control_dep.md
https://github.com/dart-lang/sdk/issues/35139https://github.com/dart-lang/sdk/issues/34684https://github.com/dart-lang/sdk/issues/30633
Change-Id: Icfbd3ca60662e37046e48b95be7f81d05d94af88
Reviewed-on: https://dart-review.googlesource.com/c/85470
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
A field/function annotated with this pragma must be guaranteed to not
return `null` at runtime.
Make use of this non-nullable annotation in the VM's type propagator.
Annotates the "_TypedListView._typedData" field to ensure the VM knows it
returns a non-nullable _TypedListView.
Furthermore annotates methods on the integer implementation. Those particular
methods are recognized methods with a "dynamic" return type. This caused
the type propagator to use CompileType::Dynamic() as result type. Since a
previous CL started to only utilize the annotated type if it is better than
"dynamic" more integer operations got handled in-line, though with null-checks.
Annotating those methods to return non-null improves the in-line handling of
integer operations.
This improves dart-aot
On arm7hf:
SHA256: +5%, SHA: +6%, JsonObjectRoundTrip: +7%, ...
On arm8:
SHA1: +28%, MD5: +25%, SHA256: +15%, TypedData.Int16ListViewBench: +18.5%, StringInterpolation: +18%, ...
Issue https://github.com/dart-lang/sdk/issues/31954
Issue https://github.com/dart-lang/sdk/issues/35154
Change-Id: Ia4263a37241a36c9dc35e8a48893297effa6f4b2
Reviewed-on: https://dart-review.googlesource.com/c/84421
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Currently the @pramga('vm:exact-result-type') annotation only works if
the function is a recognized method. This change changes that to make
the VM just look if a function has the annotation (no matter if it's
also in the list of recognized methods or not).
Furthermore this CL lets the type propgagator use
@pragma('vm:exact-result-type') annotations to narrow the [CompileType]
set on [LoadFieldInstr]s.
Since the @pragma is a general feature, this CL moves the
`Function::FindPragma()` to `Library::FindPragma` (which is where any
other metadata lookup happens). We also let the `FindPragma` accept any
of Class/Function/Field objects.
Furthermore the `FindPragma()` function is fixed to handle the case
when the evaluation of the metadata results in an error.
In this case we simply claim to not have found a pragma annotation.
Issue https://github.com/dart-lang/sdk/issues/31954
Change-Id: If03f566e334cd53549985823ee3dd6b5e9672969
Reviewed-on: https://dart-review.googlesource.com/c/85163
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This reverts commit 2de63ac01c.
Reason for revert: This triggers shutdown deadlocks for some reason:
#0 0xf7782cd9 __kernel_vsyscall
#1 0xf7753d0b pthread_cond_wait@@GLIBC_2.3.2
#2 0x0108a515 dart::Monitor::WaitMicros(long long)
#3 0x0108a467 dart::Monitor::Wait(long long)
#4 0x00fe9048 dart::KernelIsolate::Shutdown()
#5 0x00f99ae4 dart::Dart::Cleanup()
#6 0x01278fce Dart_Cleanup
#7 0x00dd347e dart::bin::main(int, char**)
#8 0x00dd3d64 main
#9 0xf745caf3 __libc_start_main
#10 0x00dd2021 _start
TID 30443:
#0 0xf7782cd9 __kernel_vsyscall
#1 0xf7531ee6 epoll_wait
#2 0x00ddab61 dart::bin::EventHandlerImplementation::Poll(unsigned int)
#3 0x00dfb2d4 dart::bin::ThreadStart(void*)
#4 0xf774ff72 start_thread
#5 0xf753143e __clone
TID 30444:
#0 0xf7782cd9 __kernel_vsyscall
#1 0xf7753d0b pthread_cond_wait@@GLIBC_2.3.2
#2 0x0108a515 dart::Monitor::WaitMicros(long long)
#3 0x0108a467 dart::Monitor::Wait(long long)
#4 0x012484d8 dart::BackgroundCompiler::Run()
#5 0x01248a37 dart::BackgroundCompilerTask::Run()
#6 0x0112203a dart::ThreadPool::Worker::Loop()
#7 0x01121efe dart::ThreadPool::Worker::Main(unsigned int)
#8 0x01089e73 dart::ThreadStart(void*)
#9 0xf774ff72 start_thread
#10 0xf753143e __clone
Original change's description:
> [VM] Add @pragma annotations on Field, make @pragma annotations work generally
>
> Currently the @pramga('vm:exact-result-type') annotation only works if
> the function is a recognized method. This change changes that to make
> the VM just look if a function has the annotation (no matter if it's
> also in the list of recognized methods or not).
>
> Furthermore this CL adds a "has_pragma" bit to [Field] objects, similar
> to how we have it on [Function]/[Class]es. This allows annotating
> fields with types, as we do with function return types.
>
> Furthermore this CL lets the type propgagator use
> @pragma('vm:exact-result-type') annotations to narrow the [CompileType]
> set on [LoadFieldInstr]s.
>
> Since the @pragma is a general feature, this CL moves the
> `Function::FindPragma()` to `Library::FindPragma` (which is where any
> other metadata lookup happens). We also let the `FindPragma` accept any
> of Class/Function/Field objects.
>
> Furthermore this CL adds a bailout if we try to evaluate metadata in
> the background compiler, since the background compiler is not allowed
> to execute generated code. The bailout should trigger a re-compilation
> on the mutator thread.
>
> Furthermore the `FindPragma()` function is fixed to handle the case
> when the evaluation of the metadata results in e.g. a language error.
> In this case we simply claim to not have found a pragma annotation.
>
> Issue https://github.com/dart-lang/sdk/issues/31954
>
> Change-Id: I0900a80d5ae0f3e8d09baf13cba1b20dd974df31
> Reviewed-on: https://dart-review.googlesource.com/c/84037
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com,alexmarkov@google.com,sjindel@google.com
Change-Id: Ic0d22d32b0eea3a76ec245cabab0006f97ca1b05
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/84622
Reviewed-by: Martin Kustermann <kustermann@google.com>
Currently the @pramga('vm:exact-result-type') annotation only works if
the function is a recognized method. This change changes that to make
the VM just look if a function has the annotation (no matter if it's
also in the list of recognized methods or not).
Furthermore this CL adds a "has_pragma" bit to [Field] objects, similar
to how we have it on [Function]/[Class]es. This allows annotating
fields with types, as we do with function return types.
Furthermore this CL lets the type propgagator use
@pragma('vm:exact-result-type') annotations to narrow the [CompileType]
set on [LoadFieldInstr]s.
Since the @pragma is a general feature, this CL moves the
`Function::FindPragma()` to `Library::FindPragma` (which is where any
other metadata lookup happens). We also let the `FindPragma` accept any
of Class/Function/Field objects.
Furthermore this CL adds a bailout if we try to evaluate metadata in
the background compiler, since the background compiler is not allowed
to execute generated code. The bailout should trigger a re-compilation
on the mutator thread.
Furthermore the `FindPragma()` function is fixed to handle the case
when the evaluation of the metadata results in e.g. a language error.
In this case we simply claim to not have found a pragma annotation.
Issue https://github.com/dart-lang/sdk/issues/31954
Change-Id: I0900a80d5ae0f3e8d09baf13cba1b20dd974df31
Reviewed-on: https://dart-review.googlesource.com/c/84037
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@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>
Previously we tried to rely on the assumption that all variables would be
boxed - so the machinery for setting correct catch-entry state only
supported tagged values and constants. However this both leads to worse code
and is not entirely correct assumption.
This also:
- renames various confusingly named classes: we move away from talking
about "catch entry state" to "catch entry moves" - because we only
record a subset of moves that needs to be performed and that does
not describe the whole state;
- refactors a bunch of associated code to be more readable and maintainable;
- adds documentation about catch implementation in optimized code
to runtime/docs/compiler;
Fixes https://github.com/flutter/flutter/issues/21685.
Change-Id: I03ae361a1bb7710acbd9f661ae014e663a163c59
Reviewed-on: https://dart-review.googlesource.com/74860
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
We need to block interrupts while evaluating pragmas to prevert reentrant class finalization.
Original revision is in patchset 0.
Change-Id: I872cec4eaf4ca85567c9657c458ed39c8b2e30de
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try, vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/73160
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Test Plan:
Behavioral correctness should be ensured by existing tests. Tests in vm/dart/entrypoints
ensure that the unchecked entrypoint is used in cases where the optimization should trigger.
Bug: https://github.com/dart-lang/sdk/issues/31798
Change-Id: I5b880b2dfa6343b4bb0a96ad23562facff73e41f
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/69741
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>