RFR: 8317466: Enable interpreter oopMapCache for concurrent GCs [v2]

Leela Mohan Venati duke at openjdk.org
Wed Oct 11 18:50:17 UTC 2023


On Wed, 11 Oct 2023 18:44:04 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> Interpreter oop maps are computed lazily during GC root scan and they are expensive to compute.
>> 
>> GCs uses a small hash table per instance class to cache computed oop maps during STW root scan, but not for concurrent root scan.
>> 
>> This patch is intended to enable `OopMapCache` for concurrent GCs.
>> 
>> Test:
>>   tier1 and tier2 fastdebug and release on MacOSX, Linux 86_84 and Linux 86_32.
>
> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Cleanup old oop map cache entry after class redefinition

src/hotspot/share/interpreter/oopMapCache.cpp line 506:

> 504: 
> 505:       if (Atomic::cmpxchg(&_array[i], entry, (OopMapCacheEntry*)nullptr, memory_order_relaxed) == entry) {
> 506:         enqueue_for_cleanup(entry);

OopMapCache::flush_obsolete_entries() is called from VM_RedefineClasses::doit(). Enqueuing  OopMapCacheEntries for cleanup means that we would need call OopMapCache::cleanup_old_entries() in VM_RedefineClasses::doit_epilogue()

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16074#discussion_r1355360462


More information about the hotspot-runtime-dev mailing list