Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Thomas Stuefe
On Thu, 6 Apr 2023 20:39:41 GMT, Roger Riggs wrote: > > What about PPC (big endian)? Used on AIX? > > I'm not aware of any code (in OpenJDK) related to big/little endian that is > derived from `os.arch`. > > > On Arm, it may be useful to know whether we built for thumb mode (We > > recently h

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Thomas Stuefe
On Thu, 6 Apr 2023 21:17:25 GMT, Glavo wrote: >> The point of Architecture is reflect the architecture as supported by the >> build and the runtime mutually and to reflect dependencies on the target >> hardware. >> >> What did you use as the example that would not compile on the other >> arc

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-04-06 Thread Fei Yang
On Tue, 21 Mar 2023 13:35:25 GMT, Per Minborg wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > A review of all the copyright years shall be made in this PR. > Hi @minbo

Integrated: JDK-8305118: Add RISC-V related content to building.md

2023-04-06 Thread Guoxiong Li
On Wed, 29 Mar 2023 10:14:49 GMT, Guoxiong Li wrote: > Hi all, > > This patch adds the RISC-V related content to `building.md`. But I didn't > generate `building.html` locally, because I know the `pandoc` version > may influencethe the output of `building.html` (Need help here). > > I know th

RFR: 8305721: add `make compile-commands` artifacts to .gitignore

2023-04-06 Thread Joshua Cao
`make compile-commands` produces * `compile-commands.json` - so clangd knows how to build the project * `.cache` - I believe clangd uses this as an indexing cache Tested by confirming artifacts are not shown when running `git status`. - Commit messages: - 8305721: add `make compile

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Phil Race
On Thu, 6 Apr 2023 19:25:19 GMT, Roger Riggs wrote: >> 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, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Glavo
On Thu, 6 Apr 2023 20:56:42 GMT, Roger Riggs wrote: > What did you use as the example that would not compile on the other > architecture? https://github.com/openjdk/jdk/blob/52ca4a70fc3de9e285964f9545ea8cd54e2d9924/src/java.base/share/classes/jdk/internal/util/OperatingSystemProps.java.templat

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 20:42:26 GMT, Glavo wrote: >> There is no benefit to preemptively defining a full set of architectures; we >> only need those that are used in the OpenJDK runtime selection of options or >> parameters. >> The other and unknown cases can be handled in code using switch as `def

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 20:38:02 GMT, Thomas Stuefe wrote: > Another question, how does this work with Zero? Zero is orthogonal to architecture; the interpreter is compiled for a specific target architecture. - PR Comment: https://git.openjdk.org/jdk/pull/13357#issuecomment-1499606550

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Glavo
On Thu, 6 Apr 2023 20:24:27 GMT, Roger Riggs wrote: >> src/java.base/share/classes/jdk/internal/util/Architecture.java line 100: >> >>> 98: */ >>> 99: public static Architecture current() { >>> 100: return archValues[OperatingSystemProps.CURRENT_ARCH_ORDINAL]; >> >> I think the

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 20:28:29 GMT, Thomas Stuefe wrote: > What about PPC (big endian)? Used on AIX? I'm not aware of any code (in OpenJDK) related to big/little endian that is derived from `os.arch`. > > On Arm, it may be useful to know whether we built for thumb mode (We recently > had this p

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Thomas Stuefe
On Thu, 6 Apr 2023 19:25:19 GMT, Roger Riggs wrote: >> 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, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Thomas Stuefe
On Thu, 6 Apr 2023 19:25:19 GMT, Roger Riggs wrote: >> 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, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 19:55:07 GMT, Glavo wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unneeded qualified export from java.base to jdk.attach > > src/java.base/share/classes/jdk/internal/util/Architecture.jav

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Glavo
On Thu, 6 Apr 2023 19:25:19 GMT, Roger Riggs wrote: >> 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, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Roger Riggs
> 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, IA64, ARM, AARCH64, RISCV64, S390X, > PPC64LE` > Note

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v5]

2023-04-06 Thread Alan Bateman
On Thu, 6 Apr 2023 19:01:39 GMT, Roger Riggs wrote: > Removed. Good, that makes it simpler and it means the qualified export can be removed too. - PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1160162760

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v6]

2023-04-06 Thread Roger Riggs
> 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, IA64, ARM, AARCH64, RISCV64, S390X, > PPC64LE` > Note

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v5]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 18:44:02 GMT, Alan Bateman wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert changes to Foreign API to avoid class with another PR >> Rename S390X to S390, representing just the s390 archit

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v5]

