RFR: 8367719: Refactor JNI code that uses class_to_verify_considering_redefinition() [v3]

Ioi Lam iklam at openjdk.org
Sat Sep 20 06:43:00 UTC 2025


> Simplify the boilerplate code in jvm.cpp that calls `JvmtiThreadState::class_to_verify_considering_redefinition()`, and reduce the number of `InstanceKlass::cast()` calls.
> 
> I also changed a few fields/arguments from `Klass*` to `InstanceKlass*` as these are used exclusively with `InstanceKlass*`.

Ioi Lam 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 five additional commits since the last revision:

 - @sspitsyn comment -- fixed typo
 - Merge branch 'master' into 8367719-refactor-jni-code-that-uses-class_to_verify_considering_redefinition
 - @coleenp and @dholmes-ora comments -- simplify implementation; fixed code formatting
 - Merge branch 'master' into 8367719-refactor-jni-code-that-uses-class_to_verify_considering_redefinition
 - 8367719: Refactor JNI code that uses class_to_verify_considering_redefinition()

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/27303/files
  - new: https://git.openjdk.org/jdk/pull/27303/files/2504e1a6..aeec713a

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

  Stats: 5977 lines in 131 files changed: 4735 ins; 1009 del; 233 mod
  Patch: https://git.openjdk.org/jdk/pull/27303.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27303/head:pull/27303

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


More information about the serviceability-dev mailing list