diff options
| author | 2016-04-06 10:47:45 -0700 | |
|---|---|---|
| committer | 2016-04-06 11:42:42 -0700 | |
| commit | f2f0f4b0b9185fe0b6d1fb22744a871c96296db2 (patch) | |
| tree | c00bbd43cb73d098e11831bf7be71b4a5b0224e7 /compiler/driver/compiler_driver.h | |
| parent | d1bdb7cc301a75050bd440597997421c6b9278d9 (diff) | |
Change RequiresConstructorBarrier default to yes
Previously it defaulted to false, this caused incorrect dex2dex if
the resolution pass was not run.
TODO: Re-enable the no barrier for no resolution case to improve
interpreter performance slightly.
Bug: 28005874
(cherry picked from commit e5d8020b03956db6d533852b3ae940e0eb0fafc4)
Change-Id: Ibde6e18b8543f7bc9e17db6941a710756cd8b617
Diffstat (limited to 'compiler/driver/compiler_driver.h')
| -rw-r--r-- | compiler/driver/compiler_driver.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 64a06a2f83..98e3d890cd 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -183,12 +183,12 @@ class CompilerDriver { // Remove and delete a compiled method. void RemoveCompiledMethod(const MethodReference& method_ref) REQUIRES(!compiled_methods_lock_); - void AddRequiresConstructorBarrier(Thread* self, const DexFile* dex_file, + void AddRequiresNoConstructorBarrier(Thread* self, const DexFile* dex_file, uint16_t class_def_index) - REQUIRES(!freezing_constructor_lock_); + REQUIRES(!no_barrier_constructor_classes_lock_); bool RequiresConstructorBarrier(Thread* self, const DexFile* dex_file, uint16_t class_def_index) const - REQUIRES(!freezing_constructor_lock_); + REQUIRES(!no_barrier_constructor_classes_lock_); // Callbacks from compiler to see what runtime checks must be generated. @@ -629,9 +629,10 @@ class CompilerDriver { const InstructionSet instruction_set_; const InstructionSetFeatures* const instruction_set_features_; - // All class references that require - mutable ReaderWriterMutex freezing_constructor_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; - std::set<ClassReference> freezing_constructor_classes_ GUARDED_BY(freezing_constructor_lock_); + // All class references that do not require constructor barriers + mutable ReaderWriterMutex no_barrier_constructor_classes_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; + std::set<ClassReference> no_barrier_constructor_classes_ + GUARDED_BY(no_barrier_constructor_classes_lock_); typedef SafeMap<const ClassReference, CompiledClass*> ClassTable; // All class references that this compiler has compiled. |