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_driver.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'compiler/driver/compiler_driver.h') diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 4ef26ddd6c..64a06a2f83 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -91,7 +91,8 @@ class CompilerDriver { Compiler::Kind compiler_kind, InstructionSet instruction_set, const InstructionSetFeatures* instruction_set_features, - bool boot_image, std::unordered_set* image_classes, + bool boot_image, + std::unordered_set* image_classes, std::unordered_set* compiled_classes, std::unordered_set* compiled_methods, size_t thread_count, @@ -435,6 +436,10 @@ class CompilerDriver { // according to the profile file. bool ShouldCompileBasedOnProfile(const MethodReference& method_ref) const; + // Checks whether profile guided verification is enabled and if the method should be verified + // according to the profile file. + bool ShouldVerifyClassBasedOnProfile(const DexFile& dex_file, uint16_t class_idx) const; + void RecordClassStatus(ClassReference ref, mirror::Class::Status status) REQUIRES(!compiled_classes_lock_); -- cgit v1.2.3-59-g8ed1b