Re: assembler_x86.cpp:11128:38: error: 'this' pointer is null

2022-06-17 Thread Andrew Haley
e to apply the same fix to x86, so we never hear of this bug again. What do you think? -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. <https://urldefense.com/v3/__https://www.redhat.com__;!!ACWV5N9M2RV99hQ!OtbRk3IjtkZWG0t0Bpsa66EfBsaQMGoFlzSIyRDF9W1_eN7GogdN6wA4buYUnsub7-H2

Re: assembler_x86.cpp:11128:38: error: 'this' pointer is null

2022-06-21 Thread Andrew Haley
warning diabled, and let me know how you get on. Thanks, -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. <https://urldefense.com/v3/__https://www.redhat.com__;!!ACWV5N9M2RV99hQ!MulKzlihq43T1sPs-W08TRZXylpYLvnm5d6PBrmBZ7f5D-tWv1IelKqS8BV1aHFAMWKDSgNM8j-HaQT0O-fSqqB0ZUtw$ &

Re: assembler_x86.cpp:11128:38: error: 'this' pointer is null

2022-06-21 Thread Andrew Haley
ns. A better fix is on the way, I promise. -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. <https://urldefense.com/v3/__https://www.redhat.com__;!!ACWV5N9M2RV99hQ!Oz1Ll2hpKPTlsavALMxhVl5deB43BVS2oGsKZCQ_HgV9dSr4TPYP38bH44OSZN-JeX8MuUsa5bej6ltBMURcAZCwjinB$ > https://url

Re: assembler_x86.cpp:11128:38: error: 'this' pointer is null

2022-06-24 Thread Andrew Haley
On 6/21/22 14:12, Aleksey Shipilev wrote: On 6/21/22 11:07, Andrew Haley wrote: On 6/20/22 09:55, Aleksey Shipilev wrote: Yes, please. I think I am seeing this now in mainline JDK with GCC 11: * For target hotspot_variant-server_libjvm_objs_sharedRuntime_x86_32.o: /home/buildbot/worker/build

Re: RFR: 8285790: AArch64: Merge C2 NEON and SVE matching rules

2022-07-01 Thread Andrew Haley
On Fri, 1 Jul 2022 10:36:36 GMT, Hao Sun wrote: > **MOTIVATION** > > This is a big refactoring patch of merging rules in aarch64_sve.ad and > aarch64_neon.ad. The motivation can also be found at [1]. > > Currently AArch64 has aarch64_sve.ad and aarch64_neon.ad to support SVE > and NEON codegen

Re: RFR: 8285790: AArch64: Merge C2 NEON and SVE matching rules

2022-07-04 Thread Andrew Haley
On Fri, 1 Jul 2022 11:25:36 GMT, Andrew Haley wrote: >> **MOTIVATION** >> >> This is a big refactoring patch of merging rules in aarch64_sve.ad and >> aarch64_neon.ad. The motivation can also be found at [1]. >> >> Currently AArch64 has aarch64_sve.ad and a

Re: RFR: 8290373: Enable lossy conversion warnings on Windows [v3]

2022-07-20 Thread Andrew Haley
On Wed, 20 Jul 2022 14:15:54 GMT, Jorn Vernee wrote: >> This patch enables lossy conversion warnings (C4244 [1]) for hotspot on >> Windows/MSVC. Instead of fixing all warnings that were produced from this, >> I've instead locally disabled the warning in the files that produced >> warnings. Thi

Re: RFR: 8290373: Enable lossy conversion warnings on Windows [v3]

2022-07-20 Thread Andrew Haley
On Wed, 20 Jul 2022 14:42:44 GMT, Jorn Vernee wrote: > This change was mostly applied mechanically by parsing the build log, and > then using a script to insert these lines, with a manual review + 1 or 2 > fixups. Making sure the inserted `checked_cast`s are correct seems much > harder. It is

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v5]

2023-10-11 Thread Andrew Haley
On Wed, 12 Oct 2022 15:59:48 GMT, Aleksey Shipilev wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic > &g

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v8]

2023-10-11 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 28 commits: - Merge branch 'JDK-8295159' of https

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2023-10-11 Thread Andrew Haley
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2023-10-11 Thread Andrew Haley
On Wed, 11 Oct 2023 13:31:22 GMT, Andrew Haley wrote: > I'm seeing one automated test failure on Linux x86, which I don't understand > because I've excluded that test for generic-i586. If anyone understands this, > please shout up. For avoidance of doubt, the test does

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v8]

