Re: RFR: 8289400: Improve com/sun/jdi/TestScaffold error reporting [v2]

2022-09-01 Thread Chris Plummer
On Fri, 2 Sep 2022 05:40:38 GMT, Alan Bateman wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add curly braces. > > test/jdk/com/sun/jdi/TestScaffold.java line 459: > >> 457: for (StackTraceElement traceE

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Ioi Lam
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8289400: Improve com/sun/jdi/TestScaffold error reporting [v2]

2022-09-01 Thread Alan Bateman
On Thu, 1 Sep 2022 21:11:09 GMT, Chris Plummer wrote: >> com/sun/jdi tests report errors by calling TestScaffold.failure(msg), which >> prints the failure message and sets the testFailed flag. At some later point >> the failure is detected and an exception is thrown. The end result is the >> e

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread David Holmes
On Thu, 1 Sep 2022 12:29:41 GMT, Coleen Phillimore wrote: >> Since I know what this table does, either comment is fine if it helps >> someone understand it. >> The "map each PD to itself" is pretty odd to me too. How about collect >> each PD for fast lookup in a hashtable? The code says how

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread David Holmes
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v3]

2022-09-01 Thread Chris Plummer
> While dumping all registers (and doing a findpc on each), the following > exception occurred for r8: > > > r8: 0x00750e4fdffc > Error: java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds for > length 4096 > java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds

Integrated: 8293010: JDI ObjectReference/referringObjects/referringObjects001 fails: assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking

2022-09-01 Thread Serguei Spitsyn
On Wed, 31 Aug 2022 21:47:05 GMT, Serguei Spitsyn wrote: > The problem is that the following assert in the JvmtiExport::post_object_free > is wrong: > ` assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE), "checking");` > > Even though the condition was checked before, it can be changed later as i

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v2]

2022-09-01 Thread Serguei Spitsyn
On Thu, 1 Sep 2022 17:20:33 GMT, Chris Plummer wrote: >> While dumping all registers (and doing a findpc on each), the following >> exception occurred for r8: >> >> >> r8: 0x00750e4fdffc >> Error: java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds >> for length 4096 >> ja

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

2022-09-01 Thread Dean Long
On Fri, 2 Sep 2022 00:04:17 GMT, John R Rose wrote: >> Refactor code from inside of CompressedStream into its own unit. >> >> This code is likely to be used in future refactorings, such as JDK-8292818 >> (replace 96-bit representation for field metadata with variable-sized >> streams). >> >>

Re: RFR: 8293010: JDI ObjectReference/referringObjects/referringObjects001 fails assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking

2022-09-01 Thread Serguei Spitsyn
On Wed, 31 Aug 2022 21:47:05 GMT, Serguei Spitsyn wrote: > The problem is that the following assert in the JvmtiExport::post_object_free > is wrong: > ` assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE), "checking");` > > Even though the condition was checked before, it can be changed later as i

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

2022-09-01 Thread John R Rose
On Fri, 2 Sep 2022 00:04:17 GMT, John R Rose wrote: >> Refactor code from inside of CompressedStream into its own unit. >> >> This code is likely to be used in future refactorings, such as JDK-8292818 >> (replace 96-bit representation for field metadata with variable-sized >> streams). >> >>

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

2022-09-01 Thread John R Rose
> Refactor code from inside of CompressedStream into its own unit. > > This code is likely to be used in future refactorings, such as JDK-8292818 > (replace 96-bit representation for field metadata with variable-sized > streams). > > Add gtests. John R Rose has updated the pull request with a

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file

2022-09-01 Thread John R Rose
On Mon, 29 Aug 2022 18:20:42 GMT, John R Rose wrote: > Refactor code from inside of CompressedStream into its own unit. > > This code is likely to be used in future refactorings, such as JDK-8292818 > (replace 96-bit representation for field metadata with variable-sized > streams). > > Add gt

RFR: 8292758: put support for UNSIGNED5 format into its own header file

2022-09-01 Thread John R Rose
Refactor code from inside of CompressedStream into its own unit. This code is likely to be used in future refactorings, such as JDK-8292818 (replace 96-bit representation for field metadata with variable-sized streams). Add gtests. - Commit messages: - 8292758: put support for UNS

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v2]

