RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v16]
Roger Riggs
rriggs at openjdk.org
Wed Apr 19 18:08:40 UTC 2023
> Define an internal jdk.internal.util.Architecture enumeration and static methods to replace uses of the system property `os.arch`.
> The enumeration values are defined to match those used in the build.
> The initial values are: `X64, X86, AARCH64, RISCV64, S390, PPC64`
> Note that `amd64` and `x86_64` in the build are represented by `X64`.
> The value of the system property `os.arch` is unchanged.
>
> The API is similar to the jdk.internal.util.OperatingSystem enum created by #[12931](https://git.openjdk.org/jdk/pull/12931).
> Uses in `java.base` and a few others are included but other modules will be done in separate PRs.
Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits:
- Use and test of "s390" verified by reviewer.
- Merge branch 'master' into 8304915-arch-enum
- Merge branch 'master' into 8304915-arch-enum
- ArchTest on Debian RISC-V 64 confirmed by reviewer
- Fixed isPPC64().
Consolidated switch cases in ArchTest.
Moved mapping of build TARGET_OS and TARGET_CPU to the build
to avoid multiple mappings in more than one place.
- Correct mapping and test of ppc64
- Add ppc64 as mapping to PPC64 Architecture
- Modified test to check Architecture is64bits() and isLittleEndian()
against Unsafe respective values.
Relocated code mapping OS name and arch name from PlatformProps to
OperatingSystem and Architecture. Kept the mapping of names
in the template close to where the values are filled in by the build.
- Remove unused static and import of Stabile
- Rename OperatingSystemProps to PlatformProps.
Refactor OperatingSystem initialization to use strings instead of integers.
- ... and 9 more: https://git.openjdk.org/jdk/compare/0f3828dd...b95a312d
-------------
Changes: https://git.openjdk.org/jdk/pull/13357/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13357&range=15
Stats: 410 lines in 7 files changed: 342 ins; 57 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/13357.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13357/head:pull/13357
PR: https://git.openjdk.org/jdk/pull/13357
More information about the serviceability-dev
mailing list