[foreign-memaccess+abi] RFR: 8311594: Avoid GlobalSession liveness check [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Jul 11 14:27:22 UTC 2023


On Tue, 11 Jul 2023 14:05:56 GMT, Brian S. O'Neill <duke at openjdk.org> wrote:

> There's a ton of different access patterns, and most of them cannot be implemented as simple loops. This statement concerns me the most: "a single memory access using MemorySegment, ByteBuffer or any other API which enforces some extra checks is always going to be slower than same access using Unsafe" If the MemorySegment is global and encompasses the entire address space, why should there be any extra checks at all compared to Unsafe?

The main point I'm trying to make here is that, so far at least, we're speculating as to what the cause of the regression might be. What we need to do is (a) be able to reproduce the issue you are experiencing (there is no evidence so far that the fix in this PR does anything to ameliorate your situation and I wouldn't be too surprised if it did not help at all) and (b) find some ways to mitigate it (where and if possible). For (a) we need help, as we are essentially discussing code without being able to see it, which is not optimal.

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

PR Review Comment: https://git.openjdk.org/panama-foreign/pull/844#discussion_r1259818488


More information about the panama-dev mailing list