From de43a7c16a9fa94469b9b5516e7e998420716235 Mon Sep 17 00:00:00 2001 From: Alexander Markov Date: Fri, 10 Jun 2022 13:41:24 +0000 Subject: [PATCH] [vm] Cleanup --lazy-async-stacks VM option This option was enabled by default in https://dart-review.googlesource.com/c/sdk/+/149288 This change removes old logic behind --no-lazy-async-stacks and makes --lazy-async-stacks/--no-lazy-async-stacks options no-op. TEST=ci Change-Id: I5726690e90e78dd2ac37d8c5944e388042fc3acf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247780 Commit-Queue: Alexander Markov Reviewed-by: Slava Egorov --- .../async_single_step_exception_test.dart | 16 +- .../test/async_single_step_into_test.dart | 10 +- .../test/async_single_step_out_test.dart | 12 +- .../async_star_single_step_into_test.dart | 16 +- .../test/async_star_step_out_test.dart | 20 +- pkg/vm_service/test/async_step_out_test.dart | 14 +- .../awaiter_async_stack_contents_2_test.dart | 2 +- .../awaiter_async_stack_contents_test.dart | 2 +- .../causal_async_stack_contents_test.dart | 2 +- .../causal_async_stack_presence_test.dart | 2 +- ...causal_async_star_stack_contents_test.dart | 2 +- ...causal_async_star_stack_presence_test.dart | 2 +- pkg/vm_service/test/common/test_helper.dart | 2 +- pkg/vm_service/test/get_stack_test.dart | 2 +- runtime/bin/analyze_snapshot.cc | 2 - runtime/lib/stacktrace.cc | 48 +---- .../async_single_step_exception_test.dart | 2 +- .../service/async_single_step_into_test.dart | 2 +- .../service/async_single_step_out_test.dart | 2 +- .../async_star_single_step_into_test.dart | 2 +- .../service/async_star_step_out_test.dart | 2 +- .../tests/service/async_step_out_test.dart | 2 +- .../awaiter_async_stack_contents_2_test.dart | 2 +- .../awaiter_async_stack_contents_test.dart | 2 +- .../causal_async_stack_contents_test.dart | 2 +- .../causal_async_stack_presence_test.dart | 2 +- ...causal_async_star_stack_contents_test.dart | 2 +- ...causal_async_star_stack_presence_test.dart | 2 +- .../service/get_stack_limit_rpc_test.dart | 2 - .../next_through_simple_async_test.dart | 4 +- ...hrough_simple_async_with_returns_test.dart | 4 +- ...e_on_unhandled_async_exceptions2_test.dart | 4 +- ...se_on_unhandled_async_exceptions_test.dart | 2 +- .../tests/service/test_helper.dart | 2 +- .../async_single_step_exception_test.dart | 2 +- .../async_single_step_into_test.dart | 2 +- .../service_2/async_single_step_out_test.dart | 2 +- .../async_star_single_step_into_test.dart | 2 +- .../service_2/async_star_step_out_test.dart | 2 +- .../tests/service_2/async_step_out_test.dart | 2 +- .../awaiter_async_stack_contents_2_test.dart | 2 +- .../awaiter_async_stack_contents_test.dart | 2 +- .../causal_async_stack_contents_test.dart | 2 +- .../causal_async_stack_presence_test.dart | 2 +- ...causal_async_star_stack_contents_test.dart | 2 +- ...causal_async_star_stack_presence_test.dart | 2 +- .../service_2/get_stack_limit_rpc_test.dart | 2 - .../next_through_simple_async_test.dart | 4 +- ...hrough_simple_async_with_returns_test.dart | 4 +- ...e_on_unhandled_async_exceptions2_test.dart | 4 +- ...se_on_unhandled_async_exceptions_test.dart | 2 +- .../tests/service_2/test_helper.dart | 2 +- ...c_throws_stack_lazy_non_symbolic_test.dart | 2 +- .../async_throws_stack_lazy_test.dart | 2 - ...ows_stack_no_causal_non_symbolic_test.dart | 17 -- .../async_throws_stack_no_causal_test.dart | 11 - .../flutter_regress_100441_test.dart | 2 - .../tests/vm/dart/causal_stacks/utils.dart | 203 ------------------ runtime/tests/vm/dart/regress40189_test.dart | 2 - ...c_throws_stack_lazy_non_symbolic_test.dart | 2 +- .../async_throws_stack_lazy_test.dart | 2 - ...ows_stack_no_causal_non_symbolic_test.dart | 19 -- .../async_throws_stack_no_causal_test.dart | 13 -- .../flutter_regress_100441_test.dart | 2 - .../tests/vm/dart_2/causal_stacks/utils.dart | 203 ------------------ .../tests/vm/dart_2/regress40189_test.dart | 2 - .../frontend/kernel_binary_flowgraph.cc | 2 +- runtime/vm/compiler/frontend/scope_builder.cc | 2 +- runtime/vm/compiler/jit/compiler.cc | 1 - runtime/vm/debugger.cc | 56 ++--- runtime/vm/debugger.h | 1 - runtime/vm/flag_list.h | 2 +- runtime/vm/kernel_loader.cc | 10 +- runtime/vm/stack_trace.cc | 83 +------ runtime/vm/stack_trace.h | 33 +-- .../vm/lazy_async_exception_stack2_test.dart | 2 - .../vm/lazy_async_exception_stack_test.dart | 10 +- .../vm/lazy_async_exception_stack2_test.dart | 2 - .../vm/lazy_async_exception_stack_test.dart | 10 +- tests/standalone/lazy_async_stack_test.dart | 2 - tests/standalone_2/lazy_async_stack_test.dart | 2 - 81 files changed, 133 insertions(+), 805 deletions(-) delete mode 100644 runtime/tests/vm/dart/causal_stacks/async_throws_stack_no_causal_non_symbolic_test.dart delete mode 100644 runtime/tests/vm/dart/causal_stacks/async_throws_stack_no_causal_test.dart delete mode 100644 runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_no_causal_non_symbolic_test.dart delete mode 100644 runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_no_causal_test.dart diff --git a/pkg/vm_service/test/async_single_step_exception_test.dart b/pkg/vm_service/test/async_single_step_exception_test.dart index 3a093dee1e7..31f53948c7a 100644 --- a/pkg/vm_service/test/async_single_step_exception_test.dart +++ b/pkg/vm_service/test/async_single_step_exception_test.dart @@ -1,20 +1,18 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'dart:developer'; import 'common/service_test_common.dart'; import 'common/test_helper.dart'; -const LINE_A = 20; -const LINE_B = 21; -const LINE_C = 26; -const LINE_D = 28; -const LINE_E = 31; -const LINE_F = 34; -const LINE_G = 36; +const LINE_A = 18; +const LINE_B = 19; +const LINE_C = 24; +const LINE_D = 26; +const LINE_E = 29; +const LINE_F = 32; +const LINE_G = 34; helper() async { print('helper'); // LINE_A. diff --git a/pkg/vm_service/test/async_single_step_into_test.dart b/pkg/vm_service/test/async_single_step_into_test.dart index 604e00b49b5..e5f77f79f21 100644 --- a/pkg/vm_service/test/async_single_step_into_test.dart +++ b/pkg/vm_service/test/async_single_step_into_test.dart @@ -1,17 +1,15 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'dart:developer'; import 'common/service_test_common.dart'; import 'common/test_helper.dart'; -const LINE_A = 17; -const LINE_B = 18; -const LINE_C = 23; -const LINE_D = 24; +const LINE_A = 15; +const LINE_B = 16; +const LINE_C = 21; +const LINE_D = 22; helper() async { print('helper'); // LINE_A. diff --git a/pkg/vm_service/test/async_single_step_out_test.dart b/pkg/vm_service/test/async_single_step_out_test.dart index 71f951770aa..c3da030bc71 100644 --- a/pkg/vm_service/test/async_single_step_out_test.dart +++ b/pkg/vm_service/test/async_single_step_out_test.dart @@ -1,18 +1,16 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'dart:developer'; import 'common/service_test_common.dart'; import 'common/test_helper.dart'; -const LINE_A = 18; -const LINE_B = 19; -const LINE_C = 24; -const LINE_D = 25; -const LINE_E = 26; +const LINE_A = 16; +const LINE_B = 17; +const LINE_C = 22; +const LINE_D = 23; +const LINE_E = 24; helper() async { print('helper'); // LINE_A. diff --git a/pkg/vm_service/test/async_star_single_step_into_test.dart b/pkg/vm_service/test/async_star_single_step_into_test.dart index be3eba7c805..e722bbbb3b6 100644 --- a/pkg/vm_service/test/async_star_single_step_into_test.dart +++ b/pkg/vm_service/test/async_star_single_step_into_test.dart @@ -1,20 +1,18 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'dart:developer'; import 'common/service_test_common.dart'; import 'common/test_helper.dart'; -const LINE_A = 20; -const LINE_B = 21; -const LINE_C = 25; -const LINE_D = 29; -const LINE_E = 35; -const LINE_F = 36; -const LINE_G = 27; +const LINE_A = 18; +const LINE_B = 19; +const LINE_C = 23; +const LINE_D = 27; +const LINE_E = 33; +const LINE_F = 34; +const LINE_G = 25; foobar() async* { yield 1; // LINE_A. diff --git a/pkg/vm_service/test/async_star_step_out_test.dart b/pkg/vm_service/test/async_star_step_out_test.dart index 41d387f0182..b1eba2a691f 100644 --- a/pkg/vm_service/test/async_star_step_out_test.dart +++ b/pkg/vm_service/test/async_star_step_out_test.dart @@ -1,22 +1,20 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'dart:developer'; import 'common/service_test_common.dart'; import 'common/test_helper.dart'; -const LINE_A = 22; -const LINE_B = 23; -const LINE_C = 27; -const LINE_D = 31; -const LINE_E = 38; -const LINE_F = 39; -const LINE_G = 40; -const LINE_H = 29; -const LINE_I = 33; +const LINE_A = 20; +const LINE_B = 21; +const LINE_C = 25; +const LINE_D = 29; +const LINE_E = 36; +const LINE_F = 37; +const LINE_G = 38; +const LINE_H = 27; +const LINE_I = 31; foobar() async* { yield 1; // LINE_A. diff --git a/pkg/vm_service/test/async_step_out_test.dart b/pkg/vm_service/test/async_step_out_test.dart index e08ae355e5d..7f37fe68e6c 100644 --- a/pkg/vm_service/test/async_step_out_test.dart +++ b/pkg/vm_service/test/async_step_out_test.dart @@ -1,19 +1,17 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'dart:developer'; import 'common/service_test_common.dart'; import 'common/test_helper.dart'; -const LINE_A = 19; -const LINE_B = 20; -const LINE_C = 21; -const LINE_D = 26; -const LINE_E = 27; -const LINE_F = 28; +const LINE_A = 17; +const LINE_B = 18; +const LINE_C = 19; +const LINE_D = 24; +const LINE_E = 25; +const LINE_F = 26; helper() async { await null; // LINE_A. diff --git a/pkg/vm_service/test/awaiter_async_stack_contents_2_test.dart b/pkg/vm_service/test/awaiter_async_stack_contents_2_test.dart index 5cd74431039..f5fb8d0b6ce 100644 --- a/pkg/vm_service/test/awaiter_async_stack_contents_2_test.dart +++ b/pkg/vm_service/test/awaiter_async_stack_contents_2_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'package:test/test.dart'; diff --git a/pkg/vm_service/test/awaiter_async_stack_contents_test.dart b/pkg/vm_service/test/awaiter_async_stack_contents_test.dart index ac8ab8c07b1..497a9f8c37a 100644 --- a/pkg/vm_service/test/awaiter_async_stack_contents_test.dart +++ b/pkg/vm_service/test/awaiter_async_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'package:test/test.dart'; diff --git a/pkg/vm_service/test/causal_async_stack_contents_test.dart b/pkg/vm_service/test/causal_async_stack_contents_test.dart index b28ece5c45c..aad6986ada0 100644 --- a/pkg/vm_service/test/causal_async_stack_contents_test.dart +++ b/pkg/vm_service/test/causal_async_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:test/test.dart'; diff --git a/pkg/vm_service/test/causal_async_stack_presence_test.dart b/pkg/vm_service/test/causal_async_stack_presence_test.dart index 48bf16e0748..5eb2c46e4b6 100644 --- a/pkg/vm_service/test/causal_async_stack_presence_test.dart +++ b/pkg/vm_service/test/causal_async_stack_presence_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:test/test.dart'; diff --git a/pkg/vm_service/test/causal_async_star_stack_contents_test.dart b/pkg/vm_service/test/causal_async_star_stack_contents_test.dart index 80f0a2d4a0e..3d0e8920446 100644 --- a/pkg/vm_service/test/causal_async_star_stack_contents_test.dart +++ b/pkg/vm_service/test/causal_async_star_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:test/test.dart'; diff --git a/pkg/vm_service/test/causal_async_star_stack_presence_test.dart b/pkg/vm_service/test/causal_async_star_stack_presence_test.dart index 5ba0a7d19db..15dba5aea76 100644 --- a/pkg/vm_service/test/causal_async_star_stack_presence_test.dart +++ b/pkg/vm_service/test/causal_async_star_stack_presence_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:test/test.dart'; diff --git a/pkg/vm_service/test/common/test_helper.dart b/pkg/vm_service/test/common/test_helper.dart index 9f46c4d5e55..5363e3114c4 100644 --- a/pkg/vm_service/test/common/test_helper.dart +++ b/pkg/vm_service/test/common/test_helper.dart @@ -17,7 +17,7 @@ import 'service_test_common.dart'; export 'service_test_common.dart' show IsolateTest, VMTest; /// The extra arguments to use -const List extraDebuggingArgs = ['--lazy-async-stacks']; +const List extraDebuggingArgs = []; /// Will be set to the http address of the VM's service protocol before /// any tests are invoked. diff --git a/pkg/vm_service/test/get_stack_test.dart b/pkg/vm_service/test/get_stack_test.dart index f1df2ba9496..138876b5cba 100644 --- a/pkg/vm_service/test/get_stack_test.dart +++ b/pkg/vm_service/test/get_stack_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; diff --git a/runtime/bin/analyze_snapshot.cc b/runtime/bin/analyze_snapshot.cc index 1eb4c14c972..5a9011eb6e8 100644 --- a/runtime/bin/analyze_snapshot.cc +++ b/runtime/bin/analyze_snapshot.cc @@ -52,7 +52,6 @@ static void PrintUsage() { "following default flags: \n" "--enable_mirrors=false \n" "--background_compilation \n" -"--lazy_async_stacks \n" "--precompilation \n" " \n" "\n"); @@ -157,7 +156,6 @@ int RunAnalyzer(int argc, char** argv) { if (vm_options.count() == 0) { vm_options.AddArgument("--enable_mirrors=false"); vm_options.AddArgument("--background_compilation"); - vm_options.AddArgument("--lazy_async_stacks"); vm_options.AddArgument("--precompilation"); } diff --git a/runtime/lib/stacktrace.cc b/runtime/lib/stacktrace.cc index da73ef8ae42..af80ae5509d 100644 --- a/runtime/lib/stacktrace.cc +++ b/runtime/lib/stacktrace.cc @@ -34,8 +34,9 @@ static StackTracePtr CreateStackTraceObject( return StackTrace::New(code_array, pc_offset_array); } -static StackTracePtr CurrentSyncStackTraceLazy(Thread* thread, - intptr_t skip_frames = 1) { +// Gets current stack trace for `thread`. +static StackTracePtr CurrentStackTrace(Thread* thread, + intptr_t skip_frames = 1) { Zone* zone = thread->zone(); const auto& code_array = GrowableObjectArray::ZoneHandle( @@ -43,54 +44,19 @@ static StackTracePtr CurrentSyncStackTraceLazy(Thread* thread, GrowableArray pc_offset_array; // Collect the frames. - StackTraceUtils::CollectFramesLazy(thread, code_array, &pc_offset_array, - skip_frames); + StackTraceUtils::CollectFrames(thread, code_array, &pc_offset_array, + skip_frames); return CreateStackTraceObject(zone, code_array, pc_offset_array); } -static StackTracePtr CurrentSyncStackTrace(Thread* thread, - intptr_t skip_frames = 1) { - Zone* zone = thread->zone(); - const Function& null_function = Function::ZoneHandle(zone); - - // Determine how big the stack trace is. - const intptr_t stack_trace_length = - StackTraceUtils::CountFrames(thread, skip_frames, null_function, nullptr); - - // Allocate once. - const Array& code_array = - Array::ZoneHandle(zone, Array::New(stack_trace_length)); - const TypedData& pc_offset_array = TypedData::ZoneHandle( - zone, TypedData::New(kUintPtrCid, stack_trace_length)); - - // Collect the frames. - const intptr_t collected_frames_count = StackTraceUtils::CollectFrames( - thread, code_array, pc_offset_array, 0, stack_trace_length, skip_frames); - - ASSERT(collected_frames_count == stack_trace_length); - - return StackTrace::New(code_array, pc_offset_array); -} - -// Gets current stack trace for `thread`. -static StackTracePtr CurrentStackTrace(Thread* thread, - bool for_async_function, - intptr_t skip_frames = 1) { - if (FLAG_lazy_async_stacks) { - return CurrentSyncStackTraceLazy(thread, skip_frames); - } - // Return the synchronous stack trace. - return CurrentSyncStackTrace(thread, skip_frames); -} - StackTracePtr GetStackTraceForException() { Thread* thread = Thread::Current(); - return CurrentStackTrace(thread, false, 0); + return CurrentStackTrace(thread, 0); } DEFINE_NATIVE_ENTRY(StackTrace_current, 0, 0) { - return CurrentStackTrace(thread, false); + return CurrentStackTrace(thread); } static void AppendFrames(const GrowableObjectArray& code_list, diff --git a/runtime/observatory/tests/service/async_single_step_exception_test.dart b/runtime/observatory/tests/service/async_single_step_exception_test.dart index 544ba6f7f1b..2d9d6fbdaa1 100644 --- a/runtime/observatory/tests/service/async_single_step_exception_test.dart +++ b/runtime/observatory/tests/service/async_single_step_exception_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory/tests/service/async_single_step_into_test.dart b/runtime/observatory/tests/service/async_single_step_into_test.dart index 7477840499a..2685cac7874 100644 --- a/runtime/observatory/tests/service/async_single_step_into_test.dart +++ b/runtime/observatory/tests/service/async_single_step_into_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory/tests/service/async_single_step_out_test.dart b/runtime/observatory/tests/service/async_single_step_out_test.dart index e93c274331d..bf09b4d5e83 100644 --- a/runtime/observatory/tests/service/async_single_step_out_test.dart +++ b/runtime/observatory/tests/service/async_single_step_out_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory/tests/service/async_star_single_step_into_test.dart b/runtime/observatory/tests/service/async_star_single_step_into_test.dart index ac8e6baec68..1a3c2ad3be1 100644 --- a/runtime/observatory/tests/service/async_star_single_step_into_test.dart +++ b/runtime/observatory/tests/service/async_star_single_step_into_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory/tests/service/async_star_step_out_test.dart b/runtime/observatory/tests/service/async_star_step_out_test.dart index 6e731743dcf..f408caaae85 100644 --- a/runtime/observatory/tests/service/async_star_step_out_test.dart +++ b/runtime/observatory/tests/service/async_star_step_out_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory/tests/service/async_step_out_test.dart b/runtime/observatory/tests/service/async_step_out_test.dart index 4cce8260cbc..5359d1e5b97 100644 --- a/runtime/observatory/tests/service/async_step_out_test.dart +++ b/runtime/observatory/tests/service/async_step_out_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory/tests/service/awaiter_async_stack_contents_2_test.dart b/runtime/observatory/tests/service/awaiter_async_stack_contents_2_test.dart index b2d216559a5..8016216c615 100644 --- a/runtime/observatory/tests/service/awaiter_async_stack_contents_2_test.dart +++ b/runtime/observatory/tests/service/awaiter_async_stack_contents_2_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'package:observatory/models.dart' as M; diff --git a/runtime/observatory/tests/service/awaiter_async_stack_contents_test.dart b/runtime/observatory/tests/service/awaiter_async_stack_contents_test.dart index 77eeed2997d..e3ea09c2cb6 100644 --- a/runtime/observatory/tests/service/awaiter_async_stack_contents_test.dart +++ b/runtime/observatory/tests/service/awaiter_async_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'package:observatory/models.dart' as M; diff --git a/runtime/observatory/tests/service/causal_async_stack_contents_test.dart b/runtime/observatory/tests/service/causal_async_stack_contents_test.dart index 3e4a8eb54e8..6401df0c9e0 100644 --- a/runtime/observatory/tests/service/causal_async_stack_contents_test.dart +++ b/runtime/observatory/tests/service/causal_async_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:observatory/models.dart' as M; diff --git a/runtime/observatory/tests/service/causal_async_stack_presence_test.dart b/runtime/observatory/tests/service/causal_async_stack_presence_test.dart index 01331cdf9d1..008447e925c 100644 --- a/runtime/observatory/tests/service/causal_async_stack_presence_test.dart +++ b/runtime/observatory/tests/service/causal_async_stack_presence_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:observatory/service_io.dart'; diff --git a/runtime/observatory/tests/service/causal_async_star_stack_contents_test.dart b/runtime/observatory/tests/service/causal_async_star_stack_contents_test.dart index 8d66a17aabe..d9f4a857dda 100644 --- a/runtime/observatory/tests/service/causal_async_star_stack_contents_test.dart +++ b/runtime/observatory/tests/service/causal_async_star_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:observatory/models.dart' as M; diff --git a/runtime/observatory/tests/service/causal_async_star_stack_presence_test.dart b/runtime/observatory/tests/service/causal_async_star_stack_presence_test.dart index 9b605cb96da..4015c428431 100644 --- a/runtime/observatory/tests/service/causal_async_star_stack_presence_test.dart +++ b/runtime/observatory/tests/service/causal_async_star_stack_presence_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:observatory/service_io.dart'; diff --git a/runtime/observatory/tests/service/get_stack_limit_rpc_test.dart b/runtime/observatory/tests/service/get_stack_limit_rpc_test.dart index b3e47e21703..35a64930403 100644 --- a/runtime/observatory/tests/service/get_stack_limit_rpc_test.dart +++ b/runtime/observatory/tests/service/get_stack_limit_rpc_test.dart @@ -2,8 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// VMOptions=--lazy-async-stacks - import 'dart:async'; import 'dart:developer'; diff --git a/runtime/observatory/tests/service/next_through_simple_async_test.dart b/runtime/observatory/tests/service/next_through_simple_async_test.dart index bc2c3d537e1..7985874347c 100644 --- a/runtime/observatory/tests/service/next_through_simple_async_test.dart +++ b/runtime/observatory/tests/service/next_through_simple_async_test.dart @@ -1,14 +1,12 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'test_helper.dart'; import 'service_test_common.dart'; import 'dart:io'; -const int LINE_A = 14; +const int LINE_A = 12; const String file = "next_through_simple_async_test.dart"; code() async { // LINE_A diff --git a/runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart b/runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart index 9a3f2348faa..f402762f1cb 100644 --- a/runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart +++ b/runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart @@ -1,14 +1,12 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'test_helper.dart'; import 'service_test_common.dart'; import 'dart:io'; -const int LINE_A = 14; +const int LINE_A = 12; const String file = "next_through_simple_async_with_returns_test.dart"; code() async { // LINE_A diff --git a/runtime/observatory/tests/service/pause_on_unhandled_async_exceptions2_test.dart b/runtime/observatory/tests/service/pause_on_unhandled_async_exceptions2_test.dart index 67f69012ccd..4d06f0bb933 100644 --- a/runtime/observatory/tests/service/pause_on_unhandled_async_exceptions2_test.dart +++ b/runtime/observatory/tests/service/pause_on_unhandled_async_exceptions2_test.dart @@ -2,8 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async_debugger --lazy-async-stacks -// VMOptions=--async_debugger --lazy-async-stacks --optimization-counter-threshold=5 +// VMOptions=--async_debugger +// VMOptions=--async_debugger --optimization-counter-threshold=5 import 'package:observatory/service_io.dart'; import 'package:observatory/models.dart' as M; diff --git a/runtime/observatory/tests/service/pause_on_unhandled_async_exceptions_test.dart b/runtime/observatory/tests/service/pause_on_unhandled_async_exceptions_test.dart index fe636dd16fa..1770b56a0f1 100644 --- a/runtime/observatory/tests/service/pause_on_unhandled_async_exceptions_test.dart +++ b/runtime/observatory/tests/service/pause_on_unhandled_async_exceptions_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async_debugger --lazy-async-stacks +// VMOptions=--async_debugger import 'package:observatory/service_io.dart'; import 'package:observatory/models.dart' as M; diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart index bf6ce7341bb..02a6b0ab364 100644 --- a/runtime/observatory/tests/service/test_helper.dart +++ b/runtime/observatory/tests/service/test_helper.dart @@ -23,7 +23,7 @@ const String serviceResponseSizesDir = const String.fromEnvironment('SERVICE_RESPONSE_SIZES_DIR'); /// The extra arguments to use -const List extraDebuggingArgs = ['--lazy-async-stacks']; +const List extraDebuggingArgs = []; /// Will be set to the http address of the VM's service protocol before /// any tests are invoked. diff --git a/runtime/observatory_2/tests/service_2/async_single_step_exception_test.dart b/runtime/observatory_2/tests/service_2/async_single_step_exception_test.dart index 9982e0c752e..fcfdbc97832 100644 --- a/runtime/observatory_2/tests/service_2/async_single_step_exception_test.dart +++ b/runtime/observatory_2/tests/service_2/async_single_step_exception_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory_2/tests/service_2/async_single_step_into_test.dart b/runtime/observatory_2/tests/service_2/async_single_step_into_test.dart index 7477840499a..2685cac7874 100644 --- a/runtime/observatory_2/tests/service_2/async_single_step_into_test.dart +++ b/runtime/observatory_2/tests/service_2/async_single_step_into_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory_2/tests/service_2/async_single_step_out_test.dart b/runtime/observatory_2/tests/service_2/async_single_step_out_test.dart index e93c274331d..bf09b4d5e83 100644 --- a/runtime/observatory_2/tests/service_2/async_single_step_out_test.dart +++ b/runtime/observatory_2/tests/service_2/async_single_step_out_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory_2/tests/service_2/async_star_single_step_into_test.dart b/runtime/observatory_2/tests/service_2/async_star_single_step_into_test.dart index ac8e6baec68..1a3c2ad3be1 100644 --- a/runtime/observatory_2/tests/service_2/async_star_single_step_into_test.dart +++ b/runtime/observatory_2/tests/service_2/async_star_single_step_into_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory_2/tests/service_2/async_star_step_out_test.dart b/runtime/observatory_2/tests/service_2/async_star_step_out_test.dart index 6e731743dcf..f408caaae85 100644 --- a/runtime/observatory_2/tests/service_2/async_star_step_out_test.dart +++ b/runtime/observatory_2/tests/service_2/async_star_step_out_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory_2/tests/service_2/async_step_out_test.dart b/runtime/observatory_2/tests/service_2/async_step_out_test.dart index 4cce8260cbc..5359d1e5b97 100644 --- a/runtime/observatory_2/tests/service_2/async_step_out_test.dart +++ b/runtime/observatory_2/tests/service_2/async_step_out_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'service_test_common.dart'; diff --git a/runtime/observatory_2/tests/service_2/awaiter_async_stack_contents_2_test.dart b/runtime/observatory_2/tests/service_2/awaiter_async_stack_contents_2_test.dart index 0df05fd3013..55ccaa180e5 100644 --- a/runtime/observatory_2/tests/service_2/awaiter_async_stack_contents_2_test.dart +++ b/runtime/observatory_2/tests/service_2/awaiter_async_stack_contents_2_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'package:observatory_2/models.dart' as M; diff --git a/runtime/observatory_2/tests/service_2/awaiter_async_stack_contents_test.dart b/runtime/observatory_2/tests/service_2/awaiter_async_stack_contents_test.dart index 9e0f8f3f52d..792d7d4d69d 100644 --- a/runtime/observatory_2/tests/service_2/awaiter_async_stack_contents_test.dart +++ b/runtime/observatory_2/tests/service_2/awaiter_async_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async-debugger --verbose-debug --lazy-async-stacks +// VMOptions=--async-debugger --verbose-debug import 'dart:developer'; import 'package:observatory_2/models.dart' as M; diff --git a/runtime/observatory_2/tests/service_2/causal_async_stack_contents_test.dart b/runtime/observatory_2/tests/service_2/causal_async_stack_contents_test.dart index 7523c0f1db5..c80155ced60 100644 --- a/runtime/observatory_2/tests/service_2/causal_async_stack_contents_test.dart +++ b/runtime/observatory_2/tests/service_2/causal_async_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:observatory_2/models.dart' as M; diff --git a/runtime/observatory_2/tests/service_2/causal_async_stack_presence_test.dart b/runtime/observatory_2/tests/service_2/causal_async_stack_presence_test.dart index cd9ef6ad386..71cc1c8f2b1 100644 --- a/runtime/observatory_2/tests/service_2/causal_async_stack_presence_test.dart +++ b/runtime/observatory_2/tests/service_2/causal_async_stack_presence_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:observatory_2/service_io.dart'; diff --git a/runtime/observatory_2/tests/service_2/causal_async_star_stack_contents_test.dart b/runtime/observatory_2/tests/service_2/causal_async_star_stack_contents_test.dart index 5044d576970..5f715f86717 100644 --- a/runtime/observatory_2/tests/service_2/causal_async_star_stack_contents_test.dart +++ b/runtime/observatory_2/tests/service_2/causal_async_star_stack_contents_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:observatory_2/models.dart' as M; diff --git a/runtime/observatory_2/tests/service_2/causal_async_star_stack_presence_test.dart b/runtime/observatory_2/tests/service_2/causal_async_star_stack_presence_test.dart index 8acf40d5e74..fa3eb7473ce 100644 --- a/runtime/observatory_2/tests/service_2/causal_async_star_stack_presence_test.dart +++ b/runtime/observatory_2/tests/service_2/causal_async_star_stack_presence_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--lazy-async-stacks --verbose_debug +// VMOptions=--verbose_debug import 'dart:developer'; import 'package:observatory_2/service_io.dart'; diff --git a/runtime/observatory_2/tests/service_2/get_stack_limit_rpc_test.dart b/runtime/observatory_2/tests/service_2/get_stack_limit_rpc_test.dart index dc9f2533599..e346afa54fa 100644 --- a/runtime/observatory_2/tests/service_2/get_stack_limit_rpc_test.dart +++ b/runtime/observatory_2/tests/service_2/get_stack_limit_rpc_test.dart @@ -2,8 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// VMOptions=--lazy-async-stacks - import 'dart:async'; import 'dart:developer'; diff --git a/runtime/observatory_2/tests/service_2/next_through_simple_async_test.dart b/runtime/observatory_2/tests/service_2/next_through_simple_async_test.dart index bc2c3d537e1..7985874347c 100644 --- a/runtime/observatory_2/tests/service_2/next_through_simple_async_test.dart +++ b/runtime/observatory_2/tests/service_2/next_through_simple_async_test.dart @@ -1,14 +1,12 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'test_helper.dart'; import 'service_test_common.dart'; import 'dart:io'; -const int LINE_A = 14; +const int LINE_A = 12; const String file = "next_through_simple_async_test.dart"; code() async { // LINE_A diff --git a/runtime/observatory_2/tests/service_2/next_through_simple_async_with_returns_test.dart b/runtime/observatory_2/tests/service_2/next_through_simple_async_with_returns_test.dart index 9a3f2348faa..f402762f1cb 100644 --- a/runtime/observatory_2/tests/service_2/next_through_simple_async_with_returns_test.dart +++ b/runtime/observatory_2/tests/service_2/next_through_simple_async_with_returns_test.dart @@ -1,14 +1,12 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'test_helper.dart'; import 'service_test_common.dart'; import 'dart:io'; -const int LINE_A = 14; +const int LINE_A = 12; const String file = "next_through_simple_async_with_returns_test.dart"; code() async { // LINE_A diff --git a/runtime/observatory_2/tests/service_2/pause_on_unhandled_async_exceptions2_test.dart b/runtime/observatory_2/tests/service_2/pause_on_unhandled_async_exceptions2_test.dart index 50d95370113..05f2e2225ec 100644 --- a/runtime/observatory_2/tests/service_2/pause_on_unhandled_async_exceptions2_test.dart +++ b/runtime/observatory_2/tests/service_2/pause_on_unhandled_async_exceptions2_test.dart @@ -2,8 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async_debugger --lazy-async-stacks -// VMOptions=--async_debugger --lazy-async-stacks --optimization-counter-threshold=5 +// VMOptions=--async_debugger +// VMOptions=--async_debugger --optimization-counter-threshold=5 import 'package:observatory_2/service_io.dart'; import 'package:observatory_2/models.dart' as M; diff --git a/runtime/observatory_2/tests/service_2/pause_on_unhandled_async_exceptions_test.dart b/runtime/observatory_2/tests/service_2/pause_on_unhandled_async_exceptions_test.dart index d179cb65c13..58dff1f450b 100644 --- a/runtime/observatory_2/tests/service_2/pause_on_unhandled_async_exceptions_test.dart +++ b/runtime/observatory_2/tests/service_2/pause_on_unhandled_async_exceptions_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--async_debugger --lazy-async-stacks +// VMOptions=--async_debugger import 'package:observatory_2/service_io.dart'; import 'package:observatory_2/models.dart' as M; diff --git a/runtime/observatory_2/tests/service_2/test_helper.dart b/runtime/observatory_2/tests/service_2/test_helper.dart index b2667bf4827..881b6b60969 100644 --- a/runtime/observatory_2/tests/service_2/test_helper.dart +++ b/runtime/observatory_2/tests/service_2/test_helper.dart @@ -25,7 +25,7 @@ const String serviceResponseSizesDir = const String.fromEnvironment('SERVICE_RESPONSE_SIZES_DIR'); /// The extra arguments to use -const List extraDebuggingArgs = ['--lazy-async-stacks']; +const List extraDebuggingArgs = []; /// Will be set to the http address of the VM's service protocol before /// any tests are invoked. diff --git a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart b/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart index d13134085d4..67efb300148 100644 --- a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart +++ b/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--dwarf-stack-traces --save-debugging-info=async_lazy_debug.so --lazy-async-stacks +// VMOptions=--dwarf-stack-traces --save-debugging-info=async_lazy_debug.so import 'dart:async'; import 'dart:io'; diff --git a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_test.dart b/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_test.dart index 26805f15fa4..830b54abde5 100644 --- a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_test.dart +++ b/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'dart:async'; diff --git a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_no_causal_non_symbolic_test.dart b/runtime/tests/vm/dart/causal_stacks/async_throws_stack_no_causal_non_symbolic_test.dart deleted file mode 100644 index c9dbb093dff..00000000000 --- a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_no_causal_non_symbolic_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--dwarf-stack-traces --save-debugging-info=async_no_causal_debug.so --no-lazy-async-stacks - -import 'dart:async'; -import 'dart:io'; - -import 'utils.dart'; - -Future main(List args) async { - // We won't have access to the debugging info file on Android. - if (Platform.isAndroid) return; - - await doTestsNoCausalNoLazy('async_no_causal_debug.so'); -} diff --git a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_no_causal_test.dart b/runtime/tests/vm/dart/causal_stacks/async_throws_stack_no_causal_test.dart deleted file mode 100644 index 84848c943ab..00000000000 --- a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_no_causal_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--no-lazy-async-stacks - -import 'dart:async'; - -import 'utils.dart'; - -Future main(List args) async => await doTestsNoCausalNoLazy(); diff --git a/runtime/tests/vm/dart/causal_stacks/flutter_regress_100441_test.dart b/runtime/tests/vm/dart/causal_stacks/flutter_regress_100441_test.dart index b5ff8ad7347..effb0aa1dd1 100644 --- a/runtime/tests/vm/dart/causal_stacks/flutter_regress_100441_test.dart +++ b/runtime/tests/vm/dart/causal_stacks/flutter_regress_100441_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'dart:async'; diff --git a/runtime/tests/vm/dart/causal_stacks/utils.dart b/runtime/tests/vm/dart/causal_stacks/utils.dart index 584fd6dc8d4..2269e315779 100644 --- a/runtime/tests/vm/dart/causal_stacks/utils.dart +++ b/runtime/tests/vm/dart/causal_stacks/utils.dart @@ -302,209 +302,6 @@ Future doTestAwaitCatchError(Future f(), List expectedStack, // Test "Suites": // ---- -// For: --no-lazy-async-stacks -Future doTestsNoCausalNoLazy([String? debugInfoFilename]) async { - { - final expected = const [ - r'^#0 throwSync \(.*/utils.dart:16(:3)?\)$', - r'^#1 allYield3 \(.*/utils.dart:39(:3)?\)$', - r'^#2 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(allYield, expected, debugInfoFilename); - await doTestAwaitThen(allYield, expected, debugInfoFilename); - await doTestAwaitCatchError(allYield, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwSync \(.*/utils.dart:16(:3)?\)$', - r'^#1 noYields3 \(.*/utils.dart:54(:3)?\)$', - r'^#2 noYields2 \(.*/utils.dart:50(:9)?\)$', - r'^#3 noYields \(.*/utils.dart:46(:9)?\)$', - ]; - final postfix = const [ - r'^#5 doTestsNoCausalNoLazy ', - r'^#6 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await 0; // Don't let the `await do..`s chain together. - await doTestAwait( - noYields, - expected + - const [ - r'^#4 doTestAwait ', - ] + - postfix, - debugInfoFilename); - await 0; // Don't let the `await do..`s chain together. - await doTestAwaitThen( - noYields, - expected + - const [ - r'^#4 doTestAwaitThen ', - ] + - postfix, - debugInfoFilename); - await 0; // Don't let the `await do..`s chain together. - await doTestAwaitCatchError( - noYields, - expected + - const [ - r'^#4 doTestAwaitCatchError ', - ] + - postfix, - debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:21(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(mixedYields, expected, debugInfoFilename); - await doTestAwaitThen(mixedYields, expected, debugInfoFilename); - await doTestAwaitCatchError(mixedYields, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:21(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(syncSuffix, expected, debugInfoFilename); - await doTestAwaitThen(syncSuffix, expected, debugInfoFilename); - await doTestAwaitCatchError(syncSuffix, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:21(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(nonAsyncNoStack, expected, debugInfoFilename); - await doTestAwaitThen(nonAsyncNoStack, expected, debugInfoFilename); - await doTestAwaitCatchError(nonAsyncNoStack, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwSync \(.+/utils.dart:16(:3)?\)$', - r'^#1 asyncStarThrowSync \(.+/utils.dart:112(:11)?\)$', - r'^#2 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait( - awaitEveryAsyncStarThrowSync, expected, debugInfoFilename); - await doTestAwaitThen( - awaitEveryAsyncStarThrowSync, expected, debugInfoFilename); - await doTestAwaitCatchError( - awaitEveryAsyncStarThrowSync, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:21(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait( - awaitEveryAsyncStarThrowAsync, expected, debugInfoFilename); - await doTestAwaitThen( - awaitEveryAsyncStarThrowAsync, expected, debugInfoFilename); - await doTestAwaitCatchError( - awaitEveryAsyncStarThrowAsync, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:21(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(listenAsyncStarThrowAsync, expected, debugInfoFilename); - await doTestAwaitThen( - listenAsyncStarThrowAsync, expected, debugInfoFilename); - await doTestAwaitCatchError( - listenAsyncStarThrowAsync, expected, debugInfoFilename); - } - - { - final expected = const [ - r'#0 throwSync \(.*/utils.dart:16(:3)?\)$', - r'#1 allYield3 \(.*/utils.dart:39(:3)?\)$', - r'#2 _rootRunUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(customErrorZone, expected, debugInfoFilename); - await doTestAwaitThen(customErrorZone, expected, debugInfoFilename); - await doTestAwaitCatchError(customErrorZone, expected, debugInfoFilename); - } - - { - final expected = const [ - r'#0 throwAsync \(.*/utils.dart:21(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(awaitTimeout, expected, debugInfoFilename); - await doTestAwaitThen(awaitTimeout, expected, debugInfoFilename); - await doTestAwaitCatchError(awaitTimeout, expected, debugInfoFilename); - } - - { - final expected = const [ - r'#0 throwAsync \(.*/utils.dart:21(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(awaitWait, expected, debugInfoFilename); - await doTestAwaitThen(awaitWait, expected, debugInfoFilename); - await doTestAwaitCatchError(awaitWait, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:21(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(futureSyncWhenComplete, expected, debugInfoFilename); - await doTestAwaitThen(futureSyncWhenComplete, expected, debugInfoFilename); - await doTestAwaitCatchError( - futureSyncWhenComplete, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwSync \(.*/utils.dart:16(:3)?\)$', - r'^#1 futureThen. \(.*/utils.dart:187(:5)?\)$', - r'^#2 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(futureThen, expected, debugInfoFilename); - await doTestAwaitThen(futureThen, expected, debugInfoFilename); - await doTestAwaitCatchError(futureThen, expected, debugInfoFilename); - } -} - -// For: --lazy-async-stacks Future doTestsLazy([String? debugInfoFilename]) async { // allYield { diff --git a/runtime/tests/vm/dart/regress40189_test.dart b/runtime/tests/vm/dart/regress40189_test.dart index f857e5bc948..f37839a0fa1 100644 --- a/runtime/tests/vm/dart/regress40189_test.dart +++ b/runtime/tests/vm/dart/regress40189_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import "package:expect/expect.dart"; diff --git a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart b/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart index d4d9e46bade..af20a8f81f2 100644 --- a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart +++ b/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // -// VMOptions=--dwarf-stack-traces --save-debugging-info=async_lazy_debug.so --lazy-async-stacks +// VMOptions=--dwarf-stack-traces --save-debugging-info=async_lazy_debug.so // @dart = 2.9 diff --git a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_test.dart b/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_test.dart index ff202c82f5d..00c145936fa 100644 --- a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_test.dart +++ b/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks // @dart = 2.9 diff --git a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_no_causal_non_symbolic_test.dart b/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_no_causal_non_symbolic_test.dart deleted file mode 100644 index a84014e5e4b..00000000000 --- a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_no_causal_non_symbolic_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--dwarf-stack-traces --save-debugging-info=async_no_causal_debug.so --no-lazy-async-stacks - -// @dart = 2.9 - -import 'dart:async'; -import 'dart:io'; - -import 'utils.dart'; - -Future main(List args) async { - // We won't have access to the debugging info file on Android. - if (Platform.isAndroid) return; - - await doTestsNoCausalNoLazy('async_no_causal_debug.so'); -} diff --git a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_no_causal_test.dart b/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_no_causal_test.dart deleted file mode 100644 index 3afda58a4b0..00000000000 --- a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_no_causal_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--no-lazy-async-stacks - -// @dart = 2.9 - -import 'dart:async'; - -import 'utils.dart'; - -Future main(List args) async => await doTestsNoCausalNoLazy(); diff --git a/runtime/tests/vm/dart_2/causal_stacks/flutter_regress_100441_test.dart b/runtime/tests/vm/dart_2/causal_stacks/flutter_regress_100441_test.dart index 2d4d2ef09b8..e6a749d8146 100644 --- a/runtime/tests/vm/dart_2/causal_stacks/flutter_regress_100441_test.dart +++ b/runtime/tests/vm/dart_2/causal_stacks/flutter_regress_100441_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks // @dart = 2.9 import 'dart:async'; diff --git a/runtime/tests/vm/dart_2/causal_stacks/utils.dart b/runtime/tests/vm/dart_2/causal_stacks/utils.dart index 5ae06eda896..d7c80d1b245 100644 --- a/runtime/tests/vm/dart_2/causal_stacks/utils.dart +++ b/runtime/tests/vm/dart_2/causal_stacks/utils.dart @@ -304,209 +304,6 @@ Future doTestAwaitCatchError(Future f(), List expectedStack, // Test "Suites": // ---- -// For: --no-lazy-async-stacks -Future doTestsNoCausalNoLazy([String debugInfoFilename]) async { - { - final expected = const [ - r'^#0 throwSync \(.*/utils.dart:18(:3)?\)$', - r'^#1 allYield3 \(.*/utils.dart:41(:3)?\)$', - r'^#2 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(allYield, expected, debugInfoFilename); - await doTestAwaitThen(allYield, expected, debugInfoFilename); - await doTestAwaitCatchError(allYield, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwSync \(.*/utils.dart:18(:3)?\)$', - r'^#1 noYields3 \(.*/utils.dart:56(:3)?\)$', - r'^#2 noYields2 \(.*/utils.dart:52(:9)?\)$', - r'^#3 noYields \(.*/utils.dart:48(:9)?\)$', - ]; - final postfix = const [ - r'^#5 doTestsNoCausalNoLazy ', - r'^#6 _RootZone.runUnary ', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await 0; // Don't let the `await do..`s chain together. - await doTestAwait( - noYields, - expected + - const [ - r'^#4 doTestAwait ', - ] + - postfix, - debugInfoFilename); - await 0; // Don't let the `await do..`s chain together. - await doTestAwaitThen( - noYields, - expected + - const [ - r'^#4 doTestAwaitThen ', - ] + - postfix, - debugInfoFilename); - await 0; // Don't let the `await do..`s chain together. - await doTestAwaitCatchError( - noYields, - expected + - const [ - r'^#4 doTestAwaitCatchError ', - ] + - postfix, - debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:23(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(mixedYields, expected, debugInfoFilename); - await doTestAwaitThen(mixedYields, expected, debugInfoFilename); - await doTestAwaitCatchError(mixedYields, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:23(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(syncSuffix, expected, debugInfoFilename); - await doTestAwaitThen(syncSuffix, expected, debugInfoFilename); - await doTestAwaitCatchError(syncSuffix, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:23(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(nonAsyncNoStack, expected, debugInfoFilename); - await doTestAwaitThen(nonAsyncNoStack, expected, debugInfoFilename); - await doTestAwaitCatchError(nonAsyncNoStack, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwSync \(.+/utils.dart:18(:3)?\)$', - r'^#1 asyncStarThrowSync \(.+/utils.dart:114(:11)?\)$', - r'^#2 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait( - awaitEveryAsyncStarThrowSync, expected, debugInfoFilename); - await doTestAwaitThen( - awaitEveryAsyncStarThrowSync, expected, debugInfoFilename); - await doTestAwaitCatchError( - awaitEveryAsyncStarThrowSync, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:23(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait( - awaitEveryAsyncStarThrowAsync, expected, debugInfoFilename); - await doTestAwaitThen( - awaitEveryAsyncStarThrowAsync, expected, debugInfoFilename); - await doTestAwaitCatchError( - awaitEveryAsyncStarThrowAsync, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:23(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(listenAsyncStarThrowAsync, expected, debugInfoFilename); - await doTestAwaitThen( - listenAsyncStarThrowAsync, expected, debugInfoFilename); - await doTestAwaitCatchError( - listenAsyncStarThrowAsync, expected, debugInfoFilename); - } - - { - final expected = const [ - r'#0 throwSync \(.*/utils.dart:18(:3)?\)$', - r'#1 allYield3 \(.*/utils.dart:41(:3)?\)$', - r'#2 _rootRunUnary ', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(customErrorZone, expected, debugInfoFilename); - await doTestAwaitThen(customErrorZone, expected, debugInfoFilename); - await doTestAwaitCatchError(customErrorZone, expected, debugInfoFilename); - } - - { - final expected = const [ - r'#0 throwAsync \(.*/utils.dart:23(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(awaitTimeout, expected, debugInfoFilename); - await doTestAwaitThen(awaitTimeout, expected, debugInfoFilename); - await doTestAwaitCatchError(awaitTimeout, expected, debugInfoFilename); - } - - { - final expected = const [ - r'#0 throwAsync \(.*/utils.dart:23(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(awaitWait, expected, debugInfoFilename); - await doTestAwaitThen(awaitWait, expected, debugInfoFilename); - await doTestAwaitCatchError(awaitWait, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwAsync \(.*/utils.dart:23(:3)?\)$', - r'^#1 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(futureSyncWhenComplete, expected, debugInfoFilename); - await doTestAwaitThen(futureSyncWhenComplete, expected, debugInfoFilename); - await doTestAwaitCatchError( - futureSyncWhenComplete, expected, debugInfoFilename); - } - - { - final expected = const [ - r'^#0 throwSync \(.*/utils.dart:18(:3)?\)$', - r'^#1 futureThen. \(.*/utils.dart:189(:5)?\)$', - r'^#2 _RootZone.runUnary \(.+\)$', - // The rest are internal frames which we don't really care about. - IGNORE_REMAINING_STACK, - ]; - await doTestAwait(futureThen, expected, debugInfoFilename); - await doTestAwaitThen(futureThen, expected, debugInfoFilename); - await doTestAwaitCatchError(futureThen, expected, debugInfoFilename); - } -} - -// For: --lazy-async-stacks Future doTestsLazy([String debugInfoFilename]) async { // allYield { diff --git a/runtime/tests/vm/dart_2/regress40189_test.dart b/runtime/tests/vm/dart_2/regress40189_test.dart index cbc9f454f64..348e1ec12da 100644 --- a/runtime/tests/vm/dart_2/regress40189_test.dart +++ b/runtime/tests/vm/dart_2/regress40189_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks // @dart = 2.9 diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc index 529c56d759d..0ccfd452d3e 100644 --- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc +++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc @@ -5639,7 +5639,7 @@ Fragment StreamingFlowGraphBuilder::BuildFunctionNode( // Note: Is..() methods use the modifiers set above, so order // matters. if (function.IsAsyncClosure() || function.IsAsyncGenClosure()) { - function.set_is_inlinable(!FLAG_lazy_async_stacks); + function.set_is_inlinable(false); } ASSERT(!function.IsCompactAsyncFunction()); ASSERT(!function.IsCompactAsyncStarFunction()); diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc index 51511450e38..2db5f8fb7c1 100644 --- a/runtime/vm/compiler/frontend/scope_builder.cc +++ b/runtime/vm/compiler/frontend/scope_builder.cc @@ -1384,7 +1384,7 @@ void ScopeBuilder::VisitVariableDeclaration() { // Lift the special async vars out of the function body scope, into the // outer function declaration scope. // This way we can allocate them in the outermost context at fixed indices, - // allowing support for --lazy-async-stacks implementation to find awaiters. + // allowing support for async stack traces implementation to find awaiters. if (name.Equals(Symbols::AwaitJumpVar()) || name.Equals(Symbols::AsyncFuture()) || name.Equals(Symbols::is_sync()) || name.Equals(Symbols::Controller())) { diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc index 5dacd5604ea..bcfe3c90e5e 100644 --- a/runtime/vm/compiler/jit/compiler.cc +++ b/runtime/vm/compiler/jit/compiler.cc @@ -102,7 +102,6 @@ static void PrecompilationModeHandler(bool value) { FLAG_reorder_basic_blocks = true; FLAG_use_field_guards = false; FLAG_use_cha_deopt = false; - FLAG_lazy_async_stacks = true; #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) // Set flags affecting runtime accordingly for gen_snapshot. diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc index 31cc36f03c0..ec145d7b3e6 100644 --- a/runtime/vm/debugger.cc +++ b/runtime/vm/debugger.cc @@ -1966,13 +1966,6 @@ void DebuggerStackTrace::AppendCodeFrames(Thread* thread, } DebuggerStackTrace* DebuggerStackTrace::CollectAsyncCausal() { - if (FLAG_lazy_async_stacks) { - return CollectAsyncLazy(); - } - return nullptr; -} - -DebuggerStackTrace* DebuggerStackTrace::CollectAsyncLazy() { Thread* thread = Thread::Current(); Zone* zone = thread->zone(); Isolate* isolate = thread->isolate(); @@ -1996,9 +1989,8 @@ DebuggerStackTrace* DebuggerStackTrace::CollectAsyncLazy() { &inlined_code, &deopt_frame); }; - StackTraceUtils::CollectFramesLazy(thread, code_array, &pc_offset_array, - /*skip_frames=*/0, &on_sync_frame, - &has_async); + StackTraceUtils::CollectFrames(thread, code_array, &pc_offset_array, + /*skip_frames=*/0, &on_sync_frame, &has_async); // If the entire stack is sync, return no (async) trace. if (!has_async) { @@ -4072,31 +4064,29 @@ ErrorPtr Debugger::PauseStepping() { } // We need to manually set a synthetic breakpoint for async_op before entry. - if (FLAG_lazy_async_stacks) { - // async and async* functions always contain synthetic async_ops. - if ((frame->function().IsAsyncFunction() || - frame->function().IsAsyncGenerator()) && - !frame->function().IsSuspendableFunction()) { - ASSERT(!frame->GetSavedCurrentContext().IsNull()); - ASSERT(frame->GetSavedCurrentContext().num_variables() > - Context::kAsyncFutureIndex); + // async and async* functions always contain synthetic async_ops. + if ((frame->function().IsAsyncFunction() || + frame->function().IsAsyncGenerator()) && + !frame->function().IsSuspendableFunction()) { + ASSERT(!frame->GetSavedCurrentContext().IsNull()); + ASSERT(frame->GetSavedCurrentContext().num_variables() > + Context::kAsyncFutureIndex); - const Object& async_future = Object::Handle( - frame->GetSavedCurrentContext().At(Context::kAsyncFutureIndex)); + const Object& async_future = Object::Handle( + frame->GetSavedCurrentContext().At(Context::kAsyncFutureIndex)); - // Only set breakpoint when entering async_op the first time. - // :async_future should be uninitialised at this point: - if (async_future.IsNull()) { - const Function& async_op = Function::Handle( - ClosureFunctionsCache::GetUniqueInnerClosure(frame->function())); - if (!async_op.IsNull()) { - SetBreakpointAtAsyncOp(async_op); - // After setting the breakpoint we stop stepping and continue the - // debugger until the next breakpoint, to step over all the - // synthetic code. - Continue(); - return Error::null(); - } + // Only set breakpoint when entering async_op the first time. + // :async_future should be uninitialised at this point: + if (async_future.IsNull()) { + const Function& async_op = Function::Handle( + ClosureFunctionsCache::GetUniqueInnerClosure(frame->function())); + if (!async_op.IsNull()) { + SetBreakpointAtAsyncOp(async_op); + // After setting the breakpoint we stop stepping and continue the + // debugger until the next breakpoint, to step over all the + // synthetic code. + Continue(); + return Error::null(); } } } diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h index 47e701f156e..56dfd6d7fe2 100644 --- a/runtime/vm/debugger.h +++ b/runtime/vm/debugger.h @@ -524,7 +524,6 @@ class DebuggerStackTrace : public ZoneAllocated { Array* deopt_frame); static DebuggerStackTrace* CollectAsyncCausal(); - static DebuggerStackTrace* CollectAsyncLazy(); ZoneGrowableArray trace_; diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h index 462413c424e..46a7bd5f32c 100644 --- a/runtime/vm/flag_list.h +++ b/runtime/vm/flag_list.h @@ -64,7 +64,6 @@ constexpr bool FLAG_support_il_printer = false; P(code_comments, bool, false, "Include comments into code and disassembly.") \ P(dwarf_stack_traces_mode, bool, false, \ "Use --[no-]dwarf-stack-traces instead.") \ - P(lazy_async_stacks, bool, true, "Reconstruct async stacks from listeners") \ P(lazy_dispatchers, bool, true, "Generate dispatchers lazily") \ R(dedup_instructions, true, bool, false, \ "Canonicalize instructions when precompiling.") @@ -135,6 +134,7 @@ constexpr bool FLAG_support_il_printer = false; P(idle_duration_micros, int, 500 * kMicrosecondsPerMillisecond, \ "Allow idle tasks to run for this long.") \ P(interpret_irregexp, bool, false, "Use irregexp bytecode interpreter") \ + P(lazy_async_stacks, bool, true, "Obsolete, ignored.") \ P(link_natives_lazily, bool, false, "Link native calls lazily") \ R(log_marker_tasks, false, bool, false, \ "Log debugging information for old gen GC marking tasks.") \ diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc index ee8d3a63037..e37a681dfd0 100644 --- a/runtime/vm/kernel_loader.cc +++ b/runtime/vm/kernel_loader.cc @@ -2056,17 +2056,17 @@ void KernelLoader::LoadProcedure(const Library& library, switch (function_node_helper.dart_async_marker_) { case FunctionNodeHelper::kSyncStar: function.set_modifier(UntaggedFunction::kSyncGen); - function.set_is_visible(!FLAG_lazy_async_stacks); + function.set_is_visible(false); break; case FunctionNodeHelper::kAsync: function.set_modifier(UntaggedFunction::kAsync); - function.set_is_inlinable(!FLAG_lazy_async_stacks); - function.set_is_visible(!FLAG_lazy_async_stacks); + function.set_is_inlinable(false); + function.set_is_visible(false); break; case FunctionNodeHelper::kAsyncStar: function.set_modifier(UntaggedFunction::kAsyncGen); - function.set_is_inlinable(!FLAG_lazy_async_stacks); - function.set_is_visible(!FLAG_lazy_async_stacks); + function.set_is_inlinable(false); + function.set_is_visible(false); break; default: // no special modifier diff --git a/runtime/vm/stack_trace.cc b/runtime/vm/stack_trace.cc index 671f58b7b4f..21ab60e4d3d 100644 --- a/runtime/vm/stack_trace.cc +++ b/runtime/vm/stack_trace.cc @@ -627,7 +627,7 @@ void StackTraceUtils::UnwindAwaiterChain( } } -void StackTraceUtils::CollectFramesLazy( +void StackTraceUtils::CollectFrames( Thread* thread, const GrowableObjectArray& code_array, GrowableArray* pc_offset_array, @@ -696,85 +696,4 @@ void StackTraceUtils::CollectFramesLazy( return; } -intptr_t StackTraceUtils::CountFrames(Thread* thread, - int skip_frames, - const Function& async_function, - bool* sync_async_end) { - Zone* zone = thread->zone(); - intptr_t frame_count = 0; - DartFrameIterator frames(thread, StackFrameIterator::kNoCrossThreadIteration); - StackFrame* frame = frames.NextFrame(); - ASSERT(frame != nullptr); // We expect to find a dart invocation frame. - Function& function = Function::Handle(zone); - Code& code = Code::Handle(zone); - Closure& closure = Closure::Handle(zone); - const bool async_function_is_null = async_function.IsNull(); - - ASSERT(async_function_is_null || sync_async_end != nullptr); - - for (; frame != nullptr; frame = frames.NextFrame()) { - if (skip_frames > 0) { - skip_frames--; - continue; - } - code = frame->LookupDartCode(); - function = code.function(); - - frame_count++; - - const bool function_is_null = function.IsNull(); - - if (!async_function_is_null && !function_is_null && - function.parent_function() != Function::null()) { - if (async_function.ptr() == function.parent_function()) { - if (function.IsAsyncClosure() || function.IsAsyncGenClosure()) { - ObjectPtr* last_caller_obj = - reinterpret_cast(frame->GetCallerSp()); - closure = FindClosureInFrame(last_caller_obj, function); - if (!closure.IsNull() && - CallerClosureFinder::IsRunningAsync(closure)) { - *sync_async_end = false; - return frame_count; - } - } - break; - } - } - } - - if (!async_function_is_null) { - *sync_async_end = true; - } - - return frame_count; -} - -intptr_t StackTraceUtils::CollectFrames(Thread* thread, - const Array& code_array, - const TypedData& pc_offset_array, - intptr_t array_offset, - intptr_t count, - int skip_frames) { - Zone* zone = thread->zone(); - DartFrameIterator frames(thread, StackFrameIterator::kNoCrossThreadIteration); - StackFrame* frame = frames.NextFrame(); - ASSERT(frame != NULL); // We expect to find a dart invocation frame. - Code& code = Code::Handle(zone); - intptr_t collected_frames_count = 0; - for (; (frame != NULL) && (collected_frames_count < count); - frame = frames.NextFrame()) { - if (skip_frames > 0) { - skip_frames--; - continue; - } - code = frame->LookupDartCode(); - const intptr_t pc_offset = frame->pc() - code.PayloadStart(); - code_array.SetAt(array_offset, code); - pc_offset_array.SetUintPtr(array_offset * kWordSize, pc_offset); - array_offset++; - collected_frames_count++; - } - return collected_frames_count; -} - } // namespace dart diff --git a/runtime/vm/stack_trace.h b/runtime/vm/stack_trace.h index 37df0692f3b..cfd558c03c8 100644 --- a/runtime/vm/stack_trace.h +++ b/runtime/vm/stack_trace.h @@ -144,46 +144,17 @@ class StackTraceUtils : public AllStatic { /// hit which has yielded before (i.e. is not in sync-async case). /// /// From there on finds the closure of the async/async* frame and starts - /// traversing the listeners: - /// while (closure != null) { - /// yield_index = closure.context[Context::kAsyncJumpVarIndex] - /// pc = closure.function.code.pc_descriptors.LookupPcFromYieldIndex( - /// yield_index); - /// - /// closure = closure.context[Context::kAsyncCompleterVarIndex]._future - /// ._resultOrListeners.callback; - /// } + /// traversing the listeners. /// /// If [on_sync_frames] is non-nullptr, it will be called for every /// synchronous frame which is collected. - static void CollectFramesLazy( + static void CollectFrames( Thread* thread, const GrowableObjectArray& code_array, GrowableArray* pc_offset_array, int skip_frames, std::function* on_sync_frames = nullptr, bool* has_async = nullptr); - - /// Counts the number of stack frames. - /// Skips over the first |skip_frames|. - /// If |async_function| is not null, stops at the function that has - /// |async_function| as its parent, and records in 'sync_async_end' whether - /// |async_function| was called synchronously. - static intptr_t CountFrames(Thread* thread, - int skip_frames, - const Function& async_function, - bool* sync_async_end); - - /// Collects |count| frames into |code_array| and |pc_offset_array|. - /// Writing begins at |array_offset|. - /// Skips over the first |skip_frames|. - /// Returns the number of frames collected. - static intptr_t CollectFrames(Thread* thread, - const Array& code_array, - const TypedData& pc_offset_array, - intptr_t array_offset, - intptr_t count, - int skip_frames); }; } // namespace dart diff --git a/tests/language/vm/lazy_async_exception_stack2_test.dart b/tests/language/vm/lazy_async_exception_stack2_test.dart index bd9b8d5307d..9368e7517b9 100644 --- a/tests/language/vm/lazy_async_exception_stack2_test.dart +++ b/tests/language/vm/lazy_async_exception_stack2_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'package:async_helper/async_minitest.dart'; diff --git a/tests/language/vm/lazy_async_exception_stack_test.dart b/tests/language/vm/lazy_async_exception_stack_test.dart index 9b9705ee190..88113434360 100644 --- a/tests/language/vm/lazy_async_exception_stack_test.dart +++ b/tests/language/vm/lazy_async_exception_stack_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import 'package:async_helper/async_minitest.dart'; @@ -36,8 +34,8 @@ main() async { } catch (e, st) { expect( h.stringContainsInOrder(st.toString(), [ - 'thrower', '.dart:12', // no auto-format. - 'generator', '.dart:21', // no auto-format. + 'thrower', '.dart:10', // no auto-format. + 'generator', '.dart:19', // no auto-format. '', // no auto-format. 'foo', '.dart', // no auto-format. 'main', @@ -74,8 +72,8 @@ main() async { } catch (e, st) { expect( h.stringContainsInOrder(st.toString(), [ - 'thrower', '.dart:12', // no auto-format. - 'main.', '.dart:73', // no auto-format. + 'thrower', '.dart:10', // no auto-format. + 'main.', '.dart:71', // no auto-format. ]), isTrue); } diff --git a/tests/language_2/vm/lazy_async_exception_stack2_test.dart b/tests/language_2/vm/lazy_async_exception_stack2_test.dart index 81df6ce02b8..9cff86a1d0c 100644 --- a/tests/language_2/vm/lazy_async_exception_stack2_test.dart +++ b/tests/language_2/vm/lazy_async_exception_stack2_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks // @dart = 2.9 diff --git a/tests/language_2/vm/lazy_async_exception_stack_test.dart b/tests/language_2/vm/lazy_async_exception_stack_test.dart index 46ee9ff010a..f037568acb6 100644 --- a/tests/language_2/vm/lazy_async_exception_stack_test.dart +++ b/tests/language_2/vm/lazy_async_exception_stack_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks // @dart = 2.9 @@ -38,8 +36,8 @@ main() async { } catch (e, st) { expect( h.stringContainsInOrder(st.toString(), [ - 'thrower', '.dart:14', // no auto-format. - 'generator', '.dart:23', // no auto-format. + 'thrower', '.dart:12', // no auto-format. + 'generator', '.dart:21', // no auto-format. '', // no auto-format. 'foo', '.dart', // no auto-format. 'main', @@ -76,8 +74,8 @@ main() async { } catch (e, st) { expect( h.stringContainsInOrder(st.toString(), [ - 'thrower', '.dart:14', // no auto-format. - 'main.', '.dart:75', // no auto-format. + 'thrower', '.dart:12', // no auto-format. + 'main.', '.dart:73', // no auto-format. ]), isTrue); } diff --git a/tests/standalone/lazy_async_stack_test.dart b/tests/standalone/lazy_async_stack_test.dart index 652edb3e208..810f1ac0118 100644 --- a/tests/standalone/lazy_async_stack_test.dart +++ b/tests/standalone/lazy_async_stack_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks import "package:expect/expect.dart"; diff --git a/tests/standalone_2/lazy_async_stack_test.dart b/tests/standalone_2/lazy_async_stack_test.dart index 506621510d8..707d5ee6276 100644 --- a/tests/standalone_2/lazy_async_stack_test.dart +++ b/tests/standalone_2/lazy_async_stack_test.dart @@ -1,8 +1,6 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// VMOptions=--lazy-async-stacks // @dart = 2.9