2023-10-11 Thread Andrew Haley
On Wed, 27 Sep 2023 07:49:48 GMT, Magnus Ihse Bursie wrote: >> Andrew Haley has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 28 commits: >> >> - Merge branch 'JDK-8295159' of https://github.com/t

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v8]

2023-10-11 Thread Andrew Haley
On Wed, 11 Oct 2023 14:03:24 GMT, Thomas Stuefe wrote: >> Andrew Haley has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 28 commits: >> >> - Merge branch 'JDK-8295159' of https://github.com/t

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2023-10-11 Thread Andrew Haley
On Wed, 11 Oct 2023 13:54:05 GMT, Thomas Stuefe wrote: > > > I'm seeing one automated test failure on Linux x86, which I don't > > > understand because I've excluded that test for generic-i586. If anyone > > > understands this, please shout up. > > > > > > For avoidance of doubt, the test doe

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v9]

2023-10-11 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Add TestDenormalDouble.java - Changes: -

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v8]

2023-10-12 Thread Andrew Haley
On Wed, 11 Oct 2023 18:41:08 GMT, Thomas Stuefe wrote: >> What difference does it make if it does? > > I was trying to understand the BSD+gcc combination. We use clang on MacOS, so > the only platform I thought would be affected would be one of the BSDs. > > But I thought those also moved to c

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v9]

2023-10-12 Thread Andrew Haley
On Thu, 12 Oct 2023 09:23:08 GMT, Florian Weimer wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add TestDenormalDouble.java > > test/hotspot/jtreg/compiler/floatingpoint/libfast-ma

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v9]

2023-10-12 Thread Andrew Haley
On Wed, 11 Oct 2023 17:57:27 GMT, Vladimir Ivanov wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add TestDenormalDouble.java > > src/hotspot/os/bsd/os_bsd.cpp line 977: >

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v8]

2023-10-12 Thread Andrew Haley
On Wed, 11 Oct 2023 19:51:34 GMT, Vladimir Ivanov wrote: > And I was confused at first why there's a volatile on `tresh`. A short > comment describing the intentions would definitely help here. OK. - PR Review Comment: https://git.openjdk.org/jdk/pull/10661#discussion_r1356952291

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v9]

2023-10-16 Thread Andrew Haley
On Wed, 11 Oct 2023 18:08:55 GMT, Vladimir Ivanov wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add TestDenormalDouble.java > > test/hotspot/jtreg/compiler/floatingpoint/li

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v10]

2023-10-16 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Comments only. - Review feedback - Changes: -

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v10]

2023-10-17 Thread Andrew Haley
On Tue, 17 Oct 2023 02:15:45 GMT, David Holmes wrote: >> Andrew Haley has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Comments only. >> - Review feedback > > src/hotspot/cpu/x86/macroAss

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-17 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with three additional commits since the last revision: - Review feedback - Merge branch 'JDK-8295159'

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-18 Thread Andrew Haley
On Wed, 18 Oct 2023 00:01:20 GMT, David Holmes wrote: > Meta-question and apologies if this was covered before, but why is this logic > being added to stubRoutines.cpp? Because tha'ts where @iwanowww asked me to put it. I don't much care. - PR Comment: https://git.openjdk.org/jdk/

Re: RFR: 8318418: hsdis build fails with system binutils on Ubuntu

2023-10-18 Thread Andrew Haley
On Wed, 18 Oct 2023 09:31:22 GMT, Daniel Jeliński wrote: > hsdis-binutils.c doesn't use any functions from libiberty.h. This header is > absent on Ubuntu (installed separately, and under a different path), so > removing the include fixes the hsdis compilation on Ubuntu. > > Additionally, the s

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-19 Thread Andrew Haley
On Wed, 18 Oct 2023 08:50:13 GMT, Andrew Haley wrote: >> Meta-question and apologies if this was covered before, but why is this >> logic being added to stubRoutines.cpp? > >> Meta-question and apologies if this was covered before, but why is this >> logic bein

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-19 Thread Andrew Haley
On Thu, 19 Oct 2023 01:26:43 GMT, Joe Darcy wrote: >> Andrew Haley has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Review feedback >> - Merge branch 'JDK-8295159' of https://github

