Integrated: 8339120: Use more fine-granular gcc unused warnings

2024-08-29 Thread Magnus Ihse Bursie
On Tue, 27 Aug 2024 20:04:21 GMT, Magnus Ihse Bursie wrote: > Currently, we issue -Wno-unused for all files in gcc, which is a rather big > sledgehammer to get rid of some warnings that proliferate in a few areas of > the build. > > We should instead leave -Wunused turned on (as done by -Wall)

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

2024-08-29 Thread David Holmes
On Thu, 29 Aug 2024 05:53:25 GMT, Thomas Stuefe wrote: > Many of these translations seem awkward, since they convert to size_t only to > then convert back to int. Can you be more specific here please? I know the most awkward case is where we have an in/out parameter that brings in an int and s

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

2024-08-29 Thread Magnus Ihse Bursie
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

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

2024-08-29 Thread Thomas Stuefe
On Thu, 29 Aug 2024 07:59:47 GMT, David Holmes wrote: > > Many of these translations seem awkward, since they convert to size_t only > > to then convert back to int. > > Can you be more specific here please? Certainly. For example, this construct: size_t utf8_len = static_cast(length);

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

2024-08-29 Thread Thomas Stuefe
On Thu, 29 Aug 2024 02:45:53 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: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v6]

2024-08-29 Thread Stefan Karlsson
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: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v6]

2024-08-29 Thread Thomas Stuefe
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: 8338257: UTF8 lengths should be size_t not int [v7]

2024-08-29 Thread David Holmes
On Thu, 29 Aug 2024 08:52:03 GMT, Thomas Stuefe wrote: >> David Holmes 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 13 additional >> commits

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

2024-08-29 Thread David Holmes
On Thu, 29 Aug 2024 08:38:41 GMT, Thomas Stuefe wrote: > > > Many of these translations seem awkward, since they convert to size_t > > > only to then convert back to int. > > > > Can you be more specific here please? > > Certainly. For example, this construct: > > ``` > size_t utf8_len =

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

2024-08-29 Thread Thomas Stuefe
On Thu, 29 Aug 2024 12:30:26 GMT, David Holmes wrote: >> src/hotspot/share/classfile/javaClasses.hpp line 138: >> >>> 136: // Legacy variants that truncate the length if needed >>> 137: static intutf8_length_as_int(oop java_string); >>> 138: static intutf8_length_as_int(oop java_st

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

2024-08-29 Thread Thomas Stuefe
On Thu, 29 Aug 2024 12:37:47 GMT, David Holmes wrote: > > > > Many of these translations seem awkward, since they convert to size_t > > > > only to then convert back to int. > > > > > > > > > Can you be more specific here please? > > > > > > Certainly. For example, this construct: > > ``` >

RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Magnus Ihse Bursie
Currently, we issue -Wno-unused for all files in clang, which is a rather big sledgehammer to get rid of some warnings that proliferate in a few areas of the build. We should instead leave -Wunused turned on (as done by -Wall) and use a much more fine-grained approach to disabling specific warn

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

2024-08-29 Thread Jiangli Zhou
On Thu, 29 Aug 2024 08:26:16 GMT, Magnus Ihse Bursie wrote: > Okay. Unless I misunderstand something, there were no additional authors to > be credited for these two commits. That's correct for these. - PR Comment: https://git.openjdk.org/jdk/pull/20666#issuecomment-2317982354

Re: RFR: 8337563: NMT: rename MEMFLAGS to MemFlag

2024-08-29 Thread Gerard Ziemski
On Wed, 7 Aug 2024 17:13:06 GMT, Gerard Ziemski wrote: > Please review this cleanup, where we rename `MEMFLAGS` to `MemType`. > > `MEMFLAGS` implies that we can use more than one at the same time, but those > are exclusive values, so `MemType` is much more suitable name. > > There is a bunch o

Re: RFR: 8337563: NMT: rename MEMFLAGS to MemFlag

2024-08-29 Thread Gerard Ziemski
On Wed, 7 Aug 2024 17:13:06 GMT, Gerard Ziemski wrote: > Please review this cleanup, where we rename `MEMFLAGS` to `MemType`. > > `MEMFLAGS` implies that we can use more than one at the same time, but those > are exclusive values, so `MemType` is much more suitable name. > > There is a bunch o

Re: RFR: 8337563: NMT: rename MEMFLAGS to MemFlag

2024-08-29 Thread Thomas Stüfe
Note that “NMT::MemType” may lead to many uses of just “MemType” since a lot of the usage will happen inside a future NMT namespace and people will just drop the namespace. Will make it a bit more difficult to grep for, since you need to look for both variants. Adding an NMT namespace also opens

Re: RFR: 8337563: NMT: rename MEMFLAGS to MemFlag

2024-08-29 Thread Gerard Ziemski
On Wed, 7 Aug 2024 17:13:06 GMT, Gerard Ziemski wrote: > Please review this cleanup, where we rename `MEMFLAGS` to `MemType`. > > `MEMFLAGS` implies that we can use more than one at the same time, but those > are exclusive values, so `MemType` is much more suitable name. > > There is a bunch o

