Integrated: 8338139: {ClassLoading,Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Stefan Karlsson
On Mon, 19 Aug 2024 15:39:02 GMT, Stefan Karlsson wrote: > The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods to > control verbose mode and `isVerbose` methods to query it. Some JCK tests > expect `setVerbose(false)` to disable verbose mode and, subsequently, > `isVerbo

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Stefan Karlsson
On Mon, 19 Aug 2024 22:22:26 GMT, Daniel D. Daugherty wrote: >> Wait. This is not what the implementation does. If you specify -Xlog:gc and >> -Xlog:gc+init (using a real tag instead of foo), `get_verbose` will return >> true. It only cares about the tag set that is exactly 'gc' and ignores th

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Stefan Karlsson
On Mon, 19 Aug 2024 19:56:26 GMT, Stefan Karlsson wrote: >> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods >> to control verbose mode and `isVerbose` methods to query it. Some JCK tests >> expect `setVerbose(false)` to disable verbose mode and, subsequently, >> `isV

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

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

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

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

2024-08-19 Thread David Holmes
On Tue, 20 Aug 2024 03:16:29 GMT, Dean Long wrote: >> David Holmes has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add missing cast for signed-to-unsigned converion. > > src/hotspot/share/classfile/javaClasses.cpp line 695: > >> 693:

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

2024-08-19 Thread Dean Long
On Mon, 19 Aug 2024 23:19: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: 8205957: setfldw001/TestDescription.java fails with bad field value

2024-08-19 Thread Serguei Spitsyn
On Wed, 14 Aug 2024 19:34:26 GMT, Leonid Mesnik wrote: > The summary of the problem. Test is intermittently failing because can't get > expected field watch event. > The test is failing to get event in the 'setfmodw001b' thread with Xcomp only. > I verified that frame with the method 'run' of se

Re: RFR: 8205957: setfldw001/TestDescription.java fails with bad field value

2024-08-19 Thread Serguei Spitsyn
On Tue, 20 Aug 2024 02:15:18 GMT, Dean Long wrote: >> src/hotspot/share/runtime/javaCalls.cpp line 358: >> >>> 356: #endif >>> 357: >>> 358: CompilationPolicy::compile_if_required(method, CHECK); >> >> I'd like to understand what is going to happen at the line 358. Are we going >> to compil

Re: RFR: 8205957: setfldw001/TestDescription.java fails with bad field value

2024-08-19 Thread Dean Long
On Mon, 19 Aug 2024 23:46:28 GMT, Serguei Spitsyn wrote: >> The summary of the problem. Test is intermittently failing because can't get >> expected field watch event. >> The test is failing to get event in the 'setfmodw001b' thread with Xcomp >> only. >> I verified that frame with the method '

Re: RFR: 8205957: setfldw001/TestDescription.java fails with bad field value

2024-08-19 Thread Serguei Spitsyn
On Wed, 14 Aug 2024 19:34:26 GMT, Leonid Mesnik wrote: > The summary of the problem. Test is intermittently failing because can't get > expected field watch event. > The test is failing to get event in the 'setfmodw001b' thread with Xcomp only. > I verified that frame with the method 'run' of se

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

2024-08-19 Thread David Holmes
On Thu, 15 Aug 2024 20:43:51 GMT, Coleen Phillimore wrote: > Did you try to compile this with -Wconversion (not -Wsign-conversion) without > -Werror? I hadn't but will do so ... > src/hotspot/share/classfile/javaClasses.cpp line 586: > >> 584: ResourceMark rm; >> 585: jbyte* position

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

2024-08-19 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: 8338257: UTF8 lengths should be size_t not int

2024-08-19 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: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Daniel D . Daugherty
On Mon, 19 Aug 2024 19:56:26 GMT, Stefan Karlsson wrote: >> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods >> to control verbose mode and `isVerbose` methods to query it. Some JCK tests >> expect `setVerbose(false)` to disable verbose mode and, subsequently, >> `isV

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Daniel D . Daugherty
On Mon, 19 Aug 2024 19:56:26 GMT, Stefan Karlsson wrote: >> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods >> to control verbose mode and `isVerbose` methods to query it. Some JCK tests >> expect `setVerbose(false)` to disable verbose mode and, subsequently, >> `isV

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Daniel D . Daugherty
On Mon, 19 Aug 2024 19:52:02 GMT, Stefan Karlsson wrote: >> Update: Looks like the CSR says that's exactly what we want. > > Wait. This is not what the implementation does. If you specify -Xlog:gc and > -Xlog:gc+init (using a real tag instead of foo), `get_verbose` will return > true. It only c

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread David Holmes
On Mon, 19 Aug 2024 19:56:26 GMT, Stefan Karlsson wrote: >> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods >> to control verbose mode and `isVerbose` methods to query it. Some JCK tests >> expect `setVerbose(false)` to disable verbose mode and, subsequently, >> `isV

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Mark Reinhold
On Mon, 19 Aug 2024 19:43:33 GMT, Stefan Karlsson wrote: >> test/jdk/java/lang/management/MemoryMXBean/TestVerboseMemory.java line 50: >> >>> 48: */ >>> 49: >>> 50: import java.lang.management.*; >> >> I thought we tried to avoid wild-card imports. > > Updated. > I thought we tried to avoid

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Leonid Mesnik
On Mon, 19 Aug 2024 19:56:26 GMT, Stefan Karlsson wrote: >> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods >> to control verbose mode and `isVerbose` methods to query it. Some JCK tests >> expect `setVerbose(false)` to disable verbose mode and, subsequently, >> `isV

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Stefan Karlsson
On Mon, 19 Aug 2024 16:43:59 GMT, Daniel D. Daugherty wrote: >> src/hotspot/share/services/memoryService.cpp line 218: >> >>> 216: >>> 217: return false; >>> 218: } >> >> If we have `-Xlog:gc` and `-Xlog:gc+foo` set I think this version of >> `MemoryService::get_verbose()` will return `fals

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods [v2]

2024-08-19 Thread Stefan Karlsson
> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods to > control verbose mode and `isVerbose` methods to query it. Some JCK tests > expect `setVerbose(false)` to disable verbose mode and, subsequently, > `isVerbose()` to return false. However, if logging to a file is ena

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Stefan Karlsson
On Mon, 19 Aug 2024 16:40:55 GMT, Daniel D. Daugherty wrote: >> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods >> to control verbose mode and `isVerbose` methods to query it. Some JCK tests >> expect `setVerbose(false)` to disable verbose mode and, subsequently, >>

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Stefan Karlsson
On Mon, 19 Aug 2024 16:38:24 GMT, Daniel D. Daugherty wrote: >> test/jdk/java/lang/management/ClassLoadingMXBean/TestVerboseClassLoading.java >> line 36: >> >>> 34: * @run main/othervm -Xlog:class+load=trace TestVerboseClassLoading >>> false >>> 35: * @run main/othervm -Xlog:class+load=debu

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Stefan Karlsson
On Mon, 19 Aug 2024 16:26:02 GMT, Leonid Mesnik wrote: >> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods >> to control verbose mode and `isVerbose` methods to query it. Some JCK tests >> expect `setVerbose(false)` to disable verbose mode and, subsequently, >> `isVer