2022-09-01 Thread Chris Plummer
On Thu, 1 Sep 2022 22:05:02 GMT, Alex Menkov wrote: > Your code works only for the exact case - address of 64bit value points to > the last 32bit of the page. That's the only case we need to worry about. Any others would have already failed the alignment check. - PR: https://git.o

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v2]

2022-09-01 Thread Alex Menkov
On Thu, 1 Sep 2022 21:12:08 GMT, Chris Plummer wrote: >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java >> line 242: >> >>> 240: private boolean canUsePageCacheFor64bitRead(long address) { >>> 241: long pageMask = ~(pageSize - 1); >>> 242: if ((address

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v2]

2022-09-01 Thread Alex Menkov
On Thu, 1 Sep 2022 17:20:33 GMT, Chris Plummer wrote: >> While dumping all registers (and doing a findpc on each), the following >> exception occurred for r8: >> >> >> r8: 0x00750e4fdffc >> Error: java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds >> for length 4096 >> ja

Re: RFR: 8289400: Improve com/sun/jdi/TestScaffold error reporting [v2]

2022-09-01 Thread Alex Menkov
On Thu, 1 Sep 2022 21:11:09 GMT, Chris Plummer wrote: >> com/sun/jdi tests report errors by calling TestScaffold.failure(msg), which >> prints the failure message and sets the testFailed flag. At some later point >> the failure is detected and an exception is thrown. The end result is the >> e

Integrated: JDK-8292066 Convert TestInputArgument.sh and TestSystemLoadAvg.sh to java version

2022-09-01 Thread Bill Huang
On Thu, 11 Aug 2022 21:12:08 GMT, Bill Huang wrote: > This task converts 2 shell tests to java version. > test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh > test/java/lang/management/RuntimeMXBean/TestInputArgument.sh This pull request has now been integrated. Changeset: 0

Re: RFR: 8293010: JDI ObjectReference/referringObjects/referringObjects001 fails assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking

2022-09-01 Thread Leonid Mesnik
On Wed, 31 Aug 2022 21:47:05 GMT, Serguei Spitsyn wrote: > The problem is that the following assert in the JvmtiExport::post_object_free > is wrong: > ` assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE), "checking");` > > Even though the condition was checked before, it can be changed later as i

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v2]

2022-09-01 Thread Chris Plummer
On Thu, 1 Sep 2022 20:10:45 GMT, Alex Menkov wrote: >> Chris Plummer has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains four commits: >> >> - Merge >> - Fix jcheck error >> - Undo some temp test changes. >> - Fix 64-bit alignment

Re: RFR: 8283627: Outdated comment in MachineDescriptionTwosComplement.isLP64 [v2]

2022-09-01 Thread Leonid Mesnik
On Thu, 1 Sep 2022 15:07:03 GMT, Daniel Skantz wrote: >> Update MachineDescriptionTwosComplement.java comment to indicate that LP64 >> machines are no longer uncommon. > > Daniel Skantz has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8

Re: RFR: 8289400: Improve com/sun/jdi/TestScaffold error reporting [v2]

2022-09-01 Thread Chris Plummer
On Thu, 1 Sep 2022 20:15:04 GMT, Alex Menkov wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add curly braces. > > test/jdk/com/sun/jdi/TestScaffold.java line 457: > >> 455: println(str); >> 456:

Re: RFR: 8289400: Improve com/sun/jdi/TestScaffold error reporting [v2]

2022-09-01 Thread Chris Plummer
> com/sun/jdi tests report errors by calling TestScaffold.failure(msg), which > prints the failure message and sets the testFailed flag. At some later point > the failure is detected and an exception is thrown. The end result is the > exception has just has a vanilla message that says something

Re: RFR: JDK-8292066 Convert TestInputArgument.sh and TestSystemLoadAvg.sh to java version [v3]

2022-09-01 Thread Alex Menkov
On Tue, 30 Aug 2022 22:39:06 GMT, Bill Huang wrote: >> This task converts 2 shell tests to java version. >> test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh >> test/java/lang/management/RuntimeMXBean/TestInputArgument.sh > > Bill Huang has updated the pull request incrementa

Re: RFR: 8289400: Improve com/sun/jdi/TestScaffold error reporting

2022-09-01 Thread Alex Menkov
On Thu, 1 Sep 2022 19:09:25 GMT, Chris Plummer wrote: > com/sun/jdi tests report errors by calling TestScaffold.failure(msg), which > prints the failure message and sets the testFailed flag. At some later point > the failure is detected and an exception is thrown. The end result is the > excep

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v2]