Splitting NMT memory counters into "live" and "flat" classes

2024-08-29 Thread Robert Toyonaga
Hi Everyone, What are your thoughts on splitting the NMT memory counter classes (both MemoryCounter and VirtualMemory) into "live" and "flat" classes? Currently, the counters are used for both recording live data and for storing static data when creating reports. However, after snapshotting the co

RFR: 8339112: Move JVM Klass flags out of AccessFlags

2024-08-29 Thread Coleen Phillimore
Move JVM implementation access flags that are not specified by the classfile format into Klass so we can shrink AccessFlags to u2 in a future change. Tested with tier1-7. NOTE: there are arm, ppc and s390 changes to this that are just a guess. Also, graal changes. - Commit messag

Re: RFR: 8337563: NMT: rename MEMFLAGS to MemFlag

2024-08-29 Thread Stefan Karlsson
On Wed, 7 Aug 2024 17:13:06 GMT, Gerard Ziemski wrote: > Please review this cleanup, where we rename `MEMFLAGS` to `MemType`. > > `MEMFLAGS` implies that we can use more than one at the same time, but those > are exclusive values, so `MemType` is much more suitable name. > > There is a bunch o

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags

2024-08-29 Thread Gilles Duboscq
On Mon, 26 Aug 2024 23:54:22 GMT, Coleen Phillimore wrote: > Move JVM implementation access flags that are not specified by the classfile > format into Klass so we can shrink AccessFlags to u2 in a future change. > > Tested with tier1-7. > > NOTE: there are arm, ppc and s390 changes to this th

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags

2024-08-29 Thread Yudi Zheng
On Thu, 29 Aug 2024 16:22:22 GMT, Gilles Duboscq wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to this

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags

