diff options
author | Andreas Gampe <agampe@google.com> | 2015-06-24 16:25:33 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-06-25 10:29:12 -0700 |
commit | 005deb0a1683f9ee03a2cf2785dc6a7d7a8f16be (patch) | |
tree | 07722afeec14fde9e2d6804f8fb85c0b52017f77 /compiler | |
parent | 9ae03f09f33c64b6589e85faeac4142b80531b10 (diff) | |
download | art-005deb0a1683f9ee03a2cf2785dc6a7d7a8f16be.zip art-005deb0a1683f9ee03a2cf2785dc6a7d7a8f16be.tar.gz art-005deb0a1683f9ee03a2cf2785dc6a7d7a8f16be.tar.bz2 |
ART: Set methods to preverified in verify-none
Actually mark all methods to be verified, so that the interpreter
doesn't do access checks. Speedup is about 2x on a Nexus 6 when booting
in verify-none mode.
Bug: 22040916
(cherry picked from commit 1c284f2abdfe1b0ed87d5216021e69146f10b116)
Change-Id: I2d6c8df2a68eae6e358da2639d980cb8bfcc1560
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 19085cd..0613e6e 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -1971,7 +1971,13 @@ static void SetVerifiedClass(const ParallelCompilationManager* manager, size_t c if (klass->IsResolved()) { if (klass->GetStatus() < mirror::Class::kStatusVerified) { ObjectLock<mirror::Class> lock(soa.Self(), klass); + // Set class status to verified. mirror::Class::SetStatus(klass, mirror::Class::kStatusVerified, soa.Self()); + // Mark methods as pre-verified. If we don't do this, the interpreter will run with + // access checks. + klass->SetPreverifiedFlagOnAllMethods( + GetInstructionSetPointerSize(manager->GetCompiler()->GetInstructionSet())); + klass->SetPreverified(); } // Record the final class status if necessary. ClassReference ref(manager->GetDexFile(), class_def_index); |