Re: RFR: 8303151: DCmd framework cleanups

2023-03-02 Thread Yi Yang
On Fri, 3 Mar 2023 04:59:44 GMT, David Holmes wrote: > Whilst working on the DCmd code I noticed two items that could be cleaned up: > > 1. The `NMTDCmd` is registered after the call to `register_dcmds()` instead > of inside it. > > 2. The "extension" mechanism to define external DCmds (as add

Re: RFR: 8299518: HotSpotVirtualMachine shared code across different platforms [v8]

2023-03-02 Thread Yi Yang
> harmless refactor to share code across different platforms of > VirtualMachineImpl: > 1. Shared code to process command response after requesting a command > execution > 2. Read functionality in SocketInputStream can be reused Yi Yang has updated the pull request incrementally with one additio

Re: RFR: 8299518: HotSpotVirtualMachine shared code across different platforms [v7]

2023-03-02 Thread David Holmes
On Tue, 28 Feb 2023 06:17:29 GMT, Yi Yang wrote: >> harmless refactor to share code across different platforms of >> VirtualMachineImpl: >> 1. Shared code to process command response after requesting a command >> execution >> 2. Read functionality in SocketInputStream can be reused > > Yi Yang

RFR: 8303151: DCmd framework cleanups

2023-03-02 Thread David Holmes
Whilst working on the DCmd code I noticed two items that could be cleaned up: 1. The `NMTDCmd` is registered after the call to `register_dcmds()` instead of inside it. 2. The "extension" mechanism to define external DCmds (as added by [JDK-7132515](https://bugs.openjdk.org/browse/JDK-7132515) f

Re: RFR: 8303527: update for deprecated sprintf for jdk.hotspot.agent [v3]

2023-03-02 Thread Xue-Lei Andrew Fan
> Hi, > > May I have this update reviewed? > > The sprintf is deprecated in Xcode 14 because of security concerns. The issue > was addressed in [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) > for building failure, and > [JDK-8299378](https://bugs.openjdk.org/browse/JDK-8299378)/[J

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v3]

2023-03-02 Thread Alex Menkov
On Thu, 2 Mar 2023 20:50:36 GMT, Alex Menkov wrote: >> test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 118: >> >>> 116: + ", JPrimitive: " + t.isJavaPrimitiveType() >>> 117: + ", Oop: " + t.isOopType() >>> 118: + ", Ptr: " + t

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v3]

2023-03-02 Thread Alex Menkov
On Thu, 2 Mar 2023 23:13:36 GMT, Alex Menkov wrote: >> In that case is it worth listing the "no vtable" classes that have a >> superclass? Are they somehow more interesting than those without a >> superclass? > > If superclass is set then it's the type which describes VM class (but some JM > c

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v2]

2023-03-02 Thread Alex Menkov
On Thu, 2 Mar 2023 22:24:35 GMT, Chris Plummer wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> addressed feedback > > test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 94: > >> 92: Address

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v2]

2023-03-02 Thread Alex Menkov
On Fri, 3 Mar 2023 00:44:31 GMT, Chris Plummer wrote: >> agent.getTypeDataBase() returns TypeDataBase, we need BasicTypeDataBase > > Your comment seems to indicate otherwise, although I think what you meant is > that the declared return type for agent.getTypeDataBase() is TypeDataBase, > but it

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v3]

2023-03-02 Thread Alex Menkov
> Unique vtables for classes in vmStruct data is a requirement for SA to > correctly detect hotspot classes. > The fix adds test to verify this requirement. > > The test fails as expected on Windows if VM is built without RTTI (see > JDK-8302817) Alex Menkov has updated the pull request increme

Re: RFR: 8299518: HotSpotVirtualMachine shared code across different platforms [v2]

