From 4bf3ae9930a155f238dfd471413c866912b2579e Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 11 Nov 2014 13:28:29 -0800 Subject: ART: Compiled-classes list for compiler-driver Similar to the image-classes list, introduce a list of class names that are to be compiled when creating a boot image. This defaults to all classes. Bug: 18336591 (cherry picked from commit 26318f722958ac1cba6a812026a1377f37c54941) Change-Id: I95f69afdb500a9defb6795803d4040bbe67c5a01 --- compiler/driver/compiler_driver.h | 12 +++++++++++- 1 file changed, 11 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 682b17a7d1..ddb2342b42 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -91,6 +91,7 @@ class CompilerDriver { InstructionSet instruction_set, const InstructionSetFeatures* instruction_set_features, bool image, std::set* image_classes, + std::set* compiled_classes, size_t thread_count, bool dump_stats, bool dump_passes, CumulativeLogger* timer, const std::string& profile_file); @@ -374,6 +375,9 @@ class CompilerDriver { // Checks if class specified by type_idx is one of the image_classes_ bool IsImageClass(const char* descriptor) const; + // Checks if the provided class should be compiled, i.e., is in classes_to_compile_. + bool IsClassToCompile(const char* descriptor) const; + void RecordClassStatus(ClassReference ref, mirror::Class::Status status) LOCKS_EXCLUDED(compiled_classes_lock_); @@ -475,7 +479,8 @@ class CompilerDriver { void CompileMethod(const DexFile::CodeItem* code_item, uint32_t access_flags, InvokeType invoke_type, uint16_t class_def_idx, uint32_t method_idx, jobject class_loader, const DexFile& dex_file, - DexToDexCompilationLevel dex_to_dex_compilation_level) + DexToDexCompilationLevel dex_to_dex_compilation_level, + bool compilation_enabled) LOCKS_EXCLUDED(compiled_methods_lock_); static void CompileClass(const ParallelCompilationManager* context, size_t class_def_index) @@ -514,6 +519,11 @@ class CompilerDriver { // included in the image. std::unique_ptr> image_classes_; + // If image_ is true, specifies the classes that will be compiled in + // the image. Note if classes_to_compile_ is nullptr, all classes are + // included in the image. + std::unique_ptr> classes_to_compile_; + size_t thread_count_; class AOTCompilationStats; -- cgit v1.2.3-59-g8ed1b