diff options
author | Mythri Alle <mythria@google.com> | 2022-05-10 16:13:04 +0000 |
---|---|---|
committer | Mythri Alle <mythria@google.com> | 2022-05-18 15:12:42 +0000 |
commit | 0acf79c6ac186caeb517883976d7a51517276a3b (patch) | |
tree | c218e2ce21311729828a0c4fa5c159a318b05667 | |
parent | dff7de431edb81f5fb5cc25df10fe8eda83d0e6e (diff) | |
download | art-0acf79c6ac186caeb517883976d7a51517276a3b.tar.gz |
Don't disable JIT GC when instrumentation is enabled
Earlier we used to disable GC when there are instrumentation stubs or
the stack is instrumented due to some races in updating the entry
points. This is fixed now and we no longer need to disable JIT GC. The
disabling of the JIT GC wasn't accurate too, we were missing some places
where we don't disable GC (for ex: when instrumenting after the process
has started) which was also causing some DCHECK failures. This CL
updates it to not disable JIT GC even when we have instrumented code
and removes obsolete DCHECKs.
(partial cherry pick from
commit 162d74a1608a46007832470b8245265c576185d5 to remove obsolete DCHECKs)
Bug: 231686121
Test: art/test.py
Change-Id: Ia4e18dcaad1d1ef9de30250ae4e5e52fa259316d
(cherry picked from commit 162d74a1608a46007832470b8245265c576185d5 )
Merged-In: I16bae31c34587f55889769f575c59ec9ed833e0b
-rw-r--r-- | runtime/entrypoints/quick/quick_trampoline_entrypoints.cc | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index 898b34dcae..b6ece4a86e 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc @@ -1041,18 +1041,7 @@ extern "C" const void* artInstrumentationMethodEntryFromCode(ArtMethod* method, // This will get the entry point either from the oat file, the JIT or the appropriate bridge // method if none of those can be found. result = instrumentation->GetCodeForInvoke(method); - jit::Jit* jit = Runtime::Current()->GetJit(); DCHECK_NE(result, GetQuickInstrumentationEntryPoint()) << method->PrettyMethod(); - DCHECK(jit == nullptr || - // Native methods come through here in Interpreter entrypoints. We might not have - // disabled jit-gc but that is fine since we won't return jit-code for native methods. - method->IsNative() || - !jit->GetCodeCache()->GetGarbageCollectCode()); - DCHECK(!method->IsNative() || - jit == nullptr || - !jit->GetCodeCache()->ContainsPc(result)) - << method->PrettyMethod() << " code will jump to possibly cleaned up jit code!"; - bool interpreter_entry = Runtime::Current()->GetClassLinker()->IsQuickToInterpreterBridge(result); bool is_static = method->IsStatic(); uint32_t shorty_len; |