RFR: 8360131: Remove use of soon-to-be-removed APIs by CTW framework
Chen Liang
liach at openjdk.org
Fri Jun 20 15:50:32 UTC 2025
On Fri, 20 Jun 2025 14:33:49 GMT, David Beaumont <duke at openjdk.org> wrote:
> Migrate the CWT framework to use only supported JRT file system access for fetching class bytes.
> This avoids accessing APIs in ImageReader which are scheduled to be removed as part of preview mode class support in Valhalla (essentially these APIs are "too low level" and expose semantics that are incompatible with supporting preview classes in Valhalla).
>
> This will be a further change to this code when the preview mode work goes in, but this will be limited to how the file system is opened (with or without preview mode).
I think ctw is in hs-tier2 tests. You may run them on the CI for sanity checking.
test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/ClassPathJimageEntry.java line 82:
> 80: }
> 81:
> 82: //private final ImageReader reader;
Suggestion:
test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/ClassPathJimageEntry.java line 114:
> 112: }
> 113: } catch (IOException e) {
> 114: throw new RuntimeException(e);
Maybe throw an error for consistency with other methods in this class?
test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Utils.java line 209:
> 207: * @return corresponding filename
> 208: * @throws AssertionError if filename isn't valid filename for class file -
> 209: * {@link #isClassFile(String)}
Suggestion:
-------------
PR Review: https://git.openjdk.org/jdk/pull/25916#pullrequestreview-2946659413
PR Review Comment: https://git.openjdk.org/jdk/pull/25916#discussion_r2159280982
PR Review Comment: https://git.openjdk.org/jdk/pull/25916#discussion_r2159283448
PR Review Comment: https://git.openjdk.org/jdk/pull/25916#discussion_r2159284146
More information about the hotspot-compiler-dev
mailing list