[vm] Don't run DFE with a low optimization threshold in profiler tests.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/49795
Change-Id: Iebe6b5c67b2bbd65399b25166f64392a15c7cc76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256241
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak 2022-08-24 19:49:59 +00:00 committed by Commit Bot
parent ece330a700
commit 39a671782b

View file

@ -1776,8 +1776,6 @@ ISOLATE_UNIT_TEST_CASE(Profiler_BasicSourcePositionOptimized) {
EnableProfiler();
DisableNativeProfileScope dnps;
DisableBackgroundCompilationScope dbcs;
// Optimize quickly.
SetFlagScope<int> sfs(&FLAG_optimization_counter_threshold, 5);
const char* kScript =
"class A {\n"
" var a;\n"
@ -1802,6 +1800,8 @@ ISOLATE_UNIT_TEST_CASE(Profiler_BasicSourcePositionOptimized) {
const Function& main = Function::Handle(GetFunction(root_library, "main"));
EXPECT(!main.IsNull());
// Optimize quickly.
SetFlagScope<int> sfs(&FLAG_optimization_counter_threshold, 5);
// Warm up function.
while (true) {
Invoke(root_library, "main");
@ -1949,9 +1949,6 @@ ISOLATE_UNIT_TEST_CASE(Profiler_SourcePositionOptimized) {
EnableProfiler();
DisableNativeProfileScope dnps;
DisableBackgroundCompilationScope dbcs;
// Optimize quickly.
SetFlagScope<int> sfs(&FLAG_optimization_counter_threshold, 5);
const char* kScript =
"class A {\n"
" var a;\n"
@ -1988,6 +1985,8 @@ ISOLATE_UNIT_TEST_CASE(Profiler_SourcePositionOptimized) {
const Function& main = Function::Handle(GetFunction(root_library, "main"));
EXPECT(!main.IsNull());
// Optimize quickly.
SetFlagScope<int> sfs(&FLAG_optimization_counter_threshold, 5);
// Warm up function.
while (true) {
Invoke(root_library, "main");
@ -2157,8 +2156,6 @@ ISOLATE_UNIT_TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) {
EnableProfiler();
DisableNativeProfileScope dnps;
DisableBackgroundCompilationScope dbcs;
// Optimize quickly.
SetFlagScope<int> sfs(&FLAG_optimization_counter_threshold, 5);
const char* kScript =
"class A {\n"
@ -2199,6 +2196,8 @@ ISOLATE_UNIT_TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) {
const Function& main = Function::Handle(GetFunction(root_library, "main"));
EXPECT(!main.IsNull());
// Optimize quickly.
SetFlagScope<int> sfs(&FLAG_optimization_counter_threshold, 5);
// Warm up function.
while (true) {
Invoke(root_library, "main");