Withdrawn: 8327645: Serial heap dump should not consume double amount of disk space

2024-08-28 Thread duke
On Fri, 8 Mar 2024 01:07:50 GMT, Man Cao wrote: > Hi all, > > Could anyone review this fix to make serial heap dump only write to a single > file? > We highly appreciate the work in https://bugs.openjdk.org/browse/JDK-8306441. > However, many of our customers still need to use serial heap dump

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

2024-08-28 Thread Afshin Zafari
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-28 Thread Johan Sjölen
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: 8339120: Use more fine-granular gcc unused warnings

2024-08-28 Thread Magnus Ihse Bursie
On Wed, 28 Aug 2024 06:38:48 GMT, Kim Barrett wrote: > We should make a similar set of changes for clang, though doing that in a > separate proposal is good. Is there a JBS issue for that yet? Yes, we should. I am 80% done with that patch, but I have not yet opened a JBS ticket. Will do that n

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v2]

2024-08-28 Thread Magnus Ihse Bursie
> 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) and use a much > more fine-grained approach to disabling spe

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v2]

2024-08-28 Thread Magnus Ihse Bursie
On Wed, 28 Aug 2024 11:26:01 GMT, Magnus Ihse Bursie wrote: >> make/autoconf/flags-cflags.m4 line 239: >> >>> 237: # Additional warnings that are not activated by -Wall and -Wextra >>> 238: WARNINGS_ENABLE_ADDITIONAL="-Wpointer-arith -Wreturn-type >>> -Wsign-compare \ >>> 239:

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

2024-08-28 Thread Coleen Phillimore
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: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-28 Thread Magnus Ihse Bursie
On Tue, 27 Aug 2024 23:15:03 GMT, Jiangli Zhou wrote: >> And the discussion whether the checks are made "dynamically" or "statically" >> is too simplified to be really helpful. >> >> Currently, we compile two sets of all object files, with slightly different >> compiler arguments, one for dyna

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v3]

2024-08-28 Thread Magnus Ihse Bursie
> 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) and use a much > more fine-grained approach to disabling spe

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v3]

2024-08-28 Thread Kim Barrett
On Wed, 28 Aug 2024 13:02:55 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 -

Re: RFR: 8336881: [Linux] Support for hierarchical limits for Metrics [v4]

2024-08-28 Thread Severin Gehwolf
> Please review this fix for cgroups-based metrics reporting in the > `jdk.internal.platform` package. This fix is supposed to address wrong > reporting of certain limits if the limits aren't set at the leaf nodes. > > For example, on cg v2, the memory limit interface file is `memory.max`. > Co

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

2024-08-28 Thread Erik Joelsson
On Mon, 26 Aug 2024 02:07:39 GMT, David Holmes wrote: > I understand the cost overhead experienced by any individual Java run may be > lost in the noise, but it still impacts every single Java run just to save > some time/resources for the handful of builders of statically linked VMs. I > am n

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v4]

2024-08-28 Thread Magnus Ihse Bursie
> 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) and use a much > more fine-grained approach to disabling spe

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v5]

2024-08-28 Thread Magnus Ihse Bursie
> 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) and use a much > more fine-grained approach to disabling spe

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v3]

2024-08-28 Thread Magnus Ihse Bursie
On Wed, 28 Aug 2024 13:35:19 GMT, Kim Barrett wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix aarch54 > > make/modules/java.desktop/lib/ClientLibraries.gmk line 284: > >> 282: >> 283: ifeq ($(USE_EXTERN

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v5]

2024-08-28 Thread Magnus Ihse Bursie
On Wed, 28 Aug 2024 12:29:36 GMT, Magnus Ihse Bursie wrote: >> Good point, I'll try that. > > It turned out to be sort-of okay-ish. I explicitly listed like 6 or so > per-file exclusions in Hotspot (even though my normal cutoff for just setting > a component-wide exclude is 3-4) since it seems

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v6]

2024-08-28 Thread Magnus Ihse Bursie
> 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) and use a much > more fine-grained approach to disabling spe

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v6]

2024-08-28 Thread Kim Barrett
On Wed, 28 Aug 2024 15:15:03 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 -

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v6]

2024-08-28 Thread Julian Waters
On Wed, 28 Aug 2024 15:17:52 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 -

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