RFR: 8318834: Debug builds are missing debug helpers

2023-10-25 Thread Andrew Haley
On s390x only, HotSpot is built by GCC with -ffunction-sections. This means that debug helpers such as ps() and pfl() are not available. These helpers are extremely useful in debugging, so it makes no sense to omit them from debug builds. - Commit messages: - 8318834: Debug builds

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v12]

2023-10-26 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: s/Denormal/Subnormal/g - Changes: - all: https://git.openj

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-26 Thread Andrew Haley
On Thu, 19 Oct 2023 09:31:36 GMT, Andrew Haley wrote: >> src/hotspot/os/linux/os_linux.cpp line 1853: >> >>> 1851: >>> 1852: #ifndef IA32 >>> 1853: // Quickly test to make sure denormals are correctly handled. >> >> Nit: I recommend u

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v13]

2023-10-26 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 36 commits: - Merge from head - s/Denormal/Subno

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-26 Thread Andrew Haley
On Wed, 18 Oct 2023 19:13:40 GMT, Vladimir Ivanov wrote: > > Meta-question and apologies if this was covered before, but why is this > > logic being added to stubRoutines.cpp? > > Because tha'ts where @iwanowww asked me to put it. I don't much care. Hi @iwanowww , do you have any suggestion ab

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v14]

2023-10-26 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Remove dead code - Changes: - all: https://git.openjdk.or

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v15]

2023-10-26 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Duh - Changes: - all: https://git.openjdk.org/jdk/pull/1

Re: RFR: 8318834: s390x: Debug builds are missing debug helpers

2023-10-26 Thread Andrew Haley
On Wed, 25 Oct 2023 18:30:36 GMT, Aleksey Shipilev wrote: > The block in question also works when link-time gc is enabled, which is only > so on s390x by default: > > https://github.com/openjdk/jdk/blob/d96f38b80c1606b54b9f3dbfe9717ab9653a0605/make/autoconf/jdk-options.m4#L105-L110 It does, bu

Integrated: 8318834: s390x: Debug builds are missing debug helpers

2023-10-26 Thread Andrew Haley
On Wed, 25 Oct 2023 17:26:13 GMT, Andrew Haley wrote: > On s390x only, HotSpot is built by GCC with -ffunction-sections. > This means that debug helpers such as ps() and pfl() are not available. These > helpers are extremely useful in debugging, so it makes no sense to omit them >

Re: RFR: 8318834: s390x: Debug builds are missing debug helpers

2023-10-26 Thread Andrew Haley
On Wed, 25 Oct 2023 18:26:23 GMT, Aleksey Shipilev wrote: > The comment in the block says: > > ``` > # do this on s390x also for libjvm (where serviceability agent is not > supported) > ``` > > ...which I read as "if we enable this, SA would break". Does > `serviceability/sa` pass in both

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v16]

2023-10-26 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Remove accidental include - Changes: - all: https://git.o

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v17]

2023-10-27 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Move IEE subnormal check to globalDefinitions - Change

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v15]

2023-10-27 Thread Andrew Haley
On Thu, 26 Oct 2023 15:59:08 GMT, Thomas Stuefe wrote: > One more thought, it would be good to add the FTZ_mode_enabled check to > `os::run_periodic_checks()`. > > We already do signal handler checks there, and it is the right place to check > for "global things third party native code may mes

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v16]

2023-10-27 Thread Andrew Haley
On Thu, 26 Oct 2023 17:42:39 GMT, Vladimir Ivanov wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove accidental include > > make/test/JtregNativeH

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v18]

2023-10-27 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Fix header - Changes: - all: https://git.openjdk.org/jdk/

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v15]

2023-10-27 Thread Andrew Haley
On Thu, 26 Oct 2023 15:41:35 GMT, Thomas Stuefe wrote: > This looks good to me. > > One suggestion: to reduce code duplication and to make the code a bit safer > against accidental returns prior to fesetenv, I would have used a mark object > like this: Thanks. I take your point, but I think t

Re: RFR: 8319165: hsdis binutils: warns on empty string as option string

2023-10-31 Thread Andrew Haley
On Tue, 31 Oct 2023 13:05:44 GMT, Robbin Ehn wrote: > Hi, please consider. > > insn_options[0] is set to empty string if there is no options (NULL or empty > strings). > Checking it for empty string should cover both cases, caller option is NULL > or caller option is empty string. > > Tested

