RFR: 8319799: Recursive lightweight locking: x86 implementation [v13]

Roman Kennke rkennke at openjdk.org
Thu Jan 25 13:45:29 UTC 2024


On Thu, 25 Jan 2024 13:31:50 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> Uh I see. This whole loading of the thread in x86_32 made me think (a while back) to not have any asm 'fast'-paths for x86_64 to begin with. IIRC, get_thread() calls into the runtime anyway, and if we do that anyway (sometimes repeatedly), we might just as well handle the whole locking there. It's annoying.
>
> There is no clear satisfying solution for this. Either multiple function names `lightweight_{unlock,lock}_with_thread` , using an extra bool argument to signal that the thread is loaded, or overload the type one with `Register` the other with `Register*`.
> 
> I tried something like a00f2e9e7f9b4d1abdcd5931ff8ba62c1d2de868 and 8eaa53e5cd9d3b17d16516af599f451ac4531c8b

Ah, nevermind. Leave it with extra argument for thread, then.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16607#discussion_r1466397666


More information about the hotspot-dev mailing list