Call method entry hooks only when we have method entry listeners

We don't need to anything when there are no method entry listeners on
method entry. So tighten the check so we call method entry hook only
when method entry listeners are installed. Earlier, we used to call
whenever the stack is instrumented or instrumentation stubs are
installed.

Drive by fix: remove unused constant from runtime.def

Bug: 253232638
Test: art/test.py
Change-Id: I6bdb4207804fd9c79fd7f21500c00b47e12beef3
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc
index b34b613..2cc367f 100644
--- a/compiler/optimizing/code_generator_arm64.cc
+++ b/compiler/optimizing/code_generator_arm64.cc
@@ -1169,8 +1169,10 @@
   codegen_->AddSlowPath(slow_path);
 
   uint64_t address = reinterpret_cast64<uint64_t>(Runtime::Current()->GetInstrumentation());
-  int offset = instrumentation::Instrumentation::NeedsEntryExitHooksOffset().Int32Value();
-  __ Mov(temp, address + offset);
+  MemberOffset  offset = instruction->IsMethodExitHook() ?
+      instrumentation::Instrumentation::NeedsExitHooksOffset() :
+      instrumentation::Instrumentation::HaveMethodEntryListenersOffset();
+  __ Mov(temp, address + offset.Int32Value());
   __ Ldrb(value, MemOperand(temp, 0));
   __ Cbnz(value, slow_path->GetEntryLabel());
   __ Bind(slow_path->GetExitLabel());