Re: RFR: 8189685: need PerfMemory class update and a volatile_static_field support in VMStructs [v4]

2023-08-25 Thread Serguei Spitsyn
On Wed, 23 Aug 2023 18:26:03 GMT, Chris Plummer wrote: >> During [JDK-8151815](https://bugs.openjdk.org/browse/JDK-8151815) it was >> noted that the PerfMemory _initialized and _destroyed fields should be >> volatile, but VMStructs didn't have the needed support for doing that, so it >> was le

Re: RFR: 8237542: JMapHeapConfigTest.java doesn't work with negative jlong values

2023-08-25 Thread Chris Plummer
On Mon, 21 Aug 2023 19:25:25 GMT, Chris Plummer wrote: > The test tries to match up various GC -XX:+PrintFlagsFinal values with the > output of jhsdb -jmap --pid --heap. With ZGC, MaxNewSize set to > (size_t)-1, but PrintFlagsFinal prints it as an unsigned long: > > size_t MaxNewSize = 18

Integrated: 8237542: JMapHeapConfigTest.java doesn't work with negative jlong values

2023-08-25 Thread Chris Plummer
On Mon, 21 Aug 2023 19:25:25 GMT, Chris Plummer wrote: > The test tries to match up various GC -XX:+PrintFlagsFinal values with the > output of jhsdb -jmap --pid --heap. With ZGC, MaxNewSize set to > (size_t)-1, but PrintFlagsFinal prints it as an unsigned long: > > size_t MaxNewSize = 18

Re: RFR: 8189685: need PerfMemory class update and a volatile_static_field support in VMStructs [v4]

2023-08-25 Thread David Holmes
On Wed, 23 Aug 2023 18:26:03 GMT, Chris Plummer wrote: >> During [JDK-8151815](https://bugs.openjdk.org/browse/JDK-8151815) it was >> noted that the PerfMemory _initialized and _destroyed fields should be >> volatile, but VMStructs didn't have the needed support for doing that, so it >> was le

Integrated: 8314550: [macosx-aarch64] serviceability/sa/TestJmapCore.java fails with "sun.jvm.hotspot.debugger.UnmappedAddressException: 801000800"

2023-08-25 Thread Chris Plummer
On Thu, 24 Aug 2023 23:31:56 GMT, Chris Plummer wrote: > On some macosx-aarch64 systems, not all mapped pages are dumped to the core > file. This first turned up with > [JDK-8293563](https://bugs.openjdk.org/browse/JDK-8293563) where large parts > of the ZGC heap would not be in the core file,

Re: RFR: 8314550: [macosx-aarch64] serviceability/sa/TestJmapCore.java fails with "sun.jvm.hotspot.debugger.UnmappedAddressException: 801000800" [v2]

2023-08-25 Thread Chris Plummer
On Fri, 25 Aug 2023 17:21:48 GMT, Chris Plummer wrote: >> On some macosx-aarch64 systems, not all mapped pages are dumped to the core >> file. This first turned up with >> [JDK-8293563](https://bugs.openjdk.org/browse/JDK-8293563) where large parts >> of the ZGC heap would not be in the core f

Re: RFR: 8189685: need PerfMemory class update and a volatile_static_field support in VMStructs [v3]

2023-08-25 Thread Chris Plummer
On Wed, 23 Aug 2023 22:40:23 GMT, David Holmes wrote: >> This change wasn't in the original patch, but the >> `GENERATE_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY` change above it was. I found >> it when I noticed the use of `GENERATE_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY` >> and thought it should be

Re: RFR: 8314550: [macosx-aarch64] serviceability/sa/TestJmapCore.java fails with "sun.jvm.hotspot.debugger.UnmappedAddressException: 801000800" [v2]

2023-08-25 Thread Chris Plummer
> On some macosx-aarch64 systems, not all mapped pages are dumped to the core > file. This first turned up with > [JDK-8293563](https://bugs.openjdk.org/browse/JDK-8293563) where large parts > of the ZGC heap would not be in the core file, leading to various SA address > errors. For JDK-8293563

Integrated: 8314333: Update com/sun/jdi/ProcessAttachTest.java to use ProcessTools.createTestJvm(..)

2023-08-25 Thread Leonid Mesnik
On Wed, 23 Aug 2023 01:16:54 GMT, Leonid Mesnik wrote: > Test updated to run debugee VM with correct options. This pull request has now been integrated. Changeset: 7342f5a0 Author:Leonid Mesnik URL: https://git.openjdk.org/jdk/commit/7342f5a0337df88b6787c4c2b53c8007667b6636 Stats:

Re: RFR: 8314940: Use of NIO in JDKs Metrics implementation causes issues in GraalVM

2023-08-25 Thread Severin Gehwolf
On Fri, 25 Aug 2023 10:04:28 GMT, Alan Bateman wrote: > In this case, it seems a bit fragile to do it in CgroupUtil as it should be > allowed to use any of the file system APIs to access cgroups or proc files. In theory, yes. It should be able to use any file system APIs. Practically, it doesn

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method [v2]

2023-08-25 Thread Stefan Karlsson
On Fri, 25 Aug 2023 09:45:09 GMT, Johan Sjölen wrote: >> This code looks similar to a capturing lambda. Would an alternative be to >> use that instead and let the calling code be changed to: >> >> >> int i = lgrp_spaces()->find([&](LGRPSpace* space) { >> return space->lgrp_id() == lgrp_i

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method [v2]

2023-08-25 Thread Afshin Zafari
> The `find` method now is > ```C++ > template > int find(T* token, bool f(T*, E)) const { > ... > > Any other functions which use this are also changed. > Local linux-x64-debug hotspot:tier1 passed. Mach5 tier1 build on linux and > Windows passed. Afshin Zafari has updated the pull request inc

Re: RFR: 8314940: Use of NIO in JDKs Metrics implementation causes issues in GraalVM

2023-08-25 Thread Alan Bateman
On Thu, 24 Aug 2023 14:39:18 GMT, Severin Gehwolf wrote: > I've now realized that the bug had an incorrect statement in the description. > The cycle happens due to the `Runtime.getRuntime().maxMemory()` > implementation in GraalVM to use JDK `Metrics`, since the `ByteBuffer` [code > relies on

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method

2023-08-25 Thread Johan Sjölen
On Fri, 25 Aug 2023 08:55:29 GMT, Stefan Karlsson wrote: >> It's arbitrary and chosen by the caller through `f`, so I can't say :-). The >> best use case we have now is when you only have an `int` which uniquely >> describes an `LGRPSpace`. > > This code looks similar to a capturing lambda. Wou

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method

2023-08-25 Thread Stefan Karlsson
On Fri, 25 Aug 2023 08:31:58 GMT, Johan Sjölen wrote: >> src/hotspot/share/utilities/growableArray.hpp line 213: >> >>> 211: >>> 212: template >>> 213: int find(T* token, bool f(T*, E)) const { >> >> Pardon my ignorance here, but what is the type relationship between T and E? > > It's arb

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method

2023-08-25 Thread Johan Sjölen
On Fri, 25 Aug 2023 02:41:19 GMT, David Holmes wrote: >> The `find` method now is >> ```C++ >> template >> int find(T* token, bool f(T*, E)) const { >> ... >> >> Any other functions which use this are also changed. >> Local linux-x64-debug hotspot:tier1 passed. Mach5 tier1 build on linux and >

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method

2023-08-25 Thread Afshin Zafari
On Thu, 24 Aug 2023 16:38:21 GMT, Johan Sjölen wrote: >> src/hotspot/share/prims/jvmtiImpl.cpp line 126: >> >>> 124: assert(e2 != nullptr, "e2 != nullptr"); >>> 125: >>> 126: return v->equals(e2); >> >> Please rename the `v` parameter to `e1` > > And since you're here: Could you change the

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method

2023-08-25 Thread Afshin Zafari
On Thu, 24 Aug 2023 16:38:55 GMT, Johan Sjölen wrote: >> The `find` method now is >> ```C++ >> template >> int find(T* token, bool f(T*, E)) const { >> ... >> >> Any other functions which use this are also changed. >> Local linux-x64-debug hotspot:tier1 passed. Mach5 tier1 build on linux and >