2022-09-01 Thread Alex Menkov
On Thu, 1 Sep 2022 17:20:33 GMT, Chris Plummer wrote: >> While dumping all registers (and doing a findpc on each), the following >> exception occurred for r8: >> >> >> r8: 0x00750e4fdffc >> Error: java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds >> for length 4096 >> ja

Re: RFR: 8293010: JDI ObjectReference/referringObjects/referringObjects001 fails assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking

2022-09-01 Thread Zhengyu Gu
On Wed, 31 Aug 2022 21:47:05 GMT, Serguei Spitsyn wrote: > The problem is that the following assert in the JvmtiExport::post_object_free > is wrong: > ` assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE), "checking");` > > Even though the condition was checked before, it can be changed later as i

Re: RFR: 8293010: JDI ObjectReference/referringObjects/referringObjects001 fails assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking

2022-09-01 Thread Chris Plummer
On Wed, 31 Aug 2022 21:47:05 GMT, Serguei Spitsyn wrote: > The problem is that the following assert in the JvmtiExport::post_object_free > is wrong: > ` assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE), "checking");` > > Even though the condition was checked before, it can be changed later as i

Re: RFR: 8283627: Outdated comment in MachineDescriptionTwosComplement.isLP64 [v2]

2022-09-01 Thread Chris Plummer
On Thu, 1 Sep 2022 15:07:03 GMT, Daniel Skantz wrote: >> Update MachineDescriptionTwosComplement.java comment to indicate that LP64 >> machines are no longer uncommon. > > Daniel Skantz has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8

RFR: 8289400: Improve com/sun/jdi/TestScaffold error reporting

2022-09-01 Thread Chris Plummer
com/sun/jdi tests report errors by calling TestScaffold.failure(msg), which prints the failure message and sets the testFailed flag. At some later point the failure is detected and an exception is thrown. The end result is the exception has just has a vanilla message that says something like "Te

Re: RFR: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe" [v2]

2022-09-01 Thread Chris Plummer
On Thu, 1 Sep 2022 17:21:55 GMT, Daniel D. Daugherty wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor indent, spelling, and formatting fixes > > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Jav

Re: RFR: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe" [v2]

