RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v5]
    Coleen Phillimore 
    coleenp at openjdk.org
       
    Wed Oct 23 19:25:17 UTC 2024
    
    
  
On Wed, 23 Oct 2024 06:15:27 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Why do we need to cache it? Is it the implicit barriers related to accessing the threadObj oop each time?
We cache threadObj.thread_id in JavaThread::_lock_id so that the fast path c2_MacroAssembler code has one less load and code to find the offset of java.lang.Thread.threadId in the code.  Also, yes, we were worried about performance of the barrier in this path.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21565#issuecomment-2433252605
    
    
More information about the graal-dev
mailing list