> The UnsafeOps JMH benchmark fails with the following error: > > ``` > java.lang.IllegalAccessError: class > org.openjdk.bench.sun.misc.UnsafeOps (in unnamed module @0x520a3426) cannot > access class jdk.internal.misc.Unsafe (in module java.base) because module > java.base does not export jdk.internal.misc to unnamed module @0x520a3426 > ``` > > Since this micro-benchmark is created for `sun.misc.Unsafe` rather than > `jdk.internal.misc.Unsafe`, we change it back as before JDK-8332744. > > Note that even it will raise "proprietary API" warnings after this > patch, it is acceptable because the relevant APIs are bound for removal > for the integrity of the platform.
Nicole Xu 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 four additional commits since the last revision: - Merge remote-tracking branch 'upstream/master' into JDK-8349944-add-args Change-Id: Ib60ccfc5d411f095d1c2fe6e8154a44529e84631 - 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe The UnsafeOps JMH benchmark fails with the following error: ``` java.lang.IllegalAccessError: class org.openjdk.bench.sun.misc.UnsafeOps (in unnamed module @0x520a3426) cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @0x520a3426 ``` Since this micro-benchmark is created for `sun.misc.Unsafe` rather than `jdk.internal.misc.Unsafe`, we change it back as before JDK-8332744. Note that even it will raise "proprietary API" warnings after this patch, it is acceptable because the relevant APIs are bound for removal for the integrity of the platform. Change-Id: Ia7c57c2ca09af4b2b3c6cc10ef4ae5a9f3c38a4c - Revert "8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe" This reverts commit ebc32ae2c6e448075fedbdbb2b4879c43829c44b. - 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe The UnsafeOps JMH benchmark fails with the following error: ``` java.lang.IllegalAccessError: class org.openjdk.bench.sun.misc.UnsafeOps (in unnamed module @0x520a3426) cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @0x520a3426 ``` To resolve this, we add the required `--add-opens` flag to grant access for the benchmark. Change-Id: I30de213daa9160ee872a4364eb332dcd1636a9ac ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23686/files - new: https://git.openjdk.org/jdk/pull/23686/files/b2bbc24e..db7af981 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23686&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23686&range=01-02 Stats: 414978 lines in 5199 files changed: 120320 ins; 266094 del; 28564 mod Patch: https://git.openjdk.org/jdk/pull/23686.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23686/head:pull/23686 PR: https://git.openjdk.org/jdk/pull/23686