2023-03-02 Thread Yi Yang
On Thu, 5 Jan 2023 03:01:22 GMT, Serguei Spitsyn wrote: >> Yi Yang has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request contains two >> new commits

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v2]

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 23:32:47 GMT, Alex Menkov wrote: >> test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 85: >> >>> 83: int dupsFound = 0; >>> 84: // agent.getTypeDataBase() returns HotSpotTypeDataBase (extends >>> BasicTypeDataBase) >>> 85: BasicTypeDataBa

Re: RFR: 8303527: update for deprecated sprintf for jdk.hotspot.agent [v2]

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 23:13:44 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14 because of security concerns. The >> issue was addressed in >> [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) for building >> failu

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v2]

2023-03-02 Thread Alex Menkov
On Thu, 2 Mar 2023 22:20:10 GMT, Chris Plummer wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> addressed feedback > > test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 85: > >> 83: int dupsFou

Re: RFR: 8303527: update for deprecated sprintf for jdk.hotspot.agent [v2]

2023-03-02 Thread Xue-Lei Andrew Fan
On Thu, 2 Mar 2023 19:31:46 GMT, Chris Plummer wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - one more correction >> - correct mistakes > > src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp line

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v2]

2023-03-02 Thread Alex Menkov
On Thu, 2 Mar 2023 22:17:27 GMT, Chris Plummer wrote: >> vmStruct contains a lot of entries which should have vtable == null >> I added logging of some stats to the test, on win-x64-fastdebug it reports: >> total: 861, no vtable: 503, no_vtable_with_super: 24 >> if test would log everything with

Re: RFR: 8303527: update for deprecated sprintf for jdk.hotspot.agent [v2]

