diff options
author | Vladimir Marko <vmarko@google.com> | 2016-05-23 15:32:42 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2016-05-23 18:12:11 +0100 |
commit | 8c185bf0c6f18a5349bc87a7e3751ba06d90f461 (patch) | |
tree | e5f187c737d2930fa1ea7876846cffd9cf5ce225 /compiler | |
parent | 6b2f0b5775380de2cb8714f9d2cee91ea4c6d543 (diff) | |
download | art-8c185bf0c6f18a5349bc87a7e3751ba06d90f461.tar.gz art-8c185bf0c6f18a5349bc87a7e3751ba06d90f461.tar.bz2 art-8c185bf0c6f18a5349bc87a7e3751ba06d90f461.zip |
Compile JNI stubs for verify-profile and interpret-only.
This is the intended behavior to have a good JNI transition
performance.
Bug: 28902384
Change-Id: Iedb2ca343d66cf422ef2dc0527639e81d6ba8960
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/dex/verification_results.cc | 2 | ||||
-rw-r--r-- | compiler/driver/compiler_driver.cc | 4 | ||||
-rw-r--r-- | compiler/driver/compiler_options.h | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/compiler/dex/verification_results.cc b/compiler/dex/verification_results.cc index 606302bd78..03c94a45e3 100644 --- a/compiler/dex/verification_results.cc +++ b/compiler/dex/verification_results.cc @@ -104,7 +104,7 @@ bool VerificationResults::IsClassRejected(ClassReference ref) { bool VerificationResults::IsCandidateForCompilation(MethodReference&, const uint32_t access_flags) { - if (!compiler_options_->IsCompilationEnabled()) { + if (!compiler_options_->IsBytecodeCompilationEnabled()) { return false; } // Don't compile class initializers unless kEverything. diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 4d622bdddf..4594e2cc42 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -553,8 +553,8 @@ static void CompileMethod(Thread* self, MethodReference method_ref(&dex_file, method_idx); if ((access_flags & kAccNative) != 0) { - // Are we interpreting only and have support for generic JNI down calls? - if (!driver->GetCompilerOptions().IsCompilationEnabled() && + // Are we extracting only and have support for generic JNI down calls? + if (!driver->GetCompilerOptions().IsJniCompilationEnabled() && InstructionSetHasGenericJniStub(driver->GetInstructionSet())) { // Leaving this empty will trigger the generic JNI version } else { diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index c67ab6ef14..6d4455e65c 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -89,8 +89,12 @@ class CompilerOptions FINAL { return compiler_filter_ == CompilerFilter::kVerifyAtRuntime; } - bool IsCompilationEnabled() const { - return CompilerFilter::IsCompilationEnabled(compiler_filter_); + bool IsBytecodeCompilationEnabled() const { + return CompilerFilter::IsBytecodeCompilationEnabled(compiler_filter_); + } + + bool IsJniCompilationEnabled() const { + return CompilerFilter::IsJniCompilationEnabled(compiler_filter_); } bool IsVerificationEnabled() const { |