2024-08-28 Thread Gerard Ziemski
On Thu, 15 Aug 2024 07:59:21 GMT, Kim Barrett 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 bun

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

2024-08-28 Thread Daniel D . Daugherty
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: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-28 Thread Jiangli Zhou
On Tue, 27 Aug 2024 23:15:03 GMT, Jiangli Zhou wrote: >> And the discussion whether the checks are made "dynamically" or "statically" >> is too simplified to be really helpful. >> >> Currently, we compile two sets of all object files, with slightly different >> compiler arguments, one for dyna

RFR: 8338851: Hoist os::Posix::realpath() to os::realpath() and implement on Windows

2024-08-28 Thread Simon Tooke
This PR changes the status of realpath() from a Posix-specific API to a globally available API, i.e. adding it to the "Hotspot Porting API". Code would refer to os::realpath() instead of os::Posix::realpath(). This requires the addition of a stub routine in os_posix.cpp and a Windows implement

Re: RFR: 8339120: Use more fine-granular gcc unused warnings [v6]

2024-08-28 Thread Erik Joelsson
On Wed, 28 Aug 2024 15:17:52 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 -

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

2024-08-28 Thread Serguei Spitsyn
On Wed, 28 Aug 2024 03:42:27 GMT, Chris Plummer wrote: > I'm not sure why this is failing. Based on the existing code and comments, it > seems at some point SA worked without relying on the windbg native symbol > support. Code like isSharingEnabled() probably got added afterwards and was > nev

RFR: 8338708: Don't create/destroy debug agent cmdQueueLock for each connection.

2024-08-28 Thread Chris Plummer
Only allocate the cmdQueueLock once rather than allocate each time there is a new connection (and destroy when the connection is terminated). Currently each time there is a new debug agent connection established, the cmdQueueLock is allocated. It is then destroyed when the connection is dropped,

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

2024-08-28 Thread Serguei Spitsyn
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

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

2024-08-28 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

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

2024-08-28 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: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected [v2]

2024-08-28 Thread Alex Menkov
On Wed, 28 Aug 2024 03:42:27 GMT, Chris Plummer wrote: > ``` > public boolean isSharingEnabled() { > if (sharingEnabled == null) { > Address address = VM.getVM().getDebugger().lookup(null, > "UseSharedSpaces"); > if (address == null && getOS().equals("win32")) { >

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

2024-08-28 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: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected [v3]

2024-08-28 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: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected [v2]

2024-08-28 Thread Chris Plummer
On Wed, 28 Aug 2024 23:47:05 GMT, Alex Menkov wrote: > Update: usually constants are available for SA by using VMStruct, I'm not > sure why "UseSharedSpaces" is exported this way Probably the author just didn't know about the VMStruct approach. - PR Comment: https://git.openjdk.or

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

2024-08-28 Thread Alex Menkov
On Wed, 28 Aug 2024 23:58:50 GMT, Chris Plummer wrote: > What would happen if it was not extern "C". Would the windbg lookup succeed > in that case? without extern "C" the variable is exported as "?UseSharedSpaces@@3EA". So it wouldn't work with DLL lookup neither windbg. - PR Co

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

2024-08-28 Thread Alex Menkov
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: 8311993: Test serviceability/sa/UniqueVtableTest.java failed: duplicate vtables detected [v3]

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

2024-08-28 Thread David Holmes
> 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 unicode character, but six byte characters are stored as UTF

Re: RFR: 8338851: Hoist os::Posix::realpath() to os::realpath() and implement on Windows

2024-08-28 Thread David Holmes
On Thu, 22 Aug 2024 18:36:39 GMT, Simon Tooke wrote: > This PR changes the status of realpath() from a Posix-specific API to a > globally available API, i.e. adding it to the "Hotspot Porting API". Code > would refer to os::realpath() instead of os::Posix::realpath(). > > This requires the ad

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

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

2024-08-28 Thread Thomas Stuefe
On Thu, 29 Aug 2024 05:52:26 GMT, Thomas Stuefe wrote: > Many of these translations seem awkward, since they convert to size_t only to > then convert back to int. > > Proposal: I undestand you need to find a good point to tourniquet off the > int->size_t conversion to minimize the translations