summaryrefslogtreecommitdiff
path: root/runtime/entrypoints_order_test.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2021-10-13 15:39:37 +0000
committer Mythri Alle <mythria@google.com> 2021-11-01 08:31:54 +0000
commit2d4feeb67912d64b9e980e6687794826a5c22f9d (patch)
tree7ab2071bbf5d5907d205b8e2a092ea9869974ba1 /runtime/entrypoints_order_test.cc
parent60abdd9c89525a277d75df19ff2792614651e1ff (diff)
Add support for calling entry / exit hooks directly from JIT code
The idea of this CL is to avoid maintaining the instrumentation stack and manipulating the return addresses on the stack to call the entry / exit hooks. This Cl only addresses this for JITed code. In follow up CLs, we will extend this to others (native, nterp). Once we have everything in place we could remove the complexity of instrumentation stack. This CL introduces new nodes (HMethodEntry / HMethodExit(Void)) that generate code to call the trace entry / exit hooks when instrumentation_stubs are installed. Currently these are introduced for JITed code in debuggable mode. The entry / exit hooks roughly do the same this as instrumentation entry / exit points. We also extend the JITed frame slots by adding a ShouldDeoptimize slot. This will be used to force deoptimization of frames when requested by jvmti (for ex: structural re-definition). Test: art/testrunner.py Change-Id: Id4aa439731d214a8d2b820a67e75415ca1d5424e
Diffstat (limited to 'runtime/entrypoints_order_test.cc')
-rw-r--r--runtime/entrypoints_order_test.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/entrypoints_order_test.cc b/runtime/entrypoints_order_test.cc
index 73f97bc60b..b515245a12 100644
--- a/runtime/entrypoints_order_test.cc
+++ b/runtime/entrypoints_order_test.cc
@@ -405,9 +405,13 @@ class EntrypointsOrderTest : public CommonRuntimeTest {
EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg29, pReadBarrierSlow, sizeof(void*));
EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierSlow, pReadBarrierForRootSlow,
sizeof(void*));
+ EXPECT_OFFSET_DIFFNP(
+ QuickEntryPoints, pReadBarrierForRootSlow, pMethodEntryHook, sizeof(void*));
+ EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pMethodEntryHook, pMethodExitHook, sizeof(void*));
- CHECKED(OFFSETOF_MEMBER(QuickEntryPoints, pReadBarrierForRootSlow)
- + sizeof(void*) == sizeof(QuickEntryPoints), QuickEntryPoints_all);
+ CHECKED(OFFSETOF_MEMBER(QuickEntryPoints, pMethodExitHook) + sizeof(void*) ==
+ sizeof(QuickEntryPoints),
+ QuickEntryPoints_all);
}
};