Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v6]

2024-08-26 Thread Fei Yang
On Fri, 23 Aug 2024 18:42:28 GMT, Hamlin Li wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix bit counts in GCForwarding > > src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.cpp line 170: > >> 168: mv(tmp1, (int3

Re: RFR: 8337317: serviceability/jvmti tests failed with FATAL ERROR in native method: Failed during the GetClassSignature call [v3]

2024-08-26 Thread Chris Plummer
On Tue, 27 Aug 2024 01:18:46 GMT, Alex Menkov wrote: >> The fix adds guards against JVMTI_ERROR_WRONG_PHASE error in event handlers >> >> Testing: hotspot/jtreg/serviceability/jvmti on all platforms > > Alex Menkov has updated the pull request incrementally with one additional > commit since th

Re: RFR: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected [v2]

2024-08-26 Thread Chris Plummer
On Mon, 26 Aug 2024 22:25:34 GMT, Alex Menkov wrote: >> On Windows SA agent gets a class vtable from symbols, exported from jvm.dll >> (it exports symbols like "??_7" + type + "@@6B@"). >> But symbol lookup function first requests WinDbg about the symbol. >> Sometimes WinDbg routine IDebugSymbol

Integrated: 8336289: Obliterate most references to _snprintf in the Windows JDK

2024-08-26 Thread Julian Waters
On Fri, 12 Jul 2024 06:29:34 GMT, Julian Waters wrote: > snprintf has been available for all officially and unofficially supported > compilers for Windows, Visual Studio since version 2015 and gcc since, well, > forever. snprintf is conforming to C99 since the start when compiling using > gcc,

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v5]

2024-08-26 Thread Julian Waters
On Sat, 24 Aug 2024 05:12:42 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8338257: UTF8 lengths should be size_t not int [v5]

2024-08-26 Thread Dean Long
On Tue, 20 Aug 2024 04:09:04 GMT, David Holmes wrote: >> This work has been split out from JDK-8328877: [JNI] The JNI Specification >> needs to address the limitations of integer UTF-8 String lengths >> >> The modified UTF-8 format used by the VM can require up to six bytes to >> represent one

Re: RFR: 8338257: UTF8 lengths should be size_t not int [v5]

2024-08-26 Thread Dean Long
On Tue, 20 Aug 2024 04:09:04 GMT, David Holmes wrote: >> This work has been split out from JDK-8328877: [JNI] The JNI Specification >> needs to address the limitations of integer UTF-8 String lengths >> >> The modified UTF-8 format used by the VM can require up to six bytes to >> represent one

Re: RFR: 8338257: UTF8 lengths should be size_t not int [v5]

2024-08-26 Thread Dean Long
On Tue, 20 Aug 2024 04:09:04 GMT, David Holmes wrote: >> This work has been split out from JDK-8328877: [JNI] The JNI Specification >> needs to address the limitations of integer UTF-8 String lengths >> >> The modified UTF-8 format used by the VM can require up to six bytes to >> represent one

Re: RFR: 8338257: UTF8 lengths should be size_t not int [v5]

2024-08-26 Thread Dean Long
On Tue, 20 Aug 2024 04:09:04 GMT, David Holmes wrote: >> This work has been split out from JDK-8328877: [JNI] The JNI Specification >> needs to address the limitations of integer UTF-8 String lengths >> >> The modified UTF-8 format used by the VM can require up to six bytes to >> represent one

Re: RFR: 8337317: serviceability/jvmti tests failed with FATAL ERROR in native method: Failed during the GetClassSignature call [v3]

2024-08-26 Thread Alex Menkov
> The fix adds guards against JVMTI_ERROR_WRONG_PHASE error in event handlers > > Testing: hotspot/jtreg/serviceability/jvmti on all platforms Alex Menkov has updated the pull request incrementally with one additional commit since the last revision: removed unneeded include - Ch

Re: RFR: 8338257: UTF8 lengths should be size_t not int [v5]

2024-08-26 Thread Dean Long
On Tue, 20 Aug 2024 04:09:04 GMT, David Holmes wrote: >> This work has been split out from JDK-8328877: [JNI] The JNI Specification >> needs to address the limitations of integer UTF-8 String lengths >> >> The modified UTF-8 format used by the VM can require up to six bytes to >> represent one

Re: RFR: 8338257: UTF8 lengths should be size_t not int [v5]

2024-08-26 Thread David Holmes
On Mon, 26 Aug 2024 23:37:15 GMT, Coleen Phillimore wrote: >> Why "> 0" ? > > Because length is an in which could be negative but you're passing it to > size_t. -Wsign-conversion might complain because you're changing signs. I > guess you know from context that it's a positive number, so ok.

Re: RFR: 8338257: UTF8 lengths should be size_t not int

2024-08-26 Thread David Holmes
On Thu, 15 Aug 2024 20:44:52 GMT, Coleen Phillimore wrote: >> This work has been split out from JDK-8328877: [JNI] The JNI Specification >> needs to address the limitations of integer UTF-8 String lengths >> >> The modified UTF-8 format used by the VM can require up to six bytes to >> represen

Re: RFR: 8337317: serviceability/jvmti tests failed with FATAL ERROR in native method: Failed during the GetClassSignature call [v2]

2024-08-26 Thread Alex Menkov
On Sat, 24 Aug 2024 01:22:55 GMT, Leonid Mesnik wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use RawMonitorLocker from jvmti_common > > test/hotspot/jtreg/serviceability/jvmti/HiddenClass/libHiddenClassSigTest.cp

Re: RFR: 8337317: serviceability/jvmti tests failed with FATAL ERROR in native method: Failed during the GetClassSignature call [v2]

2024-08-26 Thread Alex Menkov
> The fix adds guards against JVMTI_ERROR_WRONG_PHASE error in event handlers > > Testing: hotspot/jtreg/serviceability/jvmti on all platforms Alex Menkov has updated the pull request incrementally with one additional commit since the last revision: use RawMonitorLocker from jvmti_common ---

Re: RFR: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected [v2]

2024-08-26 Thread Alex Menkov
On Mon, 26 Aug 2024 01:05:03 GMT, David Holmes wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use SYMBOL_BUFSIZE > > src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp line 865: > >> 863: // As a workar

Re: RFR: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected

2024-08-26 Thread Alex Menkov
On Mon, 26 Aug 2024 16:53:26 GMT, Chris Plummer wrote: > Why do we rely on GetOffsetByName() when we can already lookup directly from > the dll, and this is in fact the fallback already in place when > GetOffsetByName() fails? I'm not expert in the area, but as far as I see this is caused by S

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-26 Thread Jiangli Zhou
On Thu, 22 Aug 2024 00:30:07 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > I compared the extracted changes in this PR with the related parts in > h

Re: RFR: 8338257: UTF8 lengths should be size_t not int [v5]

2024-08-26 Thread Coleen Phillimore
On Mon, 19 Aug 2024 23:08:35 GMT, David Holmes wrote: >> src/hotspot/share/classfile/javaClasses.cpp line 639: >> >>> 637: if (length == 0) { >>> 638: return 0; >>> 639: } >> >> Maybe assert length > 0 here? > > Why "> 0" ? Because length is an in which could be negative but you're pas

Re: RFR: 8338257: UTF8 lengths should be size_t not int [v5]

2024-08-26 Thread Coleen Phillimore
On Tue, 20 Aug 2024 04:09:04 GMT, David Holmes wrote: >> This work has been split out from JDK-8328877: [JNI] The JNI Specification >> needs to address the limitations of integer UTF-8 String lengths >> >> The modified UTF-8 format used by the VM can require up to six bytes to >> represent one

Withdrawn: 8333891: Method excluded with directive is not compiled after removal of directive

2024-08-26 Thread duke
On Mon, 10 Jun 2024 20:05:03 GMT, Evgeny Astigeevich wrote: > A Java method can become non-compilable if there are issues with its > compilation or if its compiled version causes problems. Additionally, a > method can be marked as non-compilable using a compile command or a compiler > directi

Re: RFR: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected [v2]

2024-08-26 Thread Alex Menkov
> On Windows SA agent gets a class vtable from symbols, exported from jvm.dll > (it exports symbols like "??_7" + type + "@@6B@"). > But symbol lookup function first requests WinDbg about the symbol. > Sometimes WinDbg routine IDebugSymbols::GetOffsetByName() returns offset for > both class and c

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v6]

