From a807780b1d8ee01dfb03923c673621b4c81ac858 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 16 Mar 2016 19:08:31 -0700 Subject: Add verify-profile compiler filter Only verifies and dex2dex compiles classes in the profile. Goal is to reduce application launch time. ~2x faster than interpret-only for Facebook. Bug: 27688727 (cherry picked from commit a079e3aa62cceb76c1c1811e6e09bcaf75e20289) Change-Id: Iad5aa1adee3aa6c2408820e8cbbab2d4412021b8 --- compiler/driver/compiler_options.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'compiler/driver/compiler_options.h') diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index fbfa7c85f1..59698af459 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -39,6 +39,7 @@ class CompilerOptions FINAL { kSpeed, // Maximize runtime performance. kEverything, // Force compilation of everything capable of being compiled. kTime, // Compile methods, but minimize compilation time. + kVerifyProfile, // Verify only the classes in the profile. }; // Guide heuristics to determine whether to compile method if profile data not available. @@ -102,13 +103,14 @@ class CompilerOptions FINAL { bool IsCompilationEnabled() const { return compiler_filter_ != CompilerOptions::kVerifyNone && - compiler_filter_ != CompilerOptions::kInterpretOnly && - compiler_filter_ != CompilerOptions::kVerifyAtRuntime; + compiler_filter_ != CompilerOptions::kInterpretOnly && + compiler_filter_ != CompilerOptions::kVerifyAtRuntime && + compiler_filter_ != CompilerOptions::kVerifyProfile; } bool IsVerificationEnabled() const { return compiler_filter_ != CompilerOptions::kVerifyNone && - compiler_filter_ != CompilerOptions::kVerifyAtRuntime; + compiler_filter_ != CompilerOptions::kVerifyAtRuntime; } bool NeverVerify() const { @@ -119,6 +121,10 @@ class CompilerOptions FINAL { return compiler_filter_ == CompilerOptions::kVerifyAtRuntime; } + bool VerifyOnlyProfile() const { + return compiler_filter_ == CompilerOptions::kVerifyProfile; + } + size_t GetHugeMethodThreshold() const { return huge_method_threshold_; } -- cgit v1.2.3-59-g8ed1b