RFR: 8287788: reuse intermediate segments allocated during FFM stub invocations [v6]

Matthias Ernst duke at openjdk.org
Mon Jan 20 18:47:37 UTC 2025


On Mon, 20 Jan 2025 18:39:06 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Matthias Ernst has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   whitespace :scream:
>
> test/jdk/java/foreign/CallBufferCacheTest.java line 95:
> 
>> 93:         assertTrue(CallBufferCache.release(address));
>> 94:         assertEquals(address, CallBufferCache.acquire());
>> 95:         Thread.ofPlatform().start(() -> {
> 
> Should this have been `ofVirtual`?

No, the point is that a virtual thread might take a segment while on carrier #1 but return on carrier #2 (moved between native call stub return but before call recipe closes the arena).
This test is trying to emulate that, i.e. afterwards carrier #2 owns and returns and carrier #1 doesn't know it anymore.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23142#discussion_r1922761016


More information about the core-libs-dev mailing list