diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2015-05-07 10:47:27 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2015-05-07 11:28:08 -0700 |
commit | 1cc71ebf333ca323ae0e130fefbce4593e385c10 (patch) | |
tree | e94897ebb36a21f1c276fc69c44f6a3522cbe093 /runtime/arch | |
parent | 35b6625c21e9304dd79700f4ff1c26a7e30d2b2d (diff) | |
download | art-1cc71ebf333ca323ae0e130fefbce4593e385c10.tar.gz art-1cc71ebf333ca323ae0e130fefbce4593e385c10.tar.bz2 art-1cc71ebf333ca323ae0e130fefbce4593e385c10.zip |
Insert a read barrier in the JNI bridge.
Bug: 20720510
Bug: 12687968
Change-Id: Ia9edb614853bad45ec25d6e2142361a8bda1eccf
Diffstat (limited to 'runtime/arch')
-rw-r--r-- | runtime/arch/arm/entrypoints_init_arm.cc | 3 | ||||
-rw-r--r-- | runtime/arch/arm64/entrypoints_init_arm64.cc | 3 | ||||
-rw-r--r-- | runtime/arch/mips/entrypoints_init_mips.cc | 3 | ||||
-rw-r--r-- | runtime/arch/mips64/entrypoints_init_mips64.cc | 3 | ||||
-rw-r--r-- | runtime/arch/x86/entrypoints_init_x86.cc | 3 | ||||
-rw-r--r-- | runtime/arch/x86_64/entrypoints_init_x86_64.cc | 3 |
6 files changed, 18 insertions, 0 deletions
diff --git a/runtime/arch/arm/entrypoints_init_arm.cc b/runtime/arch/arm/entrypoints_init_arm.cc index f14dfc27ae..cafc868789 100644 --- a/runtime/arch/arm/entrypoints_init_arm.cc +++ b/runtime/arch/arm/entrypoints_init_arm.cc @@ -166,6 +166,9 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, qpoints->pThrowStackOverflow = art_quick_throw_stack_overflow; qpoints->pDeoptimize = art_quick_deoptimize; + + // Read barrier + qpoints->pReadBarrierJni = ReadBarrierJni; } } // namespace art diff --git a/runtime/arch/arm64/entrypoints_init_arm64.cc b/runtime/arch/arm64/entrypoints_init_arm64.cc index 4b12f00d0d..8c8f8d51a8 100644 --- a/runtime/arch/arm64/entrypoints_init_arm64.cc +++ b/runtime/arch/arm64/entrypoints_init_arm64.cc @@ -159,6 +159,9 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, // Deoptimize qpoints->pDeoptimize = art_quick_deoptimize; + + // Read barrier + qpoints->pReadBarrierJni = ReadBarrierJni; }; } // namespace art diff --git a/runtime/arch/mips/entrypoints_init_mips.cc b/runtime/arch/mips/entrypoints_init_mips.cc index a980a86135..ff04106f15 100644 --- a/runtime/arch/mips/entrypoints_init_mips.cc +++ b/runtime/arch/mips/entrypoints_init_mips.cc @@ -272,6 +272,9 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, static_assert(IsDirectEntrypoint(kQuickA64Load), "Non-direct C stub marked direct."); qpoints->pA64Store = QuasiAtomic::Write64; static_assert(IsDirectEntrypoint(kQuickA64Store), "Non-direct C stub marked direct."); + + qpoints->pReadBarrierJni = ReadBarrierJni; + static_assert(!IsDirectEntrypoint(kQuickReadBarrierJni), "Non-direct C stub marked direct."); }; } // namespace art diff --git a/runtime/arch/mips64/entrypoints_init_mips64.cc b/runtime/arch/mips64/entrypoints_init_mips64.cc index b328708409..321c27bf50 100644 --- a/runtime/arch/mips64/entrypoints_init_mips64.cc +++ b/runtime/arch/mips64/entrypoints_init_mips64.cc @@ -180,6 +180,9 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, // Atomic 64-bit load/store qpoints->pA64Load = QuasiAtomic::Read64; qpoints->pA64Store = QuasiAtomic::Write64; + + // Read barrier + qpoints->pReadBarrierJni = ReadBarrierJni; }; } // namespace art diff --git a/runtime/arch/x86/entrypoints_init_x86.cc b/runtime/arch/x86/entrypoints_init_x86.cc index a371632367..737f4d1c5b 100644 --- a/runtime/arch/x86/entrypoints_init_x86.cc +++ b/runtime/arch/x86/entrypoints_init_x86.cc @@ -138,6 +138,9 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, // Deoptimize qpoints->pDeoptimize = art_quick_deoptimize_from_compiled_slow_path; + + // Read barrier + qpoints->pReadBarrierJni = ReadBarrierJni; }; } // namespace art diff --git a/runtime/arch/x86_64/entrypoints_init_x86_64.cc b/runtime/arch/x86_64/entrypoints_init_x86_64.cc index 0cddec4102..d0ab9d5d49 100644 --- a/runtime/arch/x86_64/entrypoints_init_x86_64.cc +++ b/runtime/arch/x86_64/entrypoints_init_x86_64.cc @@ -142,6 +142,9 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, // Deoptimize qpoints->pDeoptimize = art_quick_deoptimize_from_compiled_slow_path; + + // Read barrier + qpoints->pReadBarrierJni = ReadBarrierJni; #endif // __APPLE__ }; |