Re: 8205132: Remove Thread.countStackFrames()

2019-10-29 Thread David Holmes
On 30/10/2019 2:26 am, Alan Bateman wrote: On 23/10/2019 08:25, Alan Bateman wrote: Thread::countStackFrames has been deprecated for 20+ years and has been marked for-removal since Java SE 9. I'd like to remove it for Java SE 14. It's was never a well-defined method and I've been unable to f

Re: 8205132: Remove Thread.countStackFrames()

2019-10-29 Thread Daniel D. Daugherty
On 10/29/19 12:26 PM, Alan Bateman wrote: On 23/10/2019 08:25, Alan Bateman wrote: Thread::countStackFrames has been deprecated for 20+ years and has been marked for-removal since Java SE 9. I'd like to remove it for Java SE 14. It's was never a well-defined method and I've been unable to fi

Re: 8205132: Remove Thread.countStackFrames()

2019-10-29 Thread Mandy Chung
On 10/29/19 9:26 AM, Alan Bateman wrote: On 23/10/2019 08:25, Alan Bateman wrote: Thread::countStackFrames has been deprecated for 20+ years and has been marked for-removal since Java SE 9. I'd like to remove it for Java SE 14. It's was never a well-defined method and I've been unable to

Re: 8205132: Remove Thread.countStackFrames()

2019-10-29 Thread seth lytle
Alan, Was there a technical reason that the method was specified to fail when called from within the same thread ? Ie, is there a race condition or something similar that can happen, perhaps because the JVM relocates the stack ? On Tue, Oct 29, 2019 at 12:26 PM Alan Bateman wrote: > > On 2

Re: 8205132: Remove Thread.countStackFrames()

2019-10-29 Thread Alan Bateman
On 23/10/2019 08:25, Alan Bateman wrote: Thread::countStackFrames has been deprecated for 20+ years and has been marked for-removal since Java SE 9. I'd like to remove it for Java SE 14. It's was never a well-defined method and I've been unable to find anything that uses it. The StackWalker A

Re: 8205132: Remove Thread.countStackFrames()

2019-10-24 Thread Alan Bateman
On 24/10/2019 17:32, seth lytle wrote: The use case that's always interested me is checking to see if a callback to a recursive method (eg during parsing) is "too deep" so you can bail out (eg, to a non-recursive one or using message passing). For that purpose, it's already suspended and the nati

Re: 8205132: Remove Thread.countStackFrames()

2019-10-24 Thread Mandy Chung
There is cost to examine the stack frames.  The StackWalker API allows you to fetch the stack frames one batch at a time to avoid unnecessary deoptimization to frames that are not traversed.  In addition,it can specify to include/exclude the hidden frames and/or reflection implementation-specif

Re: 8205132: Remove Thread.countStackFrames()

2019-10-24 Thread seth lytle
The use case that's always interested me is checking to see if a callback to a recursive method (eg during parsing) is "too deep" so you can bail out (eg, to a non-recursive one or using message passing). For that purpose, it's already suspended and the native method is close to what I'd like if it

Re: 8205132: Remove Thread.countStackFrames()

2019-10-24 Thread Alan Bateman
On 23/10/2019 23:00, seth lytle wrote: At least a couple appear to be recently active, though I don't have current access. Maybe an IDE generates boilerplate for proxies and ignores deprecation ? is the speed of the StackWalker approach to counting frames comparable to the current native method

Re: 8205132: Remove Thread.countStackFrames()

2019-10-23 Thread seth lytle
At least a couple appear to be recently active, though I don't have current access. Maybe an IDE generates boilerplate for proxies and ignores deprecation ? is the speed of the StackWalker approach to counting frames comparable to the current native method ? On Wed, Oct 23, 2019 at 11:57 AM

Re: 8205132: Remove Thread.countStackFrames()

2019-10-23 Thread Mandy Chung
On 10/23/19 12:25 AM, Alan Bateman wrote: Thread::countStackFrames has been deprecated for 20+ years and has been marked for-removal since Java SE 9. I'd like to remove it for Java SE 14. It's was never a well-defined method and I've been unable to find anything that uses it. The StackWalk

Re: 8205132: Remove Thread.countStackFrames()

2019-10-23 Thread Alan Bateman
On 23/10/2019 16:25, seth lytle wrote: With respect to "unable to find anything that uses it", a quick search of the code that I have access to shows some usage, though everything I looked at in any depth is either a test or a proxy, so there will be source code changes required. I've never thoug

Re: 8205132: Remove Thread.countStackFrames()

2019-10-23 Thread seth lytle
With respect to "unable to find anything that uses it", a quick search of the code that I have access to shows some usage, though everything I looked at in any depth is either a test or a proxy, so there will be source code changes required. I've never thought about what the right way to handle pro

Re: 8205132: Remove Thread.countStackFrames()

2019-10-23 Thread Daniel D. Daugherty
On 10/23/19 3:25 AM, Alan Bateman wrote: Thread::countStackFrames has been deprecated for 20+ years and has been marked for-removal since Java SE 9. I'd like to remove it for Java SE 14. It's was never a well-defined method and I've been unable to find anything that uses it. The StackWalker A

Re: 8205132: Remove Thread.countStackFrames()

2019-10-23 Thread David Holmes
Looks good Alan! I'm guessing there may be a JCK update required somewhere to go with this. Thanks, David On 23/10/2019 5:25 pm, Alan Bateman wrote: Thread::countStackFrames has been deprecated for 20+ years and has been marked for-removal since Java SE 9. I'd like to remove it for Java SE

Re: 8205132: Remove Thread.countStackFrames()

2019-10-23 Thread Chris Hegarty
> On 23 Oct 2019, at 08:25, Alan Bateman wrote: > > > Thread::countStackFrames has been deprecated for 20+ years and has been > marked for-removal since Java SE 9. I'd like to remove it for Java SE 14. > It's was never a well-defined method and I've been unable to find anything > that uses