From 486dda03900a215650f71a9068759978aa77c699 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 11 Sep 2017 14:15:52 +0100 Subject: Add support for registering classpath classes status. By doing class unloading after each dex file compilation, we are loosing away verification done on classpath classes. This change introduces a new table for keeping around class status of classpath classes. Multidex quickening compilation improved by ~5% by not re-verifying classpath classes. Bug: 63467744 test: test.py test: golem successfully compiles FB Change-Id: I629c0a7d86519bbc516f5e59f7cd92ca6ca842eb --- compiler/driver/compiler_driver.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/driver/compiler_driver.h') diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index d08d9d7940..19fae695b5 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -106,6 +106,7 @@ class CompilerDriver { // Set dex files that will be stored in the oat file after being compiled. void SetDexFilesForOatFile(const std::vector& dex_files); + void SetClasspathDexFiles(const std::vector& dex_files); // Get dex file that will be stored in the oat file after being compiled. ArrayRef GetDexFilesForOatFile() const { @@ -152,6 +153,7 @@ class CompilerDriver { std::unique_ptr> CreateQuickToInterpreterBridge() const; bool GetCompiledClass(ClassReference ref, mirror::Class::Status* status) const; + mirror::Class::Status GetClassStatus(ClassReference ref) const; CompiledMethod* GetCompiledMethod(MethodReference ref) const; size_t GetNonRelativeLinkerPatchCount() const; @@ -488,6 +490,7 @@ class CompilerDriver { // All class references that this compiler has compiled. Indexed by class defs. using ClassStateTable = AtomicDexRefMap; ClassStateTable compiled_classes_; + ClassStateTable classpath_classes_; typedef AtomicDexRefMap MethodTable; -- cgit v1.2.3-59-g8ed1b