2024-08-29 Thread John R Rose
On Mon, 26 Aug 2024 23:54:22 GMT, Coleen Phillimore wrote: > Move JVM implementation access flags that are not specified by the classfile > format into Klass so we can shrink AccessFlags to u2 in a future change. > > Tested with tier1-7. > > NOTE: there are arm, ppc and s390 changes to this th

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Erik Joelsson
On Thu, 29 Aug 2024 13:14:35 GMT, Magnus Ihse Bursie wrote: > Currently, we issue -Wno-unused for all files in clang, which is a rather big > sledgehammer to get rid of some warnings that proliferate in a few areas of > the build. > > We should instead leave -Wunused turned on (as done by -Wal

RFR: 8338934: vmTestbase/nsk/jvmti/*Field*Watch/TestDescription.java tests timeout intermittently

2024-08-29 Thread Leonid Mesnik
The tests time out because of dedlock of of the thread that is in transition and thread changing field watches. They use JvmtiThreadState_lock and JvmtiVTMSTransitionDisabler. The change field watch require disabler, but attempt to use it only when already locked in void JvmtiEventControlle

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

2024-08-29 Thread Alex Menkov
On Thu, 29 Aug 2024 02:39:12 GMT, Chris Plummer wrote: > Where do you see runtime flags in vmstructs? I do not see :) I thought about constants, but they are different - PR Comment: https://git.openjdk.org/jdk/pull/20684#issuecomment-2318569795

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Kim Barrett
On Thu, 29 Aug 2024 13:14:35 GMT, Magnus Ihse Bursie wrote: > Currently, we issue -Wno-unused for all files in clang, which is a rather big > sledgehammer to get rid of some warnings that proliferate in a few areas of > the build. > > We should instead leave -Wunused turned on (as done by -Wal

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Coleen Phillimore
> Move JVM implementation access flags that are not specified by the classfile > format into Klass so we can shrink AccessFlags to u2 in a future change. > > Tested with tier1-7. > > NOTE: there are arm, ppc and s390 changes to this that are just a guess. > Also, graal changes. Coleen Phillim

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Coleen Phillimore
On Thu, 29 Aug 2024 16:39:51 GMT, John R Rose wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add in graal flags and a comment. > > src/hotspot/share/oops/klass.hpp line 198: > >> 196: #endif >> 197: >> 198:

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Coleen Phillimore
On Thu, 29 Aug 2024 16:28:29 GMT, Yudi Zheng wrote: >> src/hotspot/share/jvmci/vmStructs_jvmci.cpp line 484: >> >>> 482: declare_constant(JVMCINMethodData::SPECULATION_LENGTH_BITS) >>>\ >>> 483: >>>\ >>>

Re: RFR: 8338934: vmTestbase/nsk/jvmti/*Field*Watch/TestDescription.java tests timeout intermittently

2024-08-29 Thread Serguei Spitsyn
On Thu, 29 Aug 2024 18:18:12 GMT, Leonid Mesnik wrote: > The tests time out because of dedlock of of the thread that is in transition > and thread changing field watches. > > They use JvmtiThreadState_lock and JvmtiVTMSTransitionDisabler. > > The change field watch require disabler, but atte

Re: RFR: 8337563: NMT: rename MEMFLAGS to MemFlag

2024-08-29 Thread Kim Barrett
On Thu, 29 Aug 2024 16:17:09 GMT, Stefan Karlsson wrote: >> Please review this cleanup, where we rename `MEMFLAGS` to `MemType`. >> >> `MEMFLAGS` implies that we can use more than one at the same time, but those >> are exclusive values, so `MemType` is much more suitable name. >> >> There is a

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

2024-08-29 Thread David Holmes
On Thu, 29 Aug 2024 13:06:19 GMT, Thomas Stuefe wrote: >>> > > Many of these translations seem awkward, since they convert to size_t >>> > > only to then convert back to int. >>> > >>> > Can you be more specific here please? >>> >>> Certainly. For example, this construct: >>> >>> ``` >>>

Integrated: 8338257: UTF8 lengths should be size_t not int

2024-08-29 Thread David Holmes
On Tue, 13 Aug 2024 02:20:41 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 unic

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Magnus Ihse Bursie
On Thu, 29 Aug 2024 18:44:22 GMT, Kim Barrett wrote: >> Currently, we issue -Wno-unused for all files in clang, which is a rather >> big sledgehammer to get rid of some warnings that proliferate in a few areas >> of the build. >> >> We should instead leave -Wunused turned on (as done by -Wall)

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

2024-08-29 Thread Chris Plummer
On Wed, 28 Aug 2024 23:30:33 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

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Matias Saavedra Silva
On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to t

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Dean Long
On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to t

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Dean Long
On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to t

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Dean Long
On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to t

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

2024-08-29 Thread Ioi Lam
On Thu, 29 Aug 2024 09:28:50 GMT, Stefan Karlsson wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix bit counts in GCForwarding > > src/hotspot/share/cds/archiveHeapWriter.cpp line 214: > >> 212: oopDesc::s

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Dean Long
On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to t

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Dean Long
On Thu, 29 Aug 2024 22:29:43 GMT, Dean Long wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add in graal flags and a comment. > > src/hotspot/share/ci/ciKlass.cpp line 231: > >> 229: // --

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Dean Long
On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to t

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Dean Long
On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to t

Re: RFR: 8337563: NMT: rename MEMFLAGS to MemFlag

2024-08-29 Thread Gerard Ziemski
On Wed, 7 Aug 2024 17:13:06 GMT, Gerard Ziemski wrote: > Please review this cleanup, where we rename `MEMFLAGS` to `MemType`. > > `MEMFLAGS` implies that we can use more than one at the same time, but those > are exclusive values, so `MemType` is much more suitable name. > > There is a bunch o

Re: RFR: 8337563: NMT: rename MEMFLAGS to MemFlag

2024-08-29 Thread Gerard Ziemski
On Thu, 29 Aug 2024 16:17:09 GMT, Stefan Karlsson wrote: >> Please review this cleanup, where we rename `MEMFLAGS` to `MemType`. >> >> `MEMFLAGS` implies that we can use more than one at the same time, but those >> are exclusive values, so `MemType` is much more suitable name. >> >> There is a

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

2024-08-29 Thread Alex Menkov
On Thu, 29 Aug 2024 20:51:45 GMT, Chris Plummer wrote: > We have one test that does a findsym of MaxJNILocalCapacity > (ClhsdbFindPC.java). I'm guessing this would fail if native lookups were > disabled. Note findsym was added less than 3 years ago. The test fails on isSharingEnabled, but I su

RFR: 8339289: Parameter size mismatch between client and VM sides of the Attach API - Windows

2024-08-29 Thread Alex Menkov
The fix improves Attch API protocol and implements updated protocol on windows; shared code is ready to implement updated protocol support on other platforms. More detailed explanations on the 1st comment. Testing: tier1,tier2,tier3,tier4,hs-tier5-svc manually tested backward compatibility (old

Re: RFR: 8339289: Parameter size mismatch between client and VM sides of the Attach API - Windows

2024-08-29 Thread Alex Menkov
On Fri, 30 Aug 2024 00:07:50 GMT, Alex Menkov wrote: > The fix improves Attch API protocol and implements updated protocol on > windows; shared code is ready to implement updated protocol support on other > platforms. > More detailed explanations on the 1st comment. > > Testing: tier1,tier2,ti

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Alan Bateman
On Thu, 29 Aug 2024 13:14:35 GMT, Magnus Ihse Bursie wrote: > Currently, we issue -Wno-unused for all files in clang, which is a rather big > sledgehammer to get rid of some warnings that proliferate in a few areas of > the build. > > We should instead leave -Wunused turned on (as done by -Wal

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags [v2]

2024-08-29 Thread Chris Plummer
On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore wrote: >> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to t

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Kim Barrett
On Fri, 30 Aug 2024 04:37:55 GMT, Alan Bateman wrote: > I wonder if there should be JBS issues for the specific source files/warnings > so they can be looked at more closely (or maybe you've looked at them all > already). Just wondering about the maintainability of DISABLED_WARNINGS_xxx > valu

Re: Splitting NMT memory counters into "live" and "flat" classes

2024-08-29 Thread Thomas Stüfe
My current thinking (which may change) is that for VirtualMemory, we may not need atomic counters at all since these counters are used in conjunction with modifying the not lock-free virtual memory tracker. For malloc counters, this makes sense, since all we do for malloc is to increase these coun