diff options
author | 2017-09-11 14:15:52 +0100 | |
---|---|---|
committer | 2017-09-15 12:45:28 +0100 | |
commit | 486dda03900a215650f71a9068759978aa77c699 (patch) | |
tree | 1f2a1331d3ec474c979db5f9a35dd11f453abc25 /compiler/dex/quick_compiler_callbacks.cc | |
parent | b072ec25f8a71420ee77b068a28a2669420f6150 (diff) |
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
Diffstat (limited to 'compiler/dex/quick_compiler_callbacks.cc')
-rw-r--r-- | compiler/dex/quick_compiler_callbacks.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/dex/quick_compiler_callbacks.cc b/compiler/dex/quick_compiler_callbacks.cc index 23511e55fc..92b123013d 100644 --- a/compiler/dex/quick_compiler_callbacks.cc +++ b/compiler/dex/quick_compiler_callbacks.cc @@ -44,11 +44,14 @@ ClassStatus QuickCompilerCallbacks::GetPreviousClassState(ClassReference ref) { // In the case of the quicken filter: avoiding verification of quickened instructions, which the // verifier doesn't currently support. // In the case of the verify filter, avoiding verifiying twice. - ClassStatus status; - if (!compiler_driver_->GetCompiledClass(ref, &status)) { - return ClassStatus::kStatusNotReady; + return compiler_driver_->GetClassStatus(ref); +} + +void QuickCompilerCallbacks::UpdateClassState(ClassReference ref, ClassStatus status) { + // Driver is null when bootstrapping the runtime. + if (compiler_driver_ != nullptr) { + compiler_driver_->RecordClassStatus(ref, status); } - return status; } } // namespace art |