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 proxying a deprecated method is.
I've wanted to use it a couple times - if it was fast and approximately accurate, it would be useful. As it's been deprecated, I've never investigated whether the those assumptions are true. On Wed, Oct 23, 2019 at 10:34 AM Daniel D. Daugherty <daniel.daughe...@oracle.com> wrote: > > 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 API is a much better > > solution for code that is interested in the number of stack frames. > > > > The changes to remove this method are here: > > http://cr.openjdk.java.net/~alanb/8205132/webrev/ > > make/hotspot/symbols/symbols-unix > No comments. > > src/hotspot/share/include/jvm.h > No comments. > > src/hotspot/share/prims/jvm.cpp > No comments. > > src/java.base/share/classes/java/lang/Thread.java > No comments. > > src/java.base/share/native/libjava/Thread.c > No comments. > > test/hotspot/jtreg/runtime/Thread/CountStackFramesAtExit.java > No comments. > > Thumbs up. > > Dan > > > > > > The CSR will need a Reviewer: > > https://bugs.openjdk.java.net/browse/JDK-8232654 > > > > -Alan >