2023-03-02 Thread Xue-Lei Andrew Fan
> Hi, > > May I have this update reviewed? > > The sprintf is deprecated in Xcode 14 because of security concerns. The issue > was addressed in [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) > for building failure, and > [JDK-8299378](https://bugs.openjdk.org/browse/JDK-8299378)/[J

Re: RFR: 8303523: Cleanup problem listing of nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java

2023-03-02 Thread David Holmes
On Thu, 2 Mar 2023 17:30:07 GMT, Chris Plummer wrote: > attach002a is problem listed under > [JDK-8277812](https://bugs.openjdk.org/browse/JDK-8277812), which has been > closed as a dup of > [JDK-8277573](https://bugs.openjdk.org/browse/JDK-8277573), so its problem > list entry should be upda

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v2]

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 20:42:16 GMT, Alex Menkov wrote: >> test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 112: >> >>> 110: } >>> 111: >>> 112: if (vtable == null && t.getSuperclass() != null) { >> >> Why only log if there is no superclass? > > vmStruct cont

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v2]

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 20:42:12 GMT, Alex Menkov wrote: >> Unique vtables for classes in vmStruct data is a requirement for SA to >> correctly detect hotspot classes. >> The fix adds test to verify this requirement. >> >> The test fails as expected on Windows if VM is built without RTTI (see >> JD

Re: RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 12:03:44 GMT, Pavel Rappo wrote: > Please review this superficial documentation cleanup that was triggered by > unrelated analysis of doc comments in JDK API. > > The only effect that this multi-area PR has on the JDK API Documentation > (i.e. the observable effect on the ge

Re: RFR: 8303534: Merge CompactibleSpace into ContiguousSpace

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 21:49:39 GMT, Albert Mingkun Yang wrote: > Simple refactoring of merging two types. > > Test: tier1-5 Copyrights need updating in a few files. - PR: https://git.openjdk.org/jdk/pull/12841

Re: RFR: 8303136: MemoryPoolMBean/isCollectionUsageThresholdExceeded/isexceeded005 failed with "isCollectionUsageThresholdExceeded() returned true, while threshold = 1 and used = 0"

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 09:20:23 GMT, Kevin Walls wrote: > Test update for an occasional failure, which does not reproduce. > > The test failure in JDK-8303136 is at line 141 in the updated file here. > It's the failure where isExceeded is true, but our sampled "used" value is > not above the thre

RFR: 8303534: Merge CompactibleSpace into ContiguousSpace

2023-03-02 Thread Albert Mingkun Yang
Simple refactoring of merging two types. Test: tier1-5 - Commit messages: - merge-type Changes: https://git.openjdk.org/jdk/pull/12841/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12841&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8303534 Stats: 191 lines in 1

Re: RFR: 8303136: MemoryPoolMBean/isCollectionUsageThresholdExceeded/isexceeded005 failed with "isCollectionUsageThresholdExceeded() returned true, while threshold = 1 and used = 0"

2023-03-02 Thread Kevin Walls
On Thu, 2 Mar 2023 18:00:28 GMT, Chris Plummer wrote: >> Test update for an occasional failure, which does not reproduce. >> >> The test failure in JDK-8303136 is at line 141 in the updated file here. >> It's the failure where isExceeded is true, but our sampled "used" value is >> not above t

Re: RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments

2023-03-02 Thread Phil Race
On Thu, 2 Mar 2023 12:03:44 GMT, Pavel Rappo wrote: > Please review this superficial documentation cleanup that was triggered by > unrelated analysis of doc comments in JDK API. > > The only effect that this multi-area PR has on the JDK API Documentation > (i.e. the observable effect on the ge

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unuque vtables [v2]

2023-03-02 Thread Alex Menkov
On Thu, 2 Mar 2023 16:09:51 GMT, Chris Plummer wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> addressed feedback > > test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 96: > >> 94: Map> types

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unuque vtables [v2]

2023-03-02 Thread Alex Menkov
On Thu, 2 Mar 2023 16:06:41 GMT, Chris Plummer wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> addressed feedback > > test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 112: > >> 110: } >>

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unuque vtables [v2]

2023-03-02 Thread Alex Menkov
> Unique vtables for classes in vmStruct data is a requirement for SA to > correctly detect hotspot classes. > The fix adds test to verify this requirement. > > The test fails as expected on Windows if VM is built without RTTI (see > JDK-8302817) Alex Menkov has updated the pull request increme

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unuque vtables [v2]

2023-03-02 Thread Alex Menkov
On Thu, 2 Mar 2023 03:39:27 GMT, Chris Plummer wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> addressed feedback > > test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 84: > >> 82: MethodHandl

Re: RFR: 8303527: update for deprecated sprintf for jdk.hotspot.agent

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 19:17:40 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this update reviewed? > > The sprintf is deprecated in Xcode 14 because of security concerns. The issue > was addressed in [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) > for building failure, and >

RFR: 8303527: update for deprecated sprintf for jdk.hotspot.agent

2023-03-02 Thread Xue-Lei Andrew Fan
Hi, May I have this update reviewed? The sprintf is deprecated in Xcode 14 because of security concerns. The issue was addressed in [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) for building failure, and [JDK-8299378](https://bugs.openjdk.org/browse/JDK-8299378)/[JDK-8299635](http

Integrated: 8303267: Prefer ArrayList to LinkedList in ConcurrentLocksPrinter

2023-03-02 Thread Andrey Turbanov
On Mon, 27 Feb 2023 12:54:24 GMT, Andrey Turbanov wrote: > LinkedList is used as value in > `sun.jvm.hotspot.runtime.ConcurrentLocksPrinter#locksMap` Map. > There is only add/iterator calls on this lists. No removes from the head or > something like this. Not sure why LinkedList was used, but A

Re: RFR: 8303136: MemoryPoolMBean/isCollectionUsageThresholdExceeded/isexceeded005 failed with "isCollectionUsageThresholdExceeded() returned true, while threshold = 1 and used = 0"

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 09:20:23 GMT, Kevin Walls wrote: > Test update for an occasional failure, which does not reproduce. > > The test failure in JDK-8303136 is at line 141 in the updated file here. > It's the failure where isExceeded is true, but our sampled "used" value is > not above the thre

Re: RFR: 8303242: ThreadMXBean issues with virtual threads [v4]

2023-03-02 Thread Mandy Chung
On Thu, 2 Mar 2023 08:18:03 GMT, Alan Bateman wrote: >> This PR covers a number of issues with j.l.management.ThreadMXBean, and the >> JDK-specific extension c.s.management.ThreadMXBean, when there are virtual >> threads in use. >> >> As background, ThreadMXBean was re-specified in Java 19 to

RFR: 8303523: Cleanup problem listing of nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java

2023-03-02 Thread Chris Plummer
attach002a is problem listed under [JDK-8277812](https://bugs.openjdk.org/browse/JDK-8277812), which has been closed as a dup of [JDK-8277573](https://bugs.openjdk.org/browse/JDK-8277573), so its problem list entry should be updated to reflect this. The other issue is that it is currently in th

RFR: 8301995: Move invokedynamic resolution information out of ConstantPoolCacheEntry

2023-03-02 Thread Matias Saavedra Silva
The current structure used to store the resolution information for invokedynamic, ConstantPoolCacheEntry, is difficult to interpret due to its ambigious fields f1 and f2. This structure can hold information for fields, methods, and invokedynamics and each of its fields can hold different types o

Re: RFR: 8303489: Add a test to verify classes in vmStruct have unuque vtables

2023-03-02 Thread Chris Plummer
On Thu, 2 Mar 2023 02:41:12 GMT, Alex Menkov wrote: > Unique vtables for classes in vmStruct data is a requirement for SA to > correctly detect hotspot classes. > The fix adds test to verify this requirement. > > The test fails as expected on Windows if VM is built without RTTI (see > JDK-8302

Integrated: 8302516: Do some cleanup of nsk/share/jdi/EventHandler.java

2023-03-02 Thread Chris Plummer
On Wed, 15 Feb 2023 00:13:22 GMT, Chris Plummer wrote: > While working on [JDK-8289765](https://bugs.openjdk.org/browse/JDK-8289765), > I ended up doing a lot of cleanup of nsk/share/jdi/EventHandler.java, so much > so that the changes distract from the actual bug fix, so I decided it would >

Re: RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments

2023-03-02 Thread Sean Mullan
On Thu, 2 Mar 2023 12:03:44 GMT, Pavel Rappo wrote: > Please review this superficial documentation cleanup that was triggered by > unrelated analysis of doc comments in JDK API. > > The only effect that this multi-area PR has on the JDK API Documentation > (i.e. the observable effect on the ge

RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments

2023-03-02 Thread Pavel Rappo
Please review this superficial documentation cleanup that was triggered by unrelated analysis of doc comments in JDK API. The only effect that this multi-area PR has on the JDK API Documentation (i.e. the observable effect on the generated HTML pages) can be summarized as follows: diff -ur

RFR: 8303136: MemoryPoolMBean/isCollectionUsageThresholdExceeded/isexceeded005 failed with "isCollectionUsageThresholdExceeded() returned true, while threshold = 1 and used = 0"

2023-03-02 Thread Kevin Walls
Test update for an occasional failure, which does not reproduce. The test failure in JDK-8303136 is at line 141 in the updated file here. It's the failure where isExceeded is true, but our sampled "used" value is not above the threshold. But while the comment says it's refreshing values, it do

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2023-03-02 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8303242: ThreadMXBean issues with virtual threads [v3]

2023-03-02 Thread Alan Bateman
On Wed, 1 Mar 2023 21:46:54 GMT, Mandy Chung wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update isXXXThreadCpuTimeSupported descriptions > > src/java.management/share/classes/java/lang/management/ThreadMXBean.j

Re: RFR: 8303242: ThreadMXBean issues with virtual threads [v4]

2023-03-02 Thread Alan Bateman
> This PR covers a number of issues with j.l.management.ThreadMXBean, and the > JDK-specific extension c.s.management.ThreadMXBean, when there are virtual > threads in use. > > As background, ThreadMXBean was re-specified in Java 19 to support the > monitoring and management of platform threads