2024-08-26 Thread Chris Plummer
On Thu, 22 Aug 2024 20:08:43 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8335625: Update Javadoc for GetCpuLoad [v4]

2024-08-26 Thread Alan Bateman
On Mon, 26 Aug 2024 13:54:36 GMT, Joakim Nordström wrote: >> Can I get a review of this documentation update to clarify the usage of >> GetCpuLoad (and inherently deprecated GetSystemCpuLoad) and >> GetProcessCpuLoad. >> >> Calling either of these methods in quick succession can lead to >> u

Re: RFR: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected

2024-08-26 Thread Chris Plummer
On Thu, 22 Aug 2024 19:50:01 GMT, Alex Menkov wrote: > On Windows SA agent gets a class vtable from symbols, exported from jvm.dll > (it exports symbols like "??_7" + type + "@@6B@"). > But symbol lookup function first requests WinDbg about the symbol. > Sometimes WinDbg routine IDebugSymbols::G

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v5]

2024-08-26 Thread Jaikiran Pai
On Mon, 26 Aug 2024 12:24:30 GMT, Julian Waters wrote: > If no objections are raised by tomorrow morning I'll proceed with integration I've run this PR against latest mainline in our CI for tier1, tier2 and tier3 and there were no failures. So yes, I think you can go ahead with the integration