Re: RFR: 8319165: hsdis binutils: warns on empty string as option string

2023-10-31 Thread Andrew Haley
On Tue, 31 Oct 2023 14:42:22 GMT, Robbin Ehn wrote: >> The parse_caller_options handles the NULL case, so I forgot about the early >> bailout. >> >> for (p = caller_options; p != NULL; ) { >> } >> *iop = '\0'; >> >> >> Sorry. > > Sorry again, long day: > > struct hsdis_app_data app_d

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v18]

2023-11-01 Thread Andrew Haley
On Fri, 27 Oct 2023 11:59:59 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55

Re: RFR: 8319165: hsdis binutils: warns on empty string as option string [v2]

2023-11-02 Thread Andrew Haley
On Wed, 1 Nov 2023 11:52:20 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> insn_options[0] is set to empty string if there is no options (NULL or empty >> strings). >> Checking it for empty string should cover both cases, caller option is NULL >> or caller option is empty string. >> >>

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v19]

2023-11-03 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 42 commits: - Merge - Fix header - Move IEE subnorma

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v20]

2023-11-03 Thread Andrew Haley
JDK. I guess the best thing to do is find and wrap them all. I'd like to > hear people's opinions. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Delete src/hotspot/os/linux/.#os_linux.cpp - Changes: -

Integrated: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic

2023-11-04 Thread Andrew Haley
On Tue, 11 Oct 2022 16:02:41 GMT, Andrew Haley wrote: > A bug in GCC causes shared libraries linked with -ffast-math to disable > denormal arithmetic. This breaks Java's floating-point semantics. > > The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 > > One

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Andrew Haley
On Wed, 22 Nov 2023 01:52:51 GMT, Xiaohong Gong wrote: > > Have you considered the possibility of copying the sleef source to the > > OpenJDK repository and thereby it becomes part of the build process? I > > don't know how straightforward that is technically and IANAL but I think > > it's wor

Re: RFR: 8320533: Adjust capstone integration for v6 changes [v2]

