On Thu, 27 Apr 2023 09:40:46 GMT, Aleksey Shipilev wrote:
>> Aleksey Shipilev has updated the pull request with a new target base due to
>> a merge or a rebase. The pull request now contains 26 commits:
>>
>> - Merge branch 'master' into JDK-83050920-thread-sleep-subms
>> - Merge branch
On Thu, 27 Apr 2023 09:40:46 GMT, Aleksey Shipilev wrote:
>> Aleksey Shipilev has updated the pull request with a new target base due to
>> a merge or a rebase. The pull request now contains 26 commits:
>>
>> - Merge branch 'master' into JDK-83050920-thread-sleep-subms
>> - Merge branch
On Wed, 26 Apr 2023 20:22:54 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
On Wed, 26 Apr 2023 20:22:54 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Fri, 21 Apr 2023 13:21:09 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Thu, 20 Apr 2023 08:12:50 GMT, Aleksey Shipilev wrote:
>> src/java.base/share/classes/java/lang/Thread.java line 1:
>>
>>> 1: /*
>>
>> Why doesn't `Thread.sleep(long millis)` simply call `Thread.sleep(millis,
>> 0)` instead of duplicating most of the code?
>
> That would change the stack
On Thu, 20 Apr 2023 12:28:56 GMT, David Holmes wrote:
>> Hm, "later" where? Because I see the call to `pthread_condwait_timed` right
>> after we produced abstime using `nanos_to_nanos_bounded`, and this looks
>> like the last opportunity to handle the `MAX_SECS` limit:
>>
On Thu, 20 Apr 2023 12:09:18 GMT, Aleksey Shipilev wrote:
>> src/hotspot/os/posix/os_posix.cpp line 1342:
>>
>>> 1340: }
>>> 1341:
>>> 1342: static jlong nanos_to_nanos_bounded(jlong nanos) {
>>
>> I don't think we actually need this for nanos. There is no overflow
>> potential and the
On Thu, 20 Apr 2023 12:04:38 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Handle overflows
>
> src/hotspot/os/posix/os_posix.cpp line 1342:
>
>> 1340: }
>> 1341:
>> 1342: static jlong
On Thu, 20 Apr 2023 09:29:43 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
On Thu, 20 Apr 2023 09:29:43 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Thu, 20 Apr 2023 02:14:53 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Adjust test times
>
> src/hotspot/os/windows/os_windows.cpp line 5263:
>
>> 5261: if (nanos_left > 0) {
>>
On Wed, 19 Apr 2023 19:55:38 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
On Wed, 19 Apr 2023 18:50:27 GMT, Alan Bateman wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Windows fixes: align(...) is only for power-of-two alignments
>
> test/jdk/java/lang/Thread/SleepSanity.java line
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Wed, 19 Apr 2023 16:02:08 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Wed, 19 Apr 2023 16:32:05 GMT, ExE Boss wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Windows fixes: align(...) is only for power-of-two alignments
>
> src/java.base/share/classes/java/lang/Thread.java
On Wed, 19 Apr 2023 16:02:08 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Wed, 19 Apr 2023 09:56:44 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
On Wed, 19 Apr 2023 09:51:48 GMT, Aleksey Shipilev wrote:
>> src/hotspot/os/posix/os_posix.cpp line 1545:
>>
>>> 1543:
>>> 1544: int PlatformEvent::park_nanos(jlong nanos) {
>>> 1545: assert(0 <= nanos, "nanos are in range");
>>
>> `nanos` should never be zero else you call the untimed
On Wed, 19 Apr 2023 09:56:44 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
On Wed, 19 Apr 2023 06:07:04 GMT, David Holmes wrote:
> You seemed to have missed:
>
> ```
> ./cpu/x86/rdtsc_x86.cpp:JavaThread::current()->sleep(FT_SLEEP_MILLISECS);
> ./share/compiler/compileBroker.cpp: sleep(DeoptimizeObjectsALotInterval);
> ```
>
> so not sure how this is building ???
On Wed, 19 Apr 2023 09:27:49 GMT, Alan Bateman wrote:
> You might need to check that
> test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo001/ownedMonitorsStackDepthInfo001a.java
> is passing. I haven't tried your changes but I
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Wed, 19 Apr 2023 06:14:37 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix gtests
>
> src/hotspot/os/posix/os_posix.cpp line 1545:
>
>> 1543:
>> 1544: int
On Wed, 19 Apr 2023 05:58:11 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix gtests
>
> src/hotspot/os/windows/os_windows.cpp line 5253:
>
>> 5251:
>> 5252: int
On Wed, 19 Apr 2023 05:58:35 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix gtests
>
> src/hotspot/os/windows/os_windows.cpp line 5259:
>
>> 5257: // any positive requested nanos as a
On Wed, 19 Apr 2023 06:12:02 GMT, David Holmes wrote:
>> Hmmm I changed that comment ...
>
> My actual comment was changed to:
>> I suggest extending the comment to add
>
> This is how Thread.sleep(millis, nanos) has always behaved with only
> millisecond granularity.
Reworded, added comment.
On Tue, 18 Apr 2023 19:38:12 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
On Wed, 19 Apr 2023 08:15:44 GMT, Alan Bateman wrote:
>> src/java.base/share/classes/java/lang/Thread.java line 576:
>>
>>> 574: long millis = NANOSECONDS.toMillis(nanos);
>>> 575: nanos -= MILLISECONDS.toNanos(millis);
>>> 576: sleep(millis, (int)nanos);
>>
>> This
On Wed, 19 Apr 2023 05:50:00 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix gtests
>
> test/jdk/java/lang/Thread/SleepSanity.java line 75:
>
>> 73: }
>> 74:
>> 75: private
On Wed, 19 Apr 2023 05:43:19 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix gtests
>
> src/java.base/share/classes/java/lang/Thread.java line 576:
>
>> 574: long millis =
On Wed, 19 Apr 2023 06:09:28 GMT, David Holmes wrote:
>> src/hotspot/os/windows/os_windows.cpp line 5257:
>>
>>> 5255: // Windows timers are still quite unpredictable to handle
>>> sub-millisecond granularity.
>>> 5256: // Instead of implementing this method, fall back to the
>>>
On Wed, 19 Apr 2023 05:31:08 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix gtests
>
> src/hotspot/os/windows/os_windows.cpp line 5257:
>
>> 5255: // Windows timers are still quite
On Tue, 18 Apr 2023 19:38:12 GMT, Aleksey Shipilev wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Wed, 29 Mar 2023 19:57:46 GMT, Alan Bateman wrote:
>> Yes, let me fix that. `TimeUnit.toNanos` handles it well itself, it seems.
>
>> Yes, let me fix that. `TimeUnit.toNanos` handles it well itself, it seems.
>
> This code is refactored in PR 13203 so we'll have to merge at some point.
On Thu, 30 Mar 2023 01:26:36 GMT, David Holmes wrote:
>> Aleksey Shipilev has updated the pull request with a new target base due to
>> a merge or a rebase. The pull request now contains ten commits:
>>
>> - Merge branch 'master' into JDK-83050920-thread-sleep-subms
>> - Work
>> - Draft
On Wed, 12 Apr 2023 07:44:38 GMT, Alan Bateman wrote:
>> Aleksey Shipilev has updated the pull request with a new target base due to
>> a merge or a rebase. The pull request now contains ten commits:
>>
>> - Merge branch 'master' into JDK-83050920-thread-sleep-subms
>> - Work
>> - Draft
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
> `nanos` to 1ms when doing the actual sleep. This means users
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote:
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
>
On Wed, 29 Mar 2023 17:17:29 GMT, Aleksey Shipilev wrote:
> Are there specific factors which would make it unreasonable to implement
> `sleep` in terms of `parkNanos`?
You would need to reissue any unparks received whilst sleeping.
Sleeping and parking are distinct thread states so it would
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote:
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
>
On Wed, 29 Mar 2023 18:29:18 GMT, Aleksey Shipilev wrote:
> Yes, let me fix that. `TimeUnit.toNanos` handles it well itself, it seems.
This code is refactored in PR 13203 so we'll have to merge at some point.
-
PR Review Comment:
On Wed, 29 Mar 2023 18:10:30 GMT, Alan Bateman wrote:
>> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
>> documentation for that method clearly says the precision and accuracy are
>> dependent on the underlying system behavior. However, it always rounds up
>>
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote:
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
>
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote:
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
>
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote:
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
>
On Wed, 29 Mar 2023 16:48:41 GMT, David M. Lloyd wrote:
> Are there specific factors which would make it unreasonable to implement
> `sleep` in terms of `parkNanos`?
After reading the Javadoc for `LockSupport`, I don't believe implementing
`Thread.sleep` with `LockSupport.parkNanos` is a
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote:
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
>
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote:
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
>
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote:
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
> documentation for that method clearly says the precision and accuracy are
> dependent on the underlying system behavior. However, it always rounds up
>
Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The
documentation for that method clearly says the precision and accuracy are
dependent on the underlying system behavior. However, it always rounds up
`nanos` to 1ms when doing the actual sleep. This means users cannot do
60 matches
Mail list logo