]
Radim Vansa updated ISPN-6062:
------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
Remove megamorphic calls when calling next method in interceptor
stack
----------------------------------------------------------------------
Key: ISPN-6062
URL:
https://issues.jboss.org/browse/ISPN-6062
Project: Infinispan
Issue Type: Enhancement
Components: Core
Affects Versions: 8.1.0.Final
Reporter: Radim Vansa
With current acceptor-visitor architecture of interceptor stack, calls to next
interceptor use megamorphic interface calls. This is suboptimal as it prohibits the JIT
compiler from inlining the calls.
Since the interceptor stack is not changed very often, we may adapt the code
programmatically to call next interceptor directly.
The solution should verify that interceptor stack is inlined as much as possible with
'common' JVM options - increasing -XX:MaxInlineLevel is viable, while we should
not request users to mess with -XX:DesiredMethodLimit. Preferably, -XX:FreqInlineSize and
-XX:MaxInlineSize should stay at defaults.