2023-11-23 Thread Andrew Haley
On Thu, 23 Nov 2023 09:09:37 GMT, Galder Zamarreño wrote: >> FYI @theRealAph >> >> It includes a couple of commits to integrate with Capstone v6 while still >> working with Capstone v5 and before: >> * `CAPSTONE_ARCH` for aarch64 is now `CS_ARCH_AARCH64` instead of >> `CS_ARCH_ARM64`. See [thi

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-23 Thread Andrew Haley
On Thu, 23 Nov 2023 08:57:23 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on X

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-23 Thread Andrew Haley
On Thu, 23 Nov 2023 08:57:23 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on X

Re: RFR: 8320533: Adjust capstone integration for v6 changes [v3]

2023-11-24 Thread Andrew Haley
On Thu, 23 Nov 2023 16:31:22 GMT, Galder Zamarreño wrote: >> FYI @theRealAph >> >> It includes a couple of commits to integrate with Capstone v6 while still >> working with Capstone v5 and before: >> * `CAPSTONE_ARCH` for aarch64 is now `CS_ARCH_AARCH64` instead of >> `CS_ARCH_ARM64`. See [thi

Re: RFR: 8320533: Adjust capstone integration for v6 changes [v3]

2023-11-24 Thread Andrew Haley
On Thu, 23 Nov 2023 16:31:22 GMT, Galder Zamarreño wrote: >> FYI @theRealAph >> >> It includes a couple of commits to integrate with Capstone v6 while still >> working with Capstone v5 and before: >> * `CAPSTONE_ARCH` for aarch64 is now `CS_ARCH_AARCH64` instead of >> `CS_ARCH_ARM64`. See [thi

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-27 Thread Andrew Haley
On Mon, 27 Nov 2023 01:06:21 GMT, Xiaohong Gong wrote: >> make/autoconf/lib-vmath.m4 line 94: >> >>> 92: # Check the ARM SVE feature >>> 93: SVE_CFLAGS="-march=armv8-a+sve" >>> 94: >> >> What's this about? We're building a standard binary, and all SVE detection >> is to be

Re: RFR: 8320533: Adjust capstone integration for v6 changes [v5]

2023-11-27 Thread Andrew Haley
On Mon, 27 Nov 2023 07:38:28 GMT, Galder Zamarreño wrote: >> FYI @theRealAph >> >> It includes a couple of commits to integrate with Capstone v6 while still >> working with Capstone v5 and before: >> * `CAPSTONE_ARCH` for aarch64 is now `CS_ARCH_AARCH64` instead of >> `CS_ARCH_ARM64`. See [thi

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-27 Thread Andrew Haley
On Mon, 27 Nov 2023 14:59:23 GMT, Magnus Ihse Bursie wrote: > You still need to separate out the SVE detection from the libsleef code, and > provide a way to enable/disable it from the configure command line. Why? I don't think this should be a build-time option at all, because it puts the peo

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-27 Thread Andrew Haley
On Mon, 27 Nov 2023 15:22:32 GMT, Magnus Ihse Bursie wrote: > In fact, I am not even sure why it seems to the PR author to be a good idea > to let the default be dependent on the build machine at all. My personal > opinion is that it would be better to select either "SVE enabled" or "SVE > dis

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-28 Thread Andrew Haley
On Tue, 28 Nov 2023 01:37:01 GMT, Xiaohong Gong wrote: >>> In fact, I am not even sure why it seems to the PR author to be a good idea >>> to let the default be dependent on the build machine at all. My personal >>> opinion is that it would be better to select either "SVE enabled" or "SVE >>>

Re: RFR: 8320942: Only set openjdk-target when cross compiling linux-aarch64

2023-11-29 Thread Andrew Haley
On Wed, 29 Nov 2023 02:25:20 GMT, Mikael Vidstedt wrote: > When building linux-aarch64 at Oracle using jib, > --openjdk-target=aarch64-linux-gnu is always specified regardless of if > building natively or cross compiling (on linux-x64). Among other things this > has the (harmless) effect of tr

Re: RFR: 8320942: Only set openjdk-target when cross compiling linux-aarch64

2023-11-29 Thread Andrew Haley
On Wed, 29 Nov 2023 08:33:33 GMT, Andrew Haley wrote: >> When building linux-aarch64 at Oracle using jib, >> --openjdk-target=aarch64-linux-gnu is always specified regardless of if >> building natively or cross compiling (on linux-x64). Among other things this >> has

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-11-30 Thread Andrew Haley
On Thu, 30 Nov 2023 09:35:04 GMT, Magnus Ihse Bursie wrote: > This version looks much better, thank you! I guess cflags/SVE_CFLAGS is an > okay-ish solution. > > I'm still not 100% happy though, but it might be due to my limited > understanding. Let me write down a few numbered statements and t

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-11-30 Thread Andrew Haley
On Thu, 30 Nov 2023 06:39:43 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on X

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-11-30 Thread Andrew Haley
On Thu, 30 Nov 2023 06:39:43 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on X

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-11-30 Thread Andrew Haley
On Thu, 30 Nov 2023 11:46:58 GMT, Andrew Haley wrote: > [vect_math.S.txt](https://github.com/openjdk/jdk/files/13512306/vect_math.S.txt) I guess this will live only in os_linux and os_bsd because the Windows compiler won't like it AFAIK. - PR Comment: https://git.openjdk

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-12-01 Thread Andrew Haley
On Thu, 30 Nov 2023 14:50:24 GMT, Andrew Haley wrote: >> Do this, but with the name vect_math.S. Don't use SLEEF headers in the >> build. I think you can do this with no build-time dependency on SLEEF at all >> if you load the library lazily at runtime. >>

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 01:13:37 GMT, Xiaohong Gong wrote: >> make/autoconf/lib-sleef.m4 line 56: >> >>> 54: AC_MSG_CHECKING([for the specified LIBSLEEF]) >>> 55: if test -e ${with_libsleef}/lib/libsleef.so && >>> 56:test -e ${with_libsleef}/include/sleef.h; then >> >> Th

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 09:59:58 GMT, Andrew Haley wrote: > Not having a build time dependency on libsleef means you cannot really verify > that the functions you want to call are correct, but maybe you feel secure > that they will never change? We can still have SLEEF tests, but they wil

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 01:19:12 GMT, Xiaohong Gong wrote: > > Not having a build time dependency on libsleef means you cannot really > > verify that the functions you want to call are correct, but maybe you feel > > secure that they will never change? > > I'm not sure. The main reason that we add

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v6]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 08:48:52 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on X8

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v6]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 08:48:52 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on X8

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v6]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 10:19:01 GMT, Andrew Haley wrote: >> Xiaohong Gong 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 ten addi

Re: Cross compilation discussion

2023-12-06 Thread Andrew Haley
raries. By definition, because if you're building against a compatible set of libraries you don't have a different sysroot. -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. <https://www.redhat.com> https://keybase.io/andrewhaley EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

Re: Cross compilation discussion

2023-12-06 Thread Andrew Haley
On 12/6/23 14:35, erik.joels...@oracle.com wrote: On 12/6/23 04:18, Andrew Haley wrote: On 11/29/23 14:31, erik.joels...@oracle.com wrote: Perhaps what we need to do is separate the notion of needing a separate BUILD_JDK from the notion of cross compiling. Isn't that what --with-sy

Re: Cross compilation discussion

2023-12-11 Thread Andrew Haley
I think I may be missing something important here: what is the downside of treating a build as a cross compilation? Is it simply that more work has to be done, or something else? -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. <https://www.redhat.com> https://keybase.io/andrewhaley EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

Re: RFR: 8314488: Compile the JDK as C++17 [v2]

2023-12-16 Thread Andrew Haley
On Fri, 15 Dec 2023 13:05:32 GMT, Julian Waters wrote: >> The keyword also happens to go in the same location as well. How >> coincidental... > > I also realized that this uses a gcc statement expression currently, I wonder > if this could use a lambda expression instead in another change? Tha

Re: RFR: 8314488: Compile the JDK as C++17 [v6]

2024-02-05 Thread Andrew Haley
On Wed, 17 Jan 2024 11:19:03 GMT, Magnus Ihse Bursie wrote: > We have been stuck on a very old gcc for a long time, due to various reasons. > Partly because old gcc versions were not as terrible as old versions of > cl.exe, and partly to support odd linux platforms where newer gcc versions > w

Re: Which JDK in the build directory is the one that is shipped?

2024-02-12 Thread Andrew Haley
er to mimic how Oracle compiles both OpenJDK and Oracle JDK as closely as possible. I sh ./configure --helpbelieve Oracle probably does it by specifying different parts of the version string on configure, something like bash configure "sh ./configure --help" and look for the --wit

Re: RFR: 8314488: Compile the JDK as C++17 [v6]

2024-02-16 Thread Andrew Haley
On Thu, 15 Feb 2024 17:11:34 GMT, Thomas Stuefe wrote: > > Sure, you can always install a newer GCC than the system one, but it's > > another thing that makes it harder for people to build OpenJDK. Having said > > that, C++17 is nice to have. > > @theRealAph I am still just hearing hand-waving

Re: RFR: 8314488: Compile the JDK as C++17 [v6]

2024-02-16 Thread Andrew Haley
On Fri, 16 Feb 2024 08:35:29 GMT, Andrew Haley wrote: > > To be clear: I do not object to this PR. I would like to use C++17. Maybe the advantages of C++17 have been discussed elsewhere, in which case all we need is a link to that discussion on the Bug page. Maybe it's just that

Re: Hotspot symbol visibility

2024-02-16 Thread Andrew Haley
On 2/16/24 08:49, Thomas Stüfe wrote: It is probably safe to hide C++ mangled symbols since those decorations are compiler-specific anyway, no? So they cannot have worked in a reliable fashion They're not entirely compiler specific, but part of the ABI. See https://itanium-cxx-abi.github.io/cxx

Re: RFR: 8314488: Compile the JDK as C++17 [v6]

2024-02-16 Thread Andrew Haley
On Fri, 16 Feb 2024 12:43:29 GMT, Magnus Ihse Bursie wrote: > I think Kim's approach here -- to separate compiler upgrades from C++17 usage > -- is the right way. Then we can discuss each part separately -- what version > is suitable for each compiler, and then -- if or when we end up with all

Re: RFR: 8326509: Clean up JNIEXPORT in Hotspot after JDK-8017234 [v3]

2024-02-26 Thread Andrew Haley
On Sat, 24 Feb 2024 20:01:50 GMT, Martijn Verburg wrote: >> Hi all - yes the Windows Arm port is maintained by Microsoft's JDK team. How >> can we help in this particular case? > > I assume you want to know if we use DAS/DAS1 for debugging purposes on that > platform? I use `das` every day. In

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2]

2024-03-14 Thread Andrew Haley
On Thu, 14 Mar 2024 09:14:04 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks >> >> This is a continuation of work based on [1] by @XiaohongGong, most work was >> done in that pr. In this new pr, just rebased the code in [1], then added >> some minor changes (renami

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2]

2024-03-14 Thread Andrew Haley
On Thu, 14 Mar 2024 11:20:26 GMT, Robbin Ehn wrote: > Hi, thanks for continuing with this. > > As this is similar to SVML, comments applies to x86 also: > > * There is no way to stop the VM from trying to load vmath ? > There is both a UseNeon and a UseSVE, if I set both to false I wo

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2]