Re: RFR: 8335625: Update Javadoc for GetCpuLoad [v3]

2024-08-26 Thread Joakim Nordström
On Mon, 26 Aug 2024 13:51:08 GMT, Alan Bateman wrote: >> Reviewing the current implementation this seems to be the case. >> >> The `@implNote` was more meant as an explanation to why the result could be >> affected by other callers. Since the `@apiNote` also states that the >> "observation pe

Re: RFR: 8335625: Update Javadoc for GetCpuLoad [v3]

2024-08-26 Thread Alan Bateman
On Mon, 26 Aug 2024 13:46:41 GMT, Joakim Nordström wrote: >> src/jdk.management/share/classes/com/sun/management/OperatingSystemMXBean.java >> line 154: >> >>> 152: * affecting the observation period and the result. >>> 153: * >>> 154: * @implNote There is only one observation p

Re: RFR: 8335625: Update Javadoc for GetCpuLoad [v3]

2024-08-26 Thread Joakim Nordström
On Fri, 23 Aug 2024 12:01:43 GMT, Alan Bateman wrote: >> Joakim Nordström has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added implNote and made some re-arrangements > > src/jdk.management/share/classes/com/sun/management/OperatingSyste

Re: RFR: 8335625: Update Javadoc for GetCpuLoad [v4]

2024-08-26 Thread Joakim Nordström
> Can I get a review of this documentation update to clarify the usage of > GetCpuLoad (and inherently deprecated GetSystemCpuLoad) and GetProcessCpuLoad. > > Calling either of these methods in quick succession can lead to > unrepresentative results due to too few data points. > > This behavior

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v5]

2024-08-26 Thread Julian Waters
On Sat, 24 Aug 2024 05:12:42 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v5]

2024-08-26 Thread Sean Mullan
On Sat, 24 Aug 2024 05:12:42 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-26 Thread Magnus Ihse Bursie
On Mon, 26 Aug 2024 02:07:39 GMT, David Holmes wrote: > but it still impacts every single Java run just to save some time/resources > for the handful of builders of statically linked VMs. Seriously? I challenge you do prove there is any effect at all. :-/ Also, there is not a "handful" of buil

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-26 Thread Magnus Ihse Bursie
On Sun, 25 Aug 2024 14:57:22 GMT, Alan Bateman wrote: > That is true for now but there 30-50 other places that will need attention > once this effort is further along. Everywhere that deals with user editable > configuration (conf tree) will change, as will everywhere that reads JDK > internal

Integrated: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI

2024-08-26 Thread Maurizio Cimadamore
On Mon, 13 May 2024 10:42:26 GMT, Maurizio Cimadamore wrote: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting > the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibr

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v6]

2024-08-26 Thread Thomas Stuefe
On Fri, 23 Aug 2024 19:03:19 GMT, Leonid Mesnik wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix bit counts in GCForwarding > > test/hotspot/jtreg/runtime/cds/appcds/TestZGCWithCDS.java line 59: > >> 57: pu