JDK-8326759 : Lilliput: OMCache: Evaluate lookup unrolling and size
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2024-02-27
  • Updated: 2025-07-02
  • Resolved: 2025-07-02
Related Reports
Relates :  
Relates :  
Description
After JDK-8326752 is integrated. The effect of different unrolling thresholds and cache sizes needs to be evaluated. 
Comments
The implementation on x86 unrolls the first 2 oops in the OMCache: const int num_unrolled = 2; for (int i = 0; i < num_unrolled; i++) { cmpptr(obj, Address(t)); jccb(Assembler::equal, monitor_found); increment(t, in_bytes(OMCache::oop_to_oop_difference())); } Also 2 for aarch64. const int num_unrolled = 2; for (int i = 0; i < num_unrolled; i++) { ldr(t1, Address(t3_t)); cmp(obj, t1); br(Assembler::EQ, monitor_found); increment(t3_t, in_bytes(OMCache::oop_to_oop_difference())); } For linked bug JDK-8339114 we did experiments with the size of OMCache and didn't see performance benefits to smaller or larger OMCache sizes. We didn't evaluate different unrolling but am not optimistic that this would have a noticeable benefit across the board. I'm closing this as WNF. We have these ideas recorded in this issue.
02-07-2025