2024-03-14 Thread Andrew Haley
On Thu, 14 Mar 2024 09:14:04 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks >> >> This is a continuation of work based on [1] by @XiaohongGong, most work was >> done in that pr. In this new pr, just rebased the code in [1], then added >> some minor changes (renami

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-03-16 Thread Andrew Haley
On Fri, 15 Mar 2024 13:58:05 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks >> >> This is a continuation of work based on [1] by @XiaohongGong, most work was >> done in that pr. In this new pr, just rebased the code in [1], then added >> some minor changes (renami

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2]

2024-03-16 Thread Andrew Haley
On Fri, 15 Mar 2024 11:35:05 GMT, Hamlin Li wrote: > > I'm running the tests, but I have no way to confirm that SLEEF or SVE is in > > use. Exactly what did you do, and how did you confirm it? > > Thanks for running test. I just turn on some log, and check the output. The problem I see is that

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-03-19 Thread Andrew Haley
On Tue, 19 Mar 2024 17:00:48 GMT, Hamlin Li wrote: > > The problem I see is that J. Random Java User has no way to know if SLEEF > > is making their program faster without running benchmarks. They'll put > > SLEEF somewhere and hope that Java uses it. > > Please kindly correct me if I misunder

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-03-21 Thread Andrew Haley
On Tue, 19 Mar 2024 17:15:29 GMT, Andrew Haley wrote: >>> If there was some kind of plan, with evidence of the intention to do >>> something to get this valuable tech into people's hands in a form they can >>> use, sure. But as you can tell, I think thi

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-03-22 Thread Andrew Haley
On Thu, 21 Mar 2024 15:43:28 GMT, Magnus Ihse Bursie wrote: >>> > The problem I see is that J. Random Java User has no way to know if SLEEF >>> > is making their program faster without running benchmarks. They'll put >>> > SLEEF somewhere and hope that Java uses it. >>> >>> Please kindly corre

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-03-22 Thread Andrew Haley
On Fri, 15 Mar 2024 13:58:05 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks >> >> This is a continuation of work based on [1] by @XiaohongGong, most work was >> done in that pr. In this new pr, just rebased the code in [1], then added >> some minor changes (renami

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-03-22 Thread Andrew Haley
On Fri, 22 Mar 2024 12:31:01 GMT, Andrew Haley wrote: > > > What is the relevance of SVE support at build time? Should it matter what > > > the build machine is? > > > > > > My understanding is that we need a compiler that supports > > `-march=

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-23 Thread Andrew Haley
On Fri, 22 Mar 2024 13:38:54 GMT, Robbin Ehn wrote: > > > is this how you want us to export these symbols? > > > > > > Close but no cigar. :-) > > Use `JNIEXPORT` instead, that is properly defined for this purpose and > > works on all compilers. You will need to also add: > > ``` > > #include

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-03-25 Thread Andrew Haley
On Fri, 15 Mar 2024 13:58:05 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks >> >> This is a continuation of work based on [1] by @XiaohongGong, most work was >> done in that pr. In this new pr, just rebased the code in [1], then added >> some minor changes (renami

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-04 Thread Andrew Haley
On Mon, 25 Mar 2024 09:11:40 GMT, Magnus Ihse Bursie wrote: > > And neither should we compile or link it with "-fvisibility=hidden". That > > is the root of this problem. > > If you suggest that we should not compile hsdis with hidden visibility, I > disagree. Yes, that's what I would do. >

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-06 Thread Andrew Haley
On Thu, 4 Apr 2024 16:43:18 GMT, Magnus Ihse Bursie wrote: > I apologize for the late reply. I've been just working spotty hours due to > spring break. I apologize for my bad temper. 😀 Thanks to everyone working on this. I still think that hsdis ought not to have any dependencies on HotSpot,

  1   2   3   >