RFR: 8356075: Support Shenandoah GC in JVMCI [v3]
Roman Kennke
rkennke at openjdk.org
Mon May 5 16:58:01 UTC 2025
On Mon, 5 May 2025 16:46:46 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> It's about the argument ordering. Graal expects the Thread* to be prependend, while other JITs call it with the Thread* appended. I guess we could change other JIT calls to also prepend the thread, or change the interface to not pass the Thread* at all. I chose to follow G1 and export both variants.
>
> Oh, so this matches `JVMCIRuntime::write_barrier_pre` for G1 (weird place to have it, but oh well).
>
> Does Graal need the `Thread*` argument?
>
> I think this method is only called when SATB buffer is full. So the performance of this method is likely not affected by getting the current thread down in caller. So I think it would be more straight-forward to sharpen `ShenandoahRuntime::write_ref_field_pre` by dropping `Thread*` and then exporting that. Maybe also under the `SR::write_barrier_pre` name to be even more consistent for everything else.
>
> Maybe @JohnTortugo wants to clean up more mess in C2 related to this :)
Graal does not need the Thread* argument, but the runtime code behind write_ref_pre() currently uses it. I agree, it does not look performance critical to pass it through. However, getting rid of it seems to blow the scope of this PR. I'd rather do this as a follow-up.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25001#discussion_r2073807949
More information about the shenandoah-dev
mailing list