Re: RFR: 8309196: Remove Thread.countStackFrames [v3]

2023-06-08 Thread Alan Bateman
> Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 
> for counting the stack frames of a suspended Thread. The method was 
> deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and 
> re-specified/degraded to throw UOE unconditionally in Java 14.  Java 22 would 
> be a fine time to finally remove this method.
> 
> Code that wants to count stack frames should be directed to use 
> j.l.StackWalker, or if a tool, then it can use JVM TI and other tool APIs.
> 
> A corpus analysis of 30M classes in 131k artifacts from Maven Central found 
> only 1 usages to this method. The 1 usage appears to be a class that just 
> wraps all methods, it doesn't actually make use of it.

Alan Bateman has updated the pull request with a new target base due to a merge 
or a rebase. The incremental webrev excludes the unrelated changes brought in 
by the merge/rebase. The pull request contains three additional commits since 
the last revision:

 - Merge
 - Merge
 - Initial commit

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/14257/files
  - new: https://git.openjdk.org/jdk/pull/14257/files/e44c3c49..b784ff83

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14257&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14257&range=01-02

  Stats: 6494 lines in 82 files changed: 6315 ins; 50 del; 129 mod
  Patch: https://git.openjdk.org/jdk/pull/14257.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14257/head:pull/14257

PR: https://git.openjdk.org/jdk/pull/14257


Re: RFR: 8309196: Remove Thread.countStackFrames [v2]

2023-06-08 Thread Alan Bateman
> Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 
> for counting the stack frames of a suspended Thread. The method was 
> deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and 
> re-specified/degraded to throw UOE unconditionally in Java 14.  Java 22 would 
> be a fine time to finally remove this method.
> 
> Code that wants to count stack frames should be directed to use 
> j.l.StackWalker, or if a tool, then it can use JVM TI and other tool APIs.
> 
> A corpus analysis of 30M classes in 131k artifacts from Maven Central found 
> only 1 usages to this method. The 1 usage appears to be a class that just 
> wraps all methods, it doesn't actually make use of it.

Alan Bateman has updated the pull request with a new target base due to a merge 
or a rebase. The incremental webrev excludes the unrelated changes brought in 
by the merge/rebase. The pull request contains two additional commits since the 
last revision:

 - Merge
 - Initial commit

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/14257/files
  - new: https://git.openjdk.org/jdk/pull/14257/files/36138f34..e44c3c49

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14257&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14257&range=00-01

  Stats: 48558 lines in 577 files changed: 40570 ins; 5940 del; 2048 mod
  Patch: https://git.openjdk.org/jdk/pull/14257.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14257/head:pull/14257

PR: https://git.openjdk.org/jdk/pull/14257


Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Iris Clark
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman  wrote:

> Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 
> for counting the stack frames of a suspended Thread. The method was 
> deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and 
> re-specified/degraded to throw UOE unconditionally in Java 14.  Java 22 would 
> be a fine time to finally remove this method.
> 
> Code that wants to count stack frames should be directed to use 
> j.l.StackWalker, or if is a a tool, then it can use JVM TI and other tool 
> APIs.
> 
> A corpus analysis of 30M classes in 131k artifacts from Maven Central found 
> only 1 usages to this method. The 1 usage appears to be a class that just 
> wraps all methods, it doesn't actually make use of it.

Happy to see this being removed early in JDK 22!

-

Marked as reviewed by iris (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14257#pullrequestreview-1456700929


Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Jaikiran Pai
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman  wrote:

> Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 
> for counting the stack frames of a suspended Thread. The method was 
> deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and 
> re-specified/degraded to throw UOE unconditionally in Java 14.  Java 22 would 
> be a fine time to finally remove this method.
> 
> Code that wants to count stack frames should be directed to use 
> j.l.StackWalker, or if is a a tool, then it can use JVM TI and other tool 
> APIs.
> 
> A corpus analysis of 30M classes in 131k artifacts from Maven Central found 
> only 1 usages to this method. The 1 usage appears to be a class that just 
> wraps all methods, it doesn't actually make use of it.

Marked as reviewed by jpai (Reviewer).

-

PR Review: https://git.openjdk.org/jdk/pull/14257#pullrequestreview-1456650687


Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread David Holmes
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman  wrote:

> Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 
> for counting the stack frames of a suspended Thread. The method was 
> deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and 
> re-specified/degraded to throw UOE unconditionally in Java 14.  Java 22 would 
> be a fine time to finally remove this method.
> 
> Code that wants to count stack frames should be directed to use 
> j.l.StackWalker, or if is a a tool, then it can use JVM TI and other tool 
> APIs.
> 
> A corpus analysis of 30M classes in 131k artifacts from Maven Central found 
> only 1 usages to this method. The 1 usage appears to be a class that just 
> wraps all methods, it doesn't actually make use of it.

Yes :)

-

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14257#pullrequestreview-1456506531


Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Mandy Chung
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman  wrote:

> Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 
> for counting the stack frames of a suspended Thread. The method was 
> deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and 
> re-specified/degraded to throw UOE unconditionally in Java 14.  Java 22 would 
> be a fine time to finally remove this method.
> 
> Code that wants to count stack frames should be directed to use 
> j.l.StackWalker, or if is a a tool, then it can use JVM TI and other tool 
> APIs.
> 
> A corpus analysis of 30M classes in 131k artifacts from Maven Central found 
> only 1 usages to this method. The 1 usage appears to be a class that just 
> wraps all methods, it doesn't actually make use of it.

Marked as reviewed by mchung (Reviewer).

-

PR Review: https://git.openjdk.org/jdk/pull/14257#pullrequestreview-1455848358


Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Roger Riggs
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman  wrote:

> Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 
> for counting the stack frames of a suspended Thread. The method was 
> deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and 
> re-specified/degraded to throw UOE unconditionally in Java 14.  Java 22 would 
> be a fine time to finally remove this method.
> 
> Code that wants to count stack frames should be directed to use 
> j.l.StackWalker, or if is a a tool, then it can use JVM TI and other tool 
> APIs.
> 
> A corpus analysis of 30M classes in 131k artifacts from Maven Central found 
> only 1 usages to this method. The 1 usage appears to be a class that just 
> wraps all methods, it doesn't actually make use of it.

Looks good.

-

Marked as reviewed by rriggs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14257#pullrequestreview-1455718528