2023-04-06 Thread Alan Bateman
On Thu, 6 Apr 2023 17:17:35 GMT, Roger Riggs wrote: >> 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, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v5]

2023-04-06 Thread Roger Riggs
> 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, IA64, ARM, AARCH64, RISCV64, S390X, > PPC64LE` > Note

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 15:27:49 GMT, David M. Lloyd wrote: >> src/java.base/share/classes/jdk/internal/util/Architecture.java line 47: >> >>> 45: >>> 46: // Cache a copy of the array for lightweight indexing >>> 47: private static final Architecture[] archValues = >>> Architecture.values()

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread David M . Lloyd
On Thu, 6 Apr 2023 08:00:43 GMT, ExE Boss wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct spelling of isAARCH64 in WIndows AttachProviderImpl > > src/java.base/share/classes/jdk/internal/util/Architecture.ja

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 03:17:57 GMT, ExE Boss wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct spelling of isAARCH64 in WIndows AttachProviderImpl > > src/java.base/share/classes/jdk/internal/util/Architecture.ja

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 08:05:14 GMT, ExE Boss wrote: >> src/java.base/share/classes/jdk/internal/util/Architecture.java line 85: >> >>> 83: */ >>> 84: @ForceInline >>> 85: public static boolean isRISCV64() { >> >> Are all the "isers" necessary to provide constant code folding or is the

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Jaikiran Pai
On Wed, 5 Apr 2023 19:20:08 GMT, Roger Riggs wrote: >> 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, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 07:41:48 GMT, Per Minborg wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct spelling of isAARCH64 in WIndows AttachProviderImpl > > src/java.base/share/classes/jdk/internal/util/Architecture

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Roger Riggs
On Wed, 5 Apr 2023 23:39:00 GMT, Jorn Vernee wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct spelling of isAARCH64 in WIndows AttachProviderImpl > > test/jdk/java/foreign/TestUnsupportedLinker.java line 26:

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Roger Riggs
On Thu, 6 Apr 2023 03:17:37 GMT, ExE Boss wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct spelling of isAARCH64 in WIndows AttachProviderImpl > > src/java.base/share/classes/jdk/internal/util/Architecture.ja

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Jorn Vernee
On Thu, 6 Apr 2023 08:11:45 GMT, Glavo wrote: > os.arch is always the target architecture for JVM, even using 32-bit JVM on > 64-bit system, its value remains x86. Okay, I could have sworn we had to add the `ADDRESS_SIZE` check because of this issue where a 32-bit VM running on x64 would erron

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v20]

2023-04-06 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Glavo
On Wed, 5 Apr 2023 23:46:33 GMT, Jorn Vernee wrote: > Right, it is still possible to run a 32-bit VM build on a 64-bit platform. > `os.arch` can be `amd64`, the runtime platform, in this case, but the VM > variant can still be 32 bits. `os.arch` is always the target architecture for JVM, even

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread ExE Boss
On Wed, 5 Apr 2023 19:20:08 GMT, Roger Riggs wrote: >> 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, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread ExE Boss
On Thu, 6 Apr 2023 07:40:50 GMT, Per Minborg wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct spelling of isAARCH64 in WIndows AttachProviderImpl > > src/java.base/share/classes/jdk/internal/util/Architecture

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread ExE Boss
On Thu, 6 Apr 2023 07:36:36 GMT, Per Minborg wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct spelling of isAARCH64 in WIndows AttachProviderImpl > > src/java.base/share/classes/jdk/internal/util/Architecture

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Per Minborg
On Wed, 5 Apr 2023 19:20:08 GMT, Roger Riggs wrote: >> 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, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-06 Thread Per Minborg
On Wed, 5 Apr 2023 19:20:08 GMT, Roger Riggs wrote: >> 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, X8