2022-09-01 Thread Chris Plummer
On Thu, 1 Sep 2022 18:26:05 GMT, Chris Plummer wrote: >> The root cause of this CR is that we are trying to access the java heap >> during the middle of a GC. This particular test is prone to that happening >> since it runs jstack 4 times on the debuggee as it starts up (the debuggee >> is jsh

Re: RFR: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe" [v2]

2022-09-01 Thread Serguei Spitsyn
On Thu, 1 Sep 2022 18:26:05 GMT, Chris Plummer wrote: >> The root cause of this CR is that we are trying to access the java heap >> during the middle of a GC. This particular test is prone to that happening >> since it runs jstack 4 times on the debuggee as it starts up (the debuggee >> is jsh

Re: RFR: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe" [v2]

2022-09-01 Thread Chris Plummer
> The root cause of this CR is that we are trying to access the java heap > during the middle of a GC. This particular test is prone to that happening > since it runs jstack 4 times on the debuggee as it starts up (the debuggee is > jshell, so it does a lot of initialization on startup). > > SA

Re: RFR: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe"

2022-09-01 Thread Daniel D . Daugherty
On Tue, 30 Aug 2022 23:29:18 GMT, Chris Plummer wrote: > The root cause of this CR is that we are trying to access the java heap > during the middle of a GC. This particular test is prone to that happening > since it runs jstack 4 times on the debuggee as it starts up (the debuggee is > jshell

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v2]

2022-09-01 Thread Chris Plummer
On Thu, 1 Sep 2022 17:20:33 GMT, Chris Plummer wrote: >> While dumping all registers (and doing a findpc on each), the following >> exception occurred for r8: >> >> >> r8: 0x00750e4fdffc >> Error: java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds >> for length 4096 >> ja

Re: RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr" [v2]

2022-09-01 Thread Chris Plummer
> While dumping all registers (and doing a findpc on each), the following > exception occurred for r8: > > > r8: 0x00750e4fdffc > Error: java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds for > length 4096 > java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds

RFR: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr"

2022-09-01 Thread Chris Plummer
While dumping all registers (and doing a findpc on each), the following exception occurred for r8: r8: 0x00750e4fdffc Error: java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds for length 4096 java.lang.ArrayIndexOutOfBoundsException: Index 4099 out of bounds for length 409

Integrated: 8175382: clhsdb pmap should print the end addresses of the load modules

2022-09-01 Thread Chris Plummer
On Tue, 30 Aug 2022 23:04:18 GMT, Chris Plummer wrote: > The clhsdb 'pmap' command prints the start addresses and the sizes of the > various load modules. It would be more intuitive to have the end address > printed as the VM.dynlibs jcmd does. > > Before: > > 0x7f8839c38000 5920K /usr/l

Re: RFR: 8175382: clhsdb pmap should print the end addresses of the load modules

2022-09-01 Thread Chris Plummer
On Tue, 30 Aug 2022 23:04:18 GMT, Chris Plummer wrote: > The clhsdb 'pmap' command prints the start addresses and the sizes of the > various load modules. It would be more intuitive to have the end address > printed as the VM.dynlibs jcmd does. > > Before: > > 0x7f8839c38000 5920K /usr/l

Re: RFR: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe"

2022-09-01 Thread Chris Plummer
On Tue, 30 Aug 2022 23:29:18 GMT, Chris Plummer wrote: > The root cause of this CR is that we are trying to access the java heap > during the middle of a GC. This particular test is prone to that happening > since it runs jstack 4 times on the debuggee as it starts up (the debuggee is > jshell

Re: RFR: 8283627: Outdated comment in MachineDescriptionTwosComplement.isLP64 [v2]

2022-09-01 Thread Serguei Spitsyn
On Thu, 1 Sep 2022 15:07:03 GMT, Daniel Skantz wrote: >> Update MachineDescriptionTwosComplement.java comment to indicate that LP64 >> machines are no longer uncommon. > > Daniel Skantz has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8

Re: RFR: 8283627: Outdated comment in MachineDescriptionTwosComplement.isLP64 [v2]

2022-09-01 Thread Daniel Skantz
> Update MachineDescriptionTwosComplement.java comment to indicate that LP64 > machines are no longer uncommon. Daniel Skantz has updated the pull request incrementally with one additional commit since the last revision: JDK-8283627 - Update MachineDescription.java JDK-8283627 - Update c

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Coleen Phillimore
On Thu, 1 Sep 2022 12:21:30 GMT, Coleen Phillimore wrote: >> The fact it is a weakhandle is an implementation detail. The table simply >> records whether a PD (wrapped in a WeakHandle) has been seen. > > Since I know what this table does, either comment is fine if it helps someone > understand

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Coleen Phillimore
On Thu, 1 Sep 2022 07:53:07 GMT, David Holmes wrote: >> "mapping a PD to a unique Weakhandle" is not an implementation detail. It's >> the only useful API provided by this class: >> >> >> WeakHandle obj = >> ProtectionDomainCacheTable::add_if_absent(protection_domain); >> >> >> and that's t

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Coleen Phillimore
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread David Holmes
On Thu, 1 Sep 2022 07:23:03 GMT, Ioi Lam wrote: >> "mapping to itself" is more useful than "mapping ... to a unique Weakhandle" >> - which is even more of an internal implementation detail. I found the use >> of this table very hard to discern based on the internal use of the >> hashtable, as

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread David Holmes
On Thu, 1 Sep 2022 07:12:25 GMT, Ioi Lam wrote: > I am utterly confused about why we need ProtectionDomainCacheTable at all. It tracks whether we have seen this PD before so that `validate_protection_domain` can skip the Java upcall to `checkPackageAccess`. - PR: https://git.openj

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Ioi Lam
On Thu, 1 Sep 2022 06:51:21 GMT, David Holmes wrote: >> “Mapping to itself” is how this table works internally. I am not sure if >> this information is useful here. But the purpose of this table is really to >> keep track of all PDs that have been registered and not yet garbage >> collected. >

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Ioi Lam
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D