[vm] Remove --causal-async-stacks flag
The flag isn't used anywhere in our tests or in embedder code. Turning it on will result in a VM startup error. We should therefore remove all uses of the flag and the flag itself. TEST=Existing test suite. Change-Id: I19dfba052df7948dfdb379c0610dab67ebbcd12d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204500 Reviewed-by: Clement Skau <cskau@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
0e4c640451
commit
b1f1aee94d
@@ -74,11 +74,6 @@ static StackTracePtr CurrentSyncStackTrace(Thread* thread,
|
||||
}
|
||||
|
||||
// Gets current stack trace for `thread`.
|
||||
// This functions itself handles the --causel-async-stacks case.
|
||||
// For --lazy-async-stacks see `CurrentSyncStackTraceLazy`.
|
||||
// For fallback see `CurrentSyncStackTrace`.
|
||||
// Extracts the causal async stack from the thread if any set, then prepends
|
||||
// the current sync. stack up until the current async function (if any).
|
||||
static StackTracePtr CurrentStackTrace(Thread* thread,
|
||||
bool for_async_function,
|
||||
intptr_t skip_frames = 1) {
|
||||
|
||||
@@ -2800,8 +2800,8 @@
|
||||
"../../../tests/language/vm/bitnot_int_test.dart",
|
||||
"../../../tests/language/vm/bool_check_stack_traces_test.dart",
|
||||
"../../../tests/language/vm/canonicalization_preserves_deopt_test.dart",
|
||||
"../../../tests/language/vm/causal_async_exception_stack2_test.dart",
|
||||
"../../../tests/language/vm/causal_async_exception_stack_test.dart",
|
||||
"../../../tests/language/vm/lazy_async_exception_stack2_test.dart",
|
||||
"../../../tests/language/vm/lazy_async_exception_stack_test.dart",
|
||||
"../../../tests/language/vm/checked_smi_comparison_test.dart",
|
||||
"../../../tests/language/vm/checked_smi_op_test.dart",
|
||||
"../../../tests/language/vm/clamp_37868_test.dart",
|
||||
@@ -3224,7 +3224,7 @@
|
||||
"../../../tests/standalone/assert_assignable_canon_test.dart",
|
||||
"../../../tests/standalone/byte_array_view_optimized_test.dart",
|
||||
"../../../tests/standalone/bytedata_test.dart",
|
||||
"../../../tests/standalone/causal_async_stack_test.dart",
|
||||
"../../../tests/standalone/lazy_async_stack_test.dart",
|
||||
"../../../tests/standalone/check_class_cha_test.dart",
|
||||
"../../../tests/standalone/check_null_cha_test.dart",
|
||||
"../../../tests/standalone/constant_left_shift_test.dart",
|
||||
@@ -6160,8 +6160,8 @@
|
||||
"../../../tests/language_2/vm/await_synchronous_future_test.dart",
|
||||
"../../../tests/language_2/vm/bitnot_int_test.dart",
|
||||
"../../../tests/language_2/vm/canonicalization_preserves_deopt_test.dart",
|
||||
"../../../tests/language_2/vm/causal_async_exception_stack2_test.dart",
|
||||
"../../../tests/language_2/vm/causal_async_exception_stack_test.dart",
|
||||
"../../../tests/language_2/vm/lazy_async_exception_stack2_test.dart",
|
||||
"../../../tests/language_2/vm/lazy_async_exception_stack_test.dart",
|
||||
"../../../tests/language_2/vm/checked_smi_comparison_test.dart",
|
||||
"../../../tests/language_2/vm/checked_smi_op_test.dart",
|
||||
"../../../tests/language_2/vm/clamp_37868_test.dart",
|
||||
@@ -6570,7 +6570,7 @@
|
||||
"../../../tests/standalone_2/assert_assignable_canon_test.dart",
|
||||
"../../../tests/standalone_2/byte_array_view_optimized_test.dart",
|
||||
"../../../tests/standalone_2/bytedata_test.dart",
|
||||
"../../../tests/standalone_2/causal_async_stack_test.dart",
|
||||
"../../../tests/standalone_2/lazy_async_stack_test.dart",
|
||||
"../../../tests/standalone_2/check_class_cha_test.dart",
|
||||
"../../../tests/standalone_2/check_null_cha_test.dart",
|
||||
"../../../tests/standalone_2/constant_left_shift_test.dart",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// This test ensures that "pkg:stack_trace" (used by "pkg:test") doesn't break
|
||||
// when causal async stacks are enabled by dropping frames below a synchronous
|
||||
// when lazy async stacks are enabled by dropping frames below a synchronous
|
||||
// start to an async function.
|
||||
|
||||
import "package:test/test.dart";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// This test ensures that "pkg:stack_trace" (used by "pkg:test") doesn't break
|
||||
// when causal async stacks are enabled by dropping frames below a synchronous
|
||||
// when lazy async stacks are enabled by dropping frames below a synchronous
|
||||
// start to an async function.
|
||||
|
||||
import "package:test/test.dart";
|
||||
|
||||
@@ -5523,11 +5523,9 @@ Fragment StreamingFlowGraphBuilder::BuildFunctionNode(
|
||||
break;
|
||||
case FunctionNodeHelper::kAsync:
|
||||
function.set_modifier(UntaggedFunction::kAsync);
|
||||
function.set_is_inlinable(!FLAG_causal_async_stacks);
|
||||
break;
|
||||
case FunctionNodeHelper::kAsyncStar:
|
||||
function.set_modifier(UntaggedFunction::kAsyncGen);
|
||||
function.set_is_inlinable(!FLAG_causal_async_stacks);
|
||||
break;
|
||||
default:
|
||||
// no special modifier
|
||||
@@ -5546,8 +5544,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_causal_async_stacks &&
|
||||
!FLAG_lazy_async_stacks);
|
||||
function.set_is_inlinable(!FLAG_lazy_async_stacks);
|
||||
}
|
||||
|
||||
function.set_end_token_pos(function_node_helper.end_position_);
|
||||
|
||||
@@ -221,14 +221,6 @@ char* Dart::Init(const uint8_t* vm_isolate_snapshot,
|
||||
return error;
|
||||
}
|
||||
}
|
||||
if (FLAG_causal_async_stacks && FLAG_lazy_async_stacks) {
|
||||
return Utils::StrDup(
|
||||
"To use --lazy-async-stacks, please disable --causal-async-stacks!");
|
||||
}
|
||||
// TODO(cskau): Remove once flag deprecation has been completed.
|
||||
if (FLAG_causal_async_stacks) {
|
||||
return Utils::StrDup("--causal-async-stacks is deprecated!");
|
||||
}
|
||||
|
||||
UntaggedFrame::Init();
|
||||
|
||||
|
||||
@@ -1903,10 +1903,7 @@ DebuggerStackTrace* DebuggerStackTrace::CollectAsyncCausal() {
|
||||
if (FLAG_lazy_async_stacks) {
|
||||
return CollectAsyncLazy();
|
||||
}
|
||||
if (!FLAG_causal_async_stacks) {
|
||||
return nullptr;
|
||||
}
|
||||
UNREACHABLE(); // FLAG_causal_async_stacks is deprecated.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DebuggerStackTrace* DebuggerStackTrace::CollectAsyncLazy() {
|
||||
@@ -1979,7 +1976,7 @@ DebuggerStackTrace* DebuggerStackTrace::CollectAsyncLazy() {
|
||||
|
||||
DebuggerStackTrace* DebuggerStackTrace::CollectAwaiterReturn() {
|
||||
#if defined(DART_PRECOMPILED_RUNTIME)
|
||||
// Causal async stacks are not supported in the AOT runtime.
|
||||
// AOT does not support debugging.
|
||||
ASSERT(!FLAG_async_debugger);
|
||||
return nullptr;
|
||||
#else
|
||||
|
||||
@@ -58,12 +58,10 @@ constexpr bool FLAG_support_il_printer = false;
|
||||
//
|
||||
// The syntax used is the same as that for FLAG_LIST below, as these flags are
|
||||
// automatically included in FLAG_LIST.
|
||||
// TODO(cskau): Remove causal_async_stacks when deprecated.
|
||||
#define VM_GLOBAL_FLAG_LIST(P, R, C, D) \
|
||||
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(causal_async_stacks, bool, false, "DEPRECATED: Improved async stacks") \
|
||||
P(lazy_async_stacks, bool, true, "Reconstruct async stacks from listeners") \
|
||||
P(lazy_dispatchers, bool, true, "Generate dispatchers lazily") \
|
||||
P(use_bare_instructions, bool, true, "Enable bare instructions mode.") \
|
||||
|
||||
@@ -2014,22 +2014,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_causal_async_stacks &&
|
||||
!FLAG_lazy_async_stacks);
|
||||
function.set_is_visible(!FLAG_lazy_async_stacks);
|
||||
break;
|
||||
case FunctionNodeHelper::kAsync:
|
||||
function.set_modifier(UntaggedFunction::kAsync);
|
||||
function.set_is_inlinable(!FLAG_causal_async_stacks &&
|
||||
!FLAG_lazy_async_stacks);
|
||||
function.set_is_visible(!FLAG_causal_async_stacks &&
|
||||
!FLAG_lazy_async_stacks);
|
||||
function.set_is_inlinable(!FLAG_lazy_async_stacks);
|
||||
function.set_is_visible(!FLAG_lazy_async_stacks);
|
||||
break;
|
||||
case FunctionNodeHelper::kAsyncStar:
|
||||
function.set_modifier(UntaggedFunction::kAsyncGen);
|
||||
function.set_is_inlinable(!FLAG_causal_async_stacks &&
|
||||
!FLAG_lazy_async_stacks);
|
||||
function.set_is_visible(!FLAG_causal_async_stacks &&
|
||||
!FLAG_lazy_async_stacks);
|
||||
function.set_is_inlinable(!FLAG_lazy_async_stacks);
|
||||
function.set_is_visible(!FLAG_lazy_async_stacks);
|
||||
break;
|
||||
default:
|
||||
// no special modifier
|
||||
|
||||
@@ -228,8 +228,8 @@ enum/private_test/01: Crash # Issue 34606
|
||||
unsorted/inference_enum_list_test: Skip # Issue 35885
|
||||
|
||||
[ $compiler == dartk && $mode == product && $runtime == vm ]
|
||||
vm/causal_async_exception_stack2_test: SkipByDesign
|
||||
vm/causal_async_exception_stack_test: SkipByDesign
|
||||
vm/lazy_async_exception_stack2_test: SkipByDesign
|
||||
vm/lazy_async_exception_stack_test: SkipByDesign
|
||||
|
||||
# ===== dartk + vm status lines =====
|
||||
[ $compiler == dartk && $runtime == vm ]
|
||||
@@ -277,9 +277,9 @@ null_test/none: SkipByDesign
|
||||
optimize/deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot
|
||||
unsorted/hello_dart_test: Skip # Incompatible flag: --compile_all
|
||||
unsorted/invocation_mirror2_test: SkipByDesign
|
||||
vm/causal_async_exception_stack2_test: SkipByDesign
|
||||
vm/causal_async_exception_stack_test: SkipByDesign
|
||||
vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM
|
||||
vm/lazy_async_exception_stack2_test: SkipByDesign
|
||||
vm/lazy_async_exception_stack_test: SkipByDesign
|
||||
vm/reflect_core_vm_test: SkipByDesign
|
||||
vm/regress_27671_test: Skip # Unsupported
|
||||
vm/regress_29145_test: Skip # Issue 29145
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
|
||||
import 'package:async_helper/async_minitest.dart';
|
||||
|
||||
import 'causal_async_exception_stack_helper.dart' as h;
|
||||
import 'lazy_async_exception_stack_helper.dart' as h;
|
||||
|
||||
foo3() async => throw "foo";
|
||||
bar3() async => throw "bar";
|
||||
@@ -93,7 +93,7 @@ test2() async {
|
||||
}
|
||||
|
||||
main() async {
|
||||
test('causal async exception stack', () async {
|
||||
test('lazy async exception stack', () async {
|
||||
await test1();
|
||||
await test2();
|
||||
});
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
|
||||
import 'package:async_helper/async_minitest.dart';
|
||||
|
||||
import 'causal_async_exception_stack_helper.dart' as h;
|
||||
import 'lazy_async_exception_stack_helper.dart' as h;
|
||||
|
||||
thrower() async {
|
||||
throw 'oops';
|
||||
@@ -29,7 +29,7 @@ foo() async {
|
||||
|
||||
main() async {
|
||||
// Test async and async*.
|
||||
test('causal async exception stack', () async {
|
||||
test('lazy async exception stack', () async {
|
||||
try {
|
||||
await foo();
|
||||
fail("Did not throw");
|
||||
@@ -48,8 +48,8 @@ enum/private_test/01: Crash # Issue 34606
|
||||
unsorted/inference_enum_list_test: Skip # Issue 35885
|
||||
|
||||
[ $compiler == dartk && $mode == product && $runtime == vm ]
|
||||
vm/causal_async_exception_stack2_test: SkipByDesign
|
||||
vm/causal_async_exception_stack_test: SkipByDesign
|
||||
vm/lazy_async_exception_stack2_test: SkipByDesign
|
||||
vm/lazy_async_exception_stack_test: SkipByDesign
|
||||
|
||||
# ===== dartk + vm status lines =====
|
||||
[ $compiler == dartk && $runtime == vm ]
|
||||
@@ -91,9 +91,9 @@ null_test/none: SkipByDesign
|
||||
optimize/deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot
|
||||
unsorted/hello_dart_test: Skip # Incompatible flag: --compile_all
|
||||
unsorted/invocation_mirror2_test: SkipByDesign
|
||||
vm/causal_async_exception_stack2_test: SkipByDesign
|
||||
vm/causal_async_exception_stack_test: SkipByDesign
|
||||
vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM
|
||||
vm/lazy_async_exception_stack2_test: SkipByDesign
|
||||
vm/lazy_async_exception_stack_test: SkipByDesign
|
||||
vm/reflect_core_vm_test: SkipByDesign
|
||||
vm/regress_27671_test: Skip # Unsupported
|
||||
vm/regress_29145_test: Skip # Issue 29145
|
||||
@@ -118,4 +118,4 @@ unsorted/disassemble_test: Slow, Pass
|
||||
optimize/deopt_inlined_function_lazy_test: Skip
|
||||
|
||||
[ $mode == debug && ($hot_reload || $hot_reload_rollback) ]
|
||||
regress/regress41983_test: Pass, Slow
|
||||
regress/regress41983_test: Pass, Slow
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
|
||||
import 'package:async_helper/async_minitest.dart';
|
||||
|
||||
import 'causal_async_exception_stack_helper.dart' as h;
|
||||
import 'lazy_async_exception_stack_helper.dart' as h;
|
||||
|
||||
foo3() async => throw "foo";
|
||||
bar3() async => throw "bar";
|
||||
@@ -95,7 +95,7 @@ test2() async {
|
||||
}
|
||||
|
||||
main() async {
|
||||
test('causal async exception stack', () async {
|
||||
test('lazy async exception stack', () async {
|
||||
await test1();
|
||||
await test2();
|
||||
});
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
|
||||
import 'package:async_helper/async_minitest.dart';
|
||||
|
||||
import 'causal_async_exception_stack_helper.dart' as h;
|
||||
import 'lazy_async_exception_stack_helper.dart' as h;
|
||||
|
||||
thrower() async {
|
||||
throw 'oops';
|
||||
@@ -31,7 +31,7 @@ foo() async {
|
||||
|
||||
main() async {
|
||||
// Test async and async*.
|
||||
test('causal async exception stack', () async {
|
||||
test('lazy async exception stack', () async {
|
||||
try {
|
||||
await foo();
|
||||
fail("Did not throw");
|
||||
@@ -41,7 +41,7 @@ io/socket_sigpipe_test: SkipByDesign # Spawns server process using Platform.exec
|
||||
deferred_transitive_import_error_test: Skip
|
||||
|
||||
[ $compiler == dartkp ]
|
||||
causal_async_stack_test: Skip # Flaky.
|
||||
lazy_async_stack_test: Skip # Flaky.
|
||||
|
||||
[ $mode == product ]
|
||||
io/stdio_implicit_close_test: Skip # SkipByDesign
|
||||
|
||||
@@ -41,7 +41,7 @@ io/socket_sigpipe_test: SkipByDesign # Spawns server process using Platform.exec
|
||||
deferred_transitive_import_error_test: Skip
|
||||
|
||||
[ $compiler == dartkp ]
|
||||
causal_async_stack_test: Skip # Flaky.
|
||||
lazy_async_stack_test: Skip # Flaky.
|
||||
|
||||
[ $mode == product ]
|
||||
io/stdio_implicit_close_test: Skip # SkipByDesign
|
||||
|
||||
Reference in New Issue
Block a user