RFR: 8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX

Ioi Lam-2
- JVM_GetInterfaceVersion() was used by "HotSpot Express" (HSX) which allowed the same JDK library to use different version of HotSpot. However, HSX is no longer supported so this API should be removed.
- Implementations of APIs such as JVM_DTraceActivate, were removed in [JDK-8068976](https://bugs.openjdk.java.net/browse/JDK-8068976), so their declarations should be removed from jvm.h

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

Commit messages:
 - 8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX

Changes: https://git.openjdk.java.net/jdk/pull/2338/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2338&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260193
  Stats: 110 lines in 3 files changed: 0 ins; 109 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2338.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2338/head:pull/2338

PR: https://git.openjdk.java.net/jdk/pull/2338
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX

Alan Bateman-2
On Mon, 1 Feb 2021 18:40:54 GMT, Ioi Lam <[hidden email]> wrote:

> - JVM_GetInterfaceVersion() was used by "HotSpot Express" (HSX) which allowed the same JDK library to use different version of HotSpot. However, HSX is no longer supported so this API should be removed.
> - Implementations of APIs such as JVM_DTraceActivate, were removed in [JDK-8068976](https://bugs.openjdk.java.net/browse/JDK-8068976), so their declarations should be removed from jvm.h

Marked as reviewed by alanb (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/2338
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX [v2]

Ioi Lam-2
In reply to this post by Ioi Lam-2
> - JVM_GetInterfaceVersion() was used by "HotSpot Express" (HSX) which allowed the same JDK library to use different version of HotSpot. However, HSX is no longer supported so this API should be removed.
> - Implementations of APIs such as JVM_DTraceActivate, were removed in [JDK-8068976](https://bugs.openjdk.java.net/browse/JDK-8068976), so their declarations should be removed from jvm.h

Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:

  fixed macos build

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2338/files
  - new: https://git.openjdk.java.net/jdk/pull/2338/files/c0307e7d..3a6415eb

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2338&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2338&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2338.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2338/head:pull/2338

PR: https://git.openjdk.java.net/jdk/pull/2338
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX [v2]

Ioi Lam-2
On Mon, 1 Feb 2021 20:29:10 GMT, Gerard Ziemski <[hidden email]> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>>   fixed macos build
>
> src/java.base/share/native/libjava/check_version.c line 33:
>
>> 31: DEF_JNI_OnLoad(JavaVM *vm, void *reserved)
>> 32: {
>> 33:     return JNI_VERSION_1_2;
>
> This leaves an entire file with one trivial function implementation. Can we remove the file and implement  `DEF_JNI_OnLoad()` in `jni_util.h` (or some other existing suitable file) ?

I am not sure if jni_utils.c is the right file (it defines the `JNU_XXX` functions that are used by other shared libraries).

There are other .c files that have trivial `DEF_JNI_OnLoad` functions (e.g., java.base/share/native/libnio/nio_util.c).

@AlanBateman do you have any suggestions?

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

PR: https://git.openjdk.java.net/jdk/pull/2338
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX [v2]

Gerard Ziemski-2
On Mon, 1 Feb 2021 20:54:42 GMT, Ioi Lam <[hidden email]> wrote:

>> src/java.base/share/native/libjava/check_version.c line 33:
>>
>>> 31: DEF_JNI_OnLoad(JavaVM *vm, void *reserved)
>>> 32: {
>>> 33:     return JNI_VERSION_1_2;
>>
>> This leaves an entire file with one trivial function implementation. Can we remove the file and implement  `DEF_JNI_OnLoad()` in `jni_util.h` (or some other existing suitable file) ?
>
> I am not sure if jni_utils.c is the right file (it defines the `JNU_XXX` functions that are used by other shared libraries).
>
> There are other .c files that have trivial `DEF_JNI_OnLoad` functions (e.g., java.base/share/native/libnio/nio_util.c).
>
> @AlanBateman do you have any suggestions?

I'm fine with the way it is, just thought we might want to consider cleaning up a bit more, since it's a cleanup task itself.

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

PR: https://git.openjdk.java.net/jdk/pull/2338
Reply | Threaded
Open this post in threaded view
|

Integrated: 8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX

Ioi Lam-2
In reply to this post by Ioi Lam-2
On Mon, 1 Feb 2021 18:40:54 GMT, Ioi Lam <[hidden email]> wrote:

> - JVM_GetInterfaceVersion() was used by "HotSpot Express" (HSX) which allowed the same JDK library to use different version of HotSpot. However, HSX is no longer supported so this API should be removed.
> - Implementations of APIs such as JVM_DTraceActivate, were removed in [JDK-8068976](https://bugs.openjdk.java.net/browse/JDK-8068976), so their declarations should be removed from jvm.h

This pull request has now been integrated.

Changeset: b9d4211b
Author:    Ioi Lam <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/b9d4211b
Stats:     112 lines in 4 files changed: 0 ins; 110 del; 2 mod

8260193: Remove JVM_GetInterfaceVersion() and JVM_DTraceXXX

Reviewed-by: alanb, lfoltan, gziemski, ihse

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

PR: https://git.openjdk.java.net/jdk/pull/2338