Re: RFR: 8338482: com/sun/jdi/ThreadMemoryLeakTest.java requires that compressed oops are enabled

2024-08-19 Thread Alex Menkov
On Fri, 16 Aug 2024 05:41:01 GMT, Chris Plummer wrote: > com/sun/jdi/ThreadMemoryLeakTest.java purposely runs with a small heap so it > is easier to detect a memory leak with an OOME. Running without compressed > oops uses more memory leading to an OOME even though there is no leak. We > shoul

Re: RFR: 8337276: jcmd man page update for PID in output filenames

2024-08-19 Thread Kevin Walls
On Wed, 14 Aug 2024 14:59:33 GMT, Erik Gahlin wrote: >> JFR.dump, JFR.start, and JFR.stop are written in Java and have separated >> from the Hotspot dcmd infrastructure. For example, this is how filename >> expansion is handled by JFR.start (and -XX:StartFlightRecording): >> >> String path

Re: RFR: 8334492: DiagnosticCommands (jcmd) should accept %p in output filenames and substitute PID [v18]

2024-08-19 Thread Kevin Walls
On Tue, 30 Jul 2024 14:33:10 GMT, Sonia Zaldana Calles wrote: >> Hi all, >> >> This PR addresses [8334492](https://bugs.openjdk.org/browse/JDK-8334492) >> enabling jcmd diagnostic commands that issue an output file to accept the >> `%p` pattern in the file name and substitute it for the PID.

Re: RFR: 8338482: com/sun/jdi/ThreadMemoryLeakTest.java requires that compressed oops are enabled

2024-08-19 Thread Chris Plummer
On Fri, 16 Aug 2024 05:41:01 GMT, Chris Plummer wrote: > com/sun/jdi/ThreadMemoryLeakTest.java purposely runs with a small heap so it > is easier to detect a memory leak with an OOME. Running without compressed > oops uses more memory leading to an OOME even though there is no leak. We > shoul

RFR: 8319873: Add windows implementation for jcmd System.map and System.dump_map

2024-08-19 Thread Simon Tooke
This is a port of [JDK-8318636](https://github.com/openjdk/jdk/pull/16301) to Windows. System.map and System.dump_map are implemented using the Windows API and provide roughly the same information in the same format. Most of the heavy lifting was implemented by @tstuefe in #16301 - this PR add

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Daniel D . Daugherty
On Mon, 19 Aug 2024 16:30:09 GMT, Daniel D. Daugherty wrote: >> The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods >> to control verbose mode and `isVerbose` methods to query it. Some JCK tests >> expect `setVerbose(false)` to disable verbose mode and, subsequently, >>

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Daniel D . Daugherty
On Mon, 19 Aug 2024 15:39:02 GMT, Stefan Karlsson wrote: > The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods to > control verbose mode and `isVerbose` methods to query it. Some JCK tests > expect `setVerbose(false)` to disable verbose mode and, subsequently, > `isVerbo

Re: RFR: 8338139: {ClassLoading, Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Leonid Mesnik
On Mon, 19 Aug 2024 15:39:02 GMT, Stefan Karlsson wrote: > The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods to > control verbose mode and `isVerbose` methods to query it. Some JCK tests > expect `setVerbose(false)` to disable verbose mode and, subsequently, > `isVerbo

RFR: 8338139: {ClassLoading,Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Stefan Karlsson
The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods to control verbose mode and `isVerbose` methods to query it. Some JCK tests expect `setVerbose(false)` to disable verbose mode and, subsequently, `isVerbose()` to return false. However, if logging to a file is enabled by

Re: RFR: 8334492: DiagnosticCommands (jcmd) should accept %p in output filenames and substitute PID [v18]

2024-08-19 Thread Kevin Walls
On Fri, 16 Aug 2024 23:05:16 GMT, Erik Gahlin wrote: >> I think the only reason for the change from STRING to FILE was to support >> shared code (not per dcmd code) doing the %p expansion. See the following >> change: >> >> https://github.com/openjdk/jdk/pull/20198/files#diff-4f9f273d22b9cf7af

Withdrawn: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis

2024-08-19 Thread duke
On Tue, 23 Apr 2024 13:56:32 GMT, Julian Waters wrote: > WIP > > This changeset contains hsdis for Windows/gcc Port. It supports both the > binutils and capstone backends, though the LLVM backend is left out due to > compatibility issues encountered during the build. Currently, which gcc > di