RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

Alan Bateman alanb at openjdk.java.net
Wed Apr 27 19:25:53 UTC 2022


On Wed, 27 Apr 2022 17:53:01 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> Alan Bateman has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e
>
> src/java.base/share/classes/jdk/internal/misc/UnsafeConstants.java line 122:
> 
>> 120:      */
>> 121: 
>> 122:     public static final int SCOPED_CACHE_SHIFT;
> 
> I can't find this constant being used.   If added for future, maybe keep `UnsafeConstants` class and this static field package-private for now.

It originally configured the number of lines in extent local cache but the implementation has changed. @theRealAph would be best to comment on this, it may be possible to delete it.

> src/java.management/share/classes/sun/management/ThreadImpl.java line 447:
> 
>> 445:         if (threads != null) {
>> 446:             long[] tids = Stream.of(threads)
>> 447:                     .filter(t -> !(t instanceof jdk.internal.misc.CarrierThread))
> 
> Returning an array of thread IDs of just the platform threads is good.   The javadoc needs to be updated to say "Returns an array of thread identifiers for the platform threads...."

I think you mean the comment on the private method. Yes, that could be clearer that it just returns platform threads.

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

PR: https://git.openjdk.java.net/jdk/pull/8166


More information about the hotspot-jfr-dev mailing list