RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread David Holmes
Bug: https://bugs.openjdk.java.net/browse/JDK-8229516 CSR: https://bugs.openjdk.java.net/browse/JDK-8232676 (already approved) webrev: http://cr.openjdk.java.net/~dholmes/8229516/webrev/ This cross-cuts core-libs, hotspot-runtime and the JIT compilers, but only in small pieces each. There is als

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread Doug Simon
Hi David, Since Graal needs to work against multiple JVMCI versions (and VM versions!), the Graal changes should only disable the intrinsic when the relevant VM config is missing: diff --git a/compiler/src/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread David Holmes
Hi Doug, Thanks for taking a look so quickly! :) On 29/10/2019 6:55 pm, Doug Simon wrote: Hi David, Since Graal needs to work against multiple JVMCI versions (and VM versions!), the Graal changes should only disable the intrinsic when the relevant VM config is missing: So to be clear I sho

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread Doug Simon
> On 29 Oct 2019, at 10:12, David Holmes wrote: > > Hi Doug, > > Thanks for taking a look so quickly! :) > > On 29/10/2019 6:55 pm, Doug Simon wrote: >> Hi David, >> Since Graal needs to work against multiple JVMCI versions (and VM >> versions!), the Graal changes should only disable the in

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread serguei.spit...@oracle.com
Hi David, The fix looks good to me. I did not pay much attention to the Graal related changes though. The test coverage for Serviceability is complete. Running java/lang/instrument tests is not necessary. Thanks, Serguei On 10/29/19 00:42, David Holmes wrote: Bug: https://bugs.openjdk.java.ne

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread Daniel D. Daugherty
On 10/29/19 3:42 AM, David Holmes wrote: Bug: https://bugs.openjdk.java.net/browse/JDK-8229516 CSR: https://bugs.openjdk.java.net/browse/JDK-8232676 (already approved) webrev: http://cr.openjdk.java.net/~dholmes/8229516/webrev/ make/hotspot/symbols/symbols-unix     No comments. src/hotspot/os/

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread Remi Forax
Hi David, in java.lang.Thread interrupt0 should be renamed to setInterruptEvent, because what it does now and I don't really understand the comment in interrupted(), if a thread is interrupted by two other threads calling interrupt(), you will loose an interrupt anyway. Rémi - Mail origina

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread David Holmes
Thanks for the review Dan! Fixed the nit in thread.c Thanks, David On 30/10/2019 6:51 am, Daniel D. Daugherty wrote: On 10/29/19 3:42 AM, David Holmes wrote: Bug: https://bugs.openjdk.java.net/browse/JDK-8229516 CSR: https://bugs.openjdk.java.net/browse/JDK-8232676 (already approved) webrev:

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread David Holmes
On 30/10/2019 4:05 am, serguei.spit...@oracle.com wrote: Hi David, The fix looks good to me. Thanks Serguei! David I did not pay much attention to the Graal related changes though. The test coverage for Serviceability is complete. Running java/lang/instrument tests is not necessary. Thanks

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread David Holmes
Hi Remi, On 30/10/2019 7:38 am, Remi Forax wrote: Hi David, in java.lang.Thread interrupt0 should be renamed to setInterruptEvent, because what it does now There is only an "interrupt event" on Windows. What interrupt0 does is issue all the necessary unparks so that blocked threads will wake

Re: RFR: 8229516: Thread.isInterrupted() always returns false after thread termination

2019-10-29 Thread David Holmes
Hi Doug, Your proposed patch wasn't quite right. I made some adjustments but I'm still having issues with the test, HotSpotMethodSubstitutionTest.testThreadSubstitutions, as I don't see how to make the test execution conditional on the VM config. Updated webrev: http://cr.openjdk.java.net/~