Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Unified Diff: runtime/vm/benchmark_test.cc

Issue 1731743003: Move precompilation-related flags to flags list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make print_stop_message default false to fix build Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/block_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/benchmark_test.cc
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 488a2d918da432540c506dca731fc8566e60e38e..1c59f8dbea52baec1fe3415f98e60df98d225161 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -20,8 +20,6 @@ using dart::bin::File;
namespace dart {
-DECLARE_FLAG(bool, background_compilation);
-
Benchmark* Benchmark::first_ = NULL;
Benchmark* Benchmark::tail_ = NULL;
const char* Benchmark::executable_ = NULL;
@@ -181,10 +179,15 @@ BENCHMARK(Dart2JSCompilerStats) {
stats->EnableBenchmark();
Timer timer(true, "Compile all of dart2js benchmark");
timer.Start();
+#if !defined(PRODUCT)
+ // Constant in product mode.
const bool old_flag = FLAG_background_compilation;
FLAG_background_compilation = false;
+#endif
Dart_Handle result = Dart_CompileAll();
+#if !defined(PRODUCT)
FLAG_background_compilation = old_flag;
+#endif
EXPECT_VALID(result);
timer.Stop();
int64_t elapsed_time = timer.TotalElapsedTime();
@@ -387,10 +390,14 @@ BENCHMARK(Dart2JSCompileAll) {
}
Timer timer(true, "Compile all of dart2js benchmark");
timer.Start();
+#if !defined(PRODUCT)
const bool old_flag = FLAG_background_compilation;
FLAG_background_compilation = false;
+#endif
Dart_Handle result = Dart_CompileAll();
+#if !defined(PRODUCT)
FLAG_background_compilation = old_flag;
+#endif
EXPECT_VALID(result);
timer.Stop();
int64_t elapsed_time = timer.TotalElapsedTime();
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/block_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698