RFR (S): 8235341: Improve WorkerDataArray API to disallow separate instantiation of sub-items

Stefan Johansson stefan.johansson at oracle.com
Thu Dec 5 10:10:00 UTC 2019


Hi Thomas,

> 5 dec. 2019 kl. 10:27 skrev Thomas Schatzl <thomas.schatzl at oracle.com>:
> 
> Hi all,
> 
>  can I have reviews for this follow-up change of JDK-8235247 that improves the API about using sub-items in WorkerDataArray to effectively disallow manual handling of them.
> 
> This makes it hopefully clear how to use sub-WorkerDataArrays, and impossible to use them separately, obviating questions about ownership.
> 
> The change is mostly about changing the link_thread_work_items() method to internally construct the sub-WorkerDataArray; this results in a lot of obsolete code that has been removed here.
> 
> This cleanup is followed by a change of the argument order in the WorkerDataArray constructor to make the argument order similar to link/add_thread_work_items().
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8235341
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8235341/webrev/
Really nice cleanup. Everything looks good, but I would prefer if we renamed add_thread_work_items to create_thread_work_items. 

Thanks,
Stefan

> Testing:
> hs-tier1-3
> 
> Thanks,
>  Thomas




More information about the hotspot-gc-dev mailing list