You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace scanMonitorLookupCaches() loop with memset #24803
scanMonitorLookupCaches() iterates over each slot in J9VMThread->objectMonitorLookupCache and calls the virtual method doMonitorLookupCacheSlot() to zero it during a GC root scan. This uses the pattern of looping over the cache slots and dispatching a virtual method to perform the intended GC specific operation.
This pattern is not utilized for this use-case, and the cache slots are only zeroed for all GCs. Hence the loop and if-condition are unnecessary and can be replaced with some memset.
scanMonitorLookupCaches():
...
for (; cacheIndex < J9VMTHREAD_OBJECT_MONITOR_CACHE_SIZE; cacheIndex++) {
doMonitorLookupCacheSlot(&objectMonitorLookupCache[cacheIndex]);
}
...
doMonitorLookupCacheSlot():
if (0 != *slotPtr) {
*slotPtr = 0; // just zero it out
}
Activity
Satineee commentedon Oct 9, 2026
Hi, I'd like to work on this.
Replace monitor lookup cache clearing loop with memset