diff options
author | 2022-10-21 13:28:05 +0000 | |
---|---|---|
committer | 2022-11-04 07:46:10 +0000 | |
commit | bab6beb1f1299c13a0be5fbb4344facb6d7be7e3 (patch) | |
tree | 2524f91405543bc17e068a051a6932e9a71bfb37 /compiler/jni/quick/calling_convention.h | |
parent | c232049c9980e6a80baf91f135baf89f23d9075d (diff) |
Update method exit hooks from JITed code to not use Stack visitor
Using NthCallerStackVisitor is expensive since that involves decoding
method header and other tasks that are reasonably expensive especially
when called on every method exit. When calling method exit hooks from
JITed code a lot of this information like the frame_size, calling method
are already known and can be directly passed to the method exit hook
instead of computing them.
Locally this change improves the performance by 70% on debuggable-cc
config of golem benchmarks.
Bug: 253232638
Test: art/test.py
Change-Id: I3a1d80748c6d85e5fa1d3bd4aec0b29962ba0156
Diffstat (limited to 'compiler/jni/quick/calling_convention.h')
-rw-r--r-- | compiler/jni/quick/calling_convention.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h index e2f3bfb78c..8fe8e003f0 100644 --- a/compiler/jni/quick/calling_convention.h +++ b/compiler/jni/quick/calling_convention.h @@ -244,6 +244,11 @@ class ManagedRuntimeCallingConvention : public CallingConvention { // Register that holds the incoming method argument virtual ManagedRegister MethodRegister() = 0; + // Register that is used to pass frame size for method exit hook call. This + // shouldn't be the same as the return register since method exit hook also expects + // return values in the return register. + virtual ManagedRegister ArgumentRegisterForMethodExitHook() = 0; + // Iterator interface bool HasNext(); virtual void Next(); |