Re: RFR: JDK-8301661: Enhance os::pd_print_cpu_info on macOS and Windows [v5]

2023-02-16 Thread David Holmes
On Thu, 16 Feb 2023 09:18:58 GMT, Matthias Baesken wrote: >> Enhance os::pd_print_cpu_info on macOS and Windows by information about CPU >> frequency and caches. >> On Windows , this info can be obtained by the Processor Power Information >> API or "powerbase" (CallNtPowerInformation , see >>

RFR: 8302384: Handle hsdis out-of-bound logic for RISC-V

2023-02-16 Thread Xiaolin Zheng
Several debug assertion failures have been observed on RISC-V, on physical boards only. Failure list: (the `hs_err` log is in the JBS issue) compiler/vectorapi/TestVectorShiftImm.java compiler/compilercontrol/jcmd/AddPrintAssemblyTest.java compiler/intrinsics/math/TestFpMinMaxIntrinsics.java com

Re: RFR: 8276799: Implementation of JEP 422: Linux/RISC-V Port [v5]

2023-02-16 Thread SUN Guoyun
On Thu, 24 Mar 2022 07:01:43 GMT, Fei Yang wrote: >> This PR implements JEP 422: Linux/RISC-V Port [1]. >> The PR starts as a squashed merge of the >> https://openjdk.java.net/projects/riscv-port branch. >> >> This has been tested with jtreg tier{1,2,3,4} and jcstress on HiFive >> Unmatched bo

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Daniel Fuchs
On Thu, 16 Feb 2023 20:22:17 GMT, Rich DiCroce wrote: >> ok so here goes: your patch changes the order in which the interfaces are >> returned; the original code returned them in order of increasing indexes, >> the new code appears to sort interfaces by LUID. >> The failing test uses the first

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Rich DiCroce
On Thu, 16 Feb 2023 19:38:58 GMT, Daniel Jeliński wrote: >> I ran the tests for NetworkInterface specifically, though that reminds me >> that I need to open a bug report about fixpath mangling things incorrectly. >> I'll give the full jdk_net suite a run and see what happens. > > ok so here goe

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Daniel Jeliński
On Thu, 16 Feb 2023 18:59:06 GMT, Rich DiCroce wrote: >> Ha! Apparently I have a machine where the implementation of >> `supportsMulticast` implementation makes a difference. On my machine the >> test `jdk/java/net/SocketOption/OptionsTest.java` is failing with: >> >> java.net.SocketException:

Integrated: 8301753: AppendFile/WriteFile has differences between make 3.81 and 4+

2023-02-16 Thread Magnus Ihse Bursie
On Thu, 16 Feb 2023 19:08:53 GMT, Magnus Ihse Bursie wrote: > This is a retake on https://github.com/openjdk/jdk/pull/12461. Changes > compared to the original patch: > > Both WriteFile and AppendFile are fixed. > > It turned out we actually did a `$(strip)` on the input for the `$(file)` >

Re: RFR: 8301753: AppendFile/WriteFile has differences between make 3.81 and 4+

2023-02-16 Thread Erik Joelsson
On Thu, 16 Feb 2023 19:08:53 GMT, Magnus Ihse Bursie wrote: > This is a retake on https://github.com/openjdk/jdk/pull/12461. Changes > compared to the original patch: > > Both WriteFile and AppendFile are fixed. > > It turned out we actually did a `$(strip)` on the input for the `$(file)` >

RFR: 8301753: AppendFile/WriteFile has differences between make 3.81 and 4+

2023-02-16 Thread Magnus Ihse Bursie
This is a retake on https://github.com/openjdk/jdk/pull/12461. Changes compared to the original patch: Both WriteFile and AppendFile are fixed. It turned out we actually did a `$(strip)` on the input for the `$(file)` variant, so for consistency we should do that for the make 3.81 as well. Alm

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Rich DiCroce
On Thu, 16 Feb 2023 18:54:05 GMT, Daniel Jeliński wrote: >> You and me both. As I wrote in the giant comment, I did a lot of >> experimenting. In the end, what I determined was that if the IGMPLevel >> (IPv4) or MldLevel (IPv6) is set to 0 (None), then attempting to join a >> multicast group t

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Daniel Jeliński
On Thu, 16 Feb 2023 18:05:05 GMT, Rich DiCroce wrote: >> src/java.base/windows/native/libnet/NetworkInterface.c line 523: >> >>> 521: * Signature: (Ljava/lang/String;I)Z >>> 522: */ >>> 523: JNIEXPORT jboolean JNICALL >>> Java_java_net_NetworkInterface_supportsMulticast0(JNIEnv *env, jclass c

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Rich DiCroce
On Thu, 16 Feb 2023 18:01:43 GMT, Mark Sheppard wrote: >> Rich DiCroce has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Limit line length to 80-ish characters > > what versions of Windows has this been tested on ? Just wondering if the >

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Rich DiCroce
On Thu, 16 Feb 2023 17:08:25 GMT, Daniel Jeliński wrote: >> Rich DiCroce has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Limit line length to 80-ish characters > > src/java.base/windows/native/libnet/NetworkInterface.c line 523: > >> 52

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Mark Sheppard
On Thu, 16 Feb 2023 16:49:09 GMT, Rich DiCroce wrote: >> Improves performance and correctness, as discussed on the net-dev mailing >> list. > > Rich DiCroce has updated the pull request incrementally with one additional > commit since the last revision: > > Limit line length to 80-ish charac

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Rich DiCroce
On Thu, 16 Feb 2023 16:08:55 GMT, Daniel Jeliński wrote: >> Rich DiCroce has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Limit line length to 80-ish characters > > src/java.base/windows/native/libnet/NetworkInterface.c line 72: > >> 70:

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Daniel Jeliński
On Thu, 16 Feb 2023 16:49:09 GMT, Rich DiCroce wrote: >> Improves performance and correctness, as discussed on the net-dev mailing >> list. > > Rich DiCroce has updated the pull request incrementally with one additional > commit since the last revision: > > Limit line length to 80-ish charac

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface [v2]

2023-02-16 Thread Rich DiCroce
> Improves performance and correctness, as discussed on the net-dev mailing > list. Rich DiCroce has updated the pull request incrementally with one additional commit since the last revision: Limit line length to 80-ish characters - Changes: - all: https://git.openjdk.org/jdk/

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface

2023-02-16 Thread Rich DiCroce
On Thu, 16 Feb 2023 14:32:15 GMT, Rich DiCroce wrote: > Improves performance and correctness, as discussed on the net-dev mailing > list. Maximum line length reduced to 80-ish characters. - PR: https://git.openjdk.org/jdk/pull/12593

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface

2023-02-16 Thread Magnus Ihse Bursie
On Thu, 16 Feb 2023 14:32:15 GMT, Rich DiCroce wrote: > Improves performance and correctness, as discussed on the net-dev mailing > list. Build changes look fine. - Marked as reviewed by ihse (Reviewer). PR: https://git.openjdk.org/jdk/pull/12593

Re: RFR: JDK-8302599: Extend ASan support to Microsoft Visual C++

2023-02-16 Thread Magnus Ihse Bursie
On Wed, 15 Feb 2023 17:53:49 GMT, Justin King wrote: > Update build-related infrastructure to support building with ASan under > Microsoft Visual C++. It basically looks good but need some more polishing. make/autoconf/jdk-options.m4 line 427: > 425: ], > 426: IF_ENABLED: [ > 427:

Re: RFR: JDK-8302599: Extend ASan support to Microsoft Visual C++

2023-02-16 Thread Magnus Ihse Bursie
On Wed, 15 Feb 2023 17:53:49 GMT, Justin King wrote: > Update build-related infrastructure to support building with ASan under > Microsoft Visual C++. make/autoconf/jdk-options.m4 line 438: > 436: elif test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then > 437: # MSVC produces a warn

Re: RFR: JDK-8302599: Extend ASan support to Microsoft Visual C++

2023-02-16 Thread Thomas Stuefe
On Wed, 15 Feb 2023 17:53:49 GMT, Justin King wrote: > Update build-related infrastructure to support building with ASan under > Microsoft Visual C++. LGTM. Build error on Mac x64 seems unrelated. - Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.org/jdk/pull/125

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface

2023-02-16 Thread Daniel Fuchs
On Thu, 16 Feb 2023 14:32:15 GMT, Rich DiCroce wrote: > Improves performance and correctness, as discussed on the net-dev mailing > list. Something between 80 and 100 is usually a good limit. We typically avoid to go above that. So no hard limit at 80 but avoid having lines which are too long.

Re: RFR: JDK-8302599: Extend ASan support to Microsoft Visual C++

2023-02-16 Thread Justin King
It is consumed by the ASan runtime itself, which is loaded first well before main(int, char**) is invoked. In order for ASan to find it, the symbol to it has to be exported. See references to __asan_default_options in https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/asan/asan_flags.cp

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface

2023-02-16 Thread Rich DiCroce
On Thu, 16 Feb 2023 14:32:15 GMT, Rich DiCroce wrote: > Improves performance and correctness, as discussed on the net-dev mailing > list. Sure. What do you want the max line length to be? 80 chars? 100? - PR: https://git.openjdk.org/jdk/pull/12593

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-16 Thread Maurizio Cimadamore
On Thu, 16 Feb 2023 10:41:33 GMT, Adam Sotona wrote: >> This is root pull request with Classfile API implementation, tests and >> benchmarks initial drop into JDK. >> >> Following pull requests consolidating JDK class files parsing, generating, >> and transforming >> ([JDK-8294957](https://bu

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface

2023-02-16 Thread Alan Bateman
On Thu, 16 Feb 2023 14:32:15 GMT, Rich DiCroce wrote: > Improves performance and correctness, as discussed on the net-dev mailing > list. Would it be possible to re-format the changes to src/java.base/windows/native/libnet/NetworkInterface.c to avoid the overly long lines - some of the new li

Re: RFR: 8302659: Modernize Windows native code for NetworkInterface

2023-02-16 Thread Daniel Fuchs
On Thu, 16 Feb 2023 14:32:15 GMT, Rich DiCroce wrote: > Improves performance and correctness, as discussed on the net-dev mailing > list. FWIW - there is a perl script located in `make/scripts/normalizer.pl` that can be run on modified sources to fix up whitespace and CRLF issues when jcheck

RFR: 8302659: Modernize Windows native code for NetworkInterface

2023-02-16 Thread Rich DiCroce
Improves performance and correctness, as discussed on the net-dev mailing list. - Commit messages: - Fix whitespace issues - Remove executable bit from NetworkInterface.c - Rewrite Windows native code for NetworkInterface to improve performance and correctness Changes: https://gi

Re: RFR: 8302460: System C++ Compiler for cross compiling gcc is dangerously wrong

2023-02-16 Thread Julian Waters
On Tue, 14 Feb 2023 14:32:10 GMT, Julian Waters wrote: > Full details in linked entry, man did this give me a scare on my local branch > > All C++ compilers for the build operating system are under the name c++ (when > selected compiler is gcc), but when searching for BUILD_CXX the compiler >

Withdrawn: 8302460: System C++ Compiler for cross compiling gcc is dangerously wrong

2023-02-16 Thread Julian Waters
On Tue, 14 Feb 2023 14:32:10 GMT, Julian Waters wrote: > Full details in linked entry, man did this give me a scare on my local branch > > All C++ compilers for the build operating system are under the name c++ (when > selected compiler is gcc), but when searching for BUILD_CXX the compiler >

Re: RFR: JDK-8302599: Extend ASan support to Microsoft Visual C++

2023-02-16 Thread Thomas Stüfe
I’m curious, why does the options function have to be exported? Who is consuming it? On Wed 15. Feb 2023 at 19:01, Justin King wrote: > Update build-related infrastructure to support building with ASan under > Microsoft Visual C++. > > - > > Commit messages: > - Move comment to appr

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-16 Thread Maurizio Cimadamore
On Thu, 16 Feb 2023 10:41:33 GMT, Adam Sotona wrote: >> This is root pull request with Classfile API implementation, tests and >> benchmarks initial drop into JDK. >> >> Following pull requests consolidating JDK class files parsing, generating, >> and transforming >> ([JDK-8294957](https://bu

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-16 Thread Maurizio Cimadamore
On Thu, 16 Feb 2023 12:46:09 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > > src/java.base/share/classes/jdk/internal/classfile/impl/SplitCons

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-16 Thread Jens Lidestrom
On Thu, 16 Feb 2023 10:41:33 GMT, Adam Sotona wrote: >> This is root pull request with Classfile API implementation, tests and >> benchmarks initial drop into JDK. >> >> Following pull requests consolidating JDK class files parsing, generating, >> and transforming >> ([JDK-8294957](https://bu

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-16 Thread Maurizio Cimadamore
On Thu, 16 Feb 2023 11:27:18 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > > src/java.base/share/classes/jdk/internal/classfile/components/Cod

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-16 Thread Maurizio Cimadamore
On Thu, 16 Feb 2023 10:41:33 GMT, Adam Sotona wrote: >> This is root pull request with Classfile API implementation, tests and >> benchmarks initial drop into JDK. >> >> Following pull requests consolidating JDK class files parsing, generating, >> and transforming >> ([JDK-8294957](https://bu

Re: RFR: 8302460: System C++ Compiler for cross compiling gcc is dangerously wrong

2023-02-16 Thread Magnus Ihse Bursie
On Tue, 14 Feb 2023 14:32:10 GMT, Julian Waters wrote: > Full details in linked entry, man did this give me a scare on my local branch > > All C++ compilers for the build operating system are under the name c++ (when > selected compiler is gcc), but when searching for BUILD_CXX the compiler >

Re: RFR: 8302460: System C++ Compiler for cross compiling gcc is dangerously wrong

2023-02-16 Thread Thomas Stuefe
On Tue, 14 Feb 2023 14:32:10 GMT, Julian Waters wrote: > Full details in linked entry, man did this give me a scare on my local branch > > All C++ compilers for the build operating system are under the name c++ (when > selected compiler is gcc), but when searching for BUILD_CXX the compiler >

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-16 Thread Adam Sotona
On Thu, 16 Feb 2023 10:46:23 GMT, Adam Sotona wrote: >> As I read the javadoc (I have not looked at impl yet), this method can >> effectively be used to add an entry to the constant pool (if the entry does >> not yet exist - in which case existing entry is returned). >> >> After having looked

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-16 Thread Adam Sotona
On Thu, 16 Feb 2023 10:25:04 GMT, Maurizio Cimadamore wrote: >> I'm not quite sure what exactly do you propose. >> `ConstantPool` should not accept anything as it is read-only, so "accept" >> would be confusing. >> `ConstantPoolBuilder::maybeClone` is rather a `Function`, where the name >> mig

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-16 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one. >

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-16 Thread Maurizio Cimadamore
On Wed, 15 Feb 2023 08:20:19 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/constantpool/ConstantPoolBuilder.java >> line 537: >> >>> 535: * @param the type of the entry >>> 536: */ >>> 537: T maybeClone(T entry); >> >> This feels a more primitive

Re: RFR: 8302460: System C++ Compiler for cross compiling gcc is dangerously wrong

2023-02-16 Thread Magnus Ihse Bursie
On Tue, 14 Feb 2023 14:32:10 GMT, Julian Waters wrote: > Full details in linked entry, man did this give me a scare on my local branch > > All C++ compilers for the build operating system are under the name c++ (when > selected compiler is gcc), but when searching for BUILD_CXX the compiler >

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-16 Thread Adam Sotona
On Fri, 10 Feb 2023 11:16:22 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/constantpool/Utf8Entry.java >> line 47: >> >>> 45: * @param s the string to compare to >>> 46: */ >>> 47: boolean equalsString(String s); >> >> Whatif the provided string co

Re: RFR: JDK-8301661: Enhance os::pd_print_cpu_info on macOS and Windows [v5]

2023-02-16 Thread Matthias Baesken
> Enhance os::pd_print_cpu_info on macOS and Windows by information about CPU > frequency and caches. > On Windows , this info can be obtained by the Processor Power Information API > or "powerbase" (CallNtPowerInformation , see > https://learn.microsoft.com/en-us/windows/win32/api/powerbase/nf-