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

Leela Mohan Venati duke at openjdk.org
Mon Oct 23 20:56:41 UTC 2023


On Mon, 23 Oct 2023 19:27:26 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> src/hotspot/share/oops/method.cpp line 311:
>> 
>>> 309: void Method::mask_for(int bci, InterpreterOopMap* mask) {
>>> 310:   methodHandle h_this(Thread::current(), this);
>>> 311:   method_holder()->mask_for(h_this, bci, mask);
>> 
>> Removing this condition allows all the threads including java threads to use/mutate oopMapCache. 
>> 
>> For ex: Java threads calls [JVM_CallStackWalk](https://github.com/openjdk/jdk/blob/741ae06c55de65dcdfe38e328022bd8dde4fa007/src/hotspot/share/prims/jvm.cpp#L586) which walks the stack and calls locals() and expressions [here](https://github.com/openjdk/jdk/blob/741ae06c55de65dcdfe38e328022bd8dde4fa007/src/hotspot/share/prims/stackwalk.cpp#L345)  which access oopMapCache.
>
> The `oopMapCache` now is fully concurrent, it can be used/modified by Java threads.

Which thread takes up responsibility of cleaning up old entries accumulated by java threads.  Allowing for java threads definitely increases the scope (than it is mentioned in the bug ).

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

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


More information about the hotspot-runtime-dev mailing list