Re: measuring object size in Java

2023-09-28 Thread Alan Bateman
On 29/09/2023 06:54, David Holmes wrote: On 29/09/2023 3:38 pm, Alan Bateman wrote: On 28/09/2023 21:42, daniel.daughe...@oracle.com wrote: java.lang.instrument is owned by the Serviceability Team so I'm redirecting this message to that alias... This doesn't look like a JDK issue, inste

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems. [v7]

2023-09-28 Thread Varada M
On Thu, 28 Sep 2023 23:46:52 GMT, Chris Plummer wrote: > I just ran the changes through our tier1 CI and also ran all the nsk/jvmti > tests on all supported platforms and everything passed, so I think the > changes are good. I performed tests on AIX 7.2. Thank you @plummercj for checking on al

Re: measuring object size in Java

2023-09-28 Thread David Holmes
On 29/09/2023 3:38 pm, Alan Bateman wrote: On 28/09/2023 21:42, daniel.daughe...@oracle.com wrote: java.lang.instrument is owned by the Serviceability Team so I'm redirecting this message to that alias... This doesn't look like a JDK issue, instead it looks like |com.github.jelmerk.ObjectS

Re: measuring object size in Java

2023-09-28 Thread Alan Bateman
On 28/09/2023 21:42, daniel.daughe...@oracle.com wrote: java.lang.instrument is owned by the Serviceability Team so I'm redirecting this message to that alias... This doesn't look like a JDK issue, instead it looks like |com.github.jelmerk.ObjectSizeFetcher has an Instrumentation field that

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock" [v3]

2023-09-28 Thread David Holmes
On Thu, 28 Sep 2023 09:11:12 GMT, Roman Kennke wrote: >> The SA can run concurrently with Java threads, SA code that inspects locking >> state should be able to deal with that. On the other hand, the particular >> code is only used in printing routine and is not expected to be precise. >> When

Re: RFR: JDK-8316778: test hprof lib: invalid array element type from JavaValueArray.elementSize [v2]

2023-09-28 Thread Leonid Mesnik
On Fri, 29 Sep 2023 02:13:04 GMT, Alex Menkov wrote: >> The change fixes 2 issues in hprof test library. >> The issue were discovered during test development (logging values of dumped >> heap objects). >> - JavaValueArray.elementSize cannot determine size of the array elements and >> throws Run

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-28 Thread David Holmes
On Thu, 28 Sep 2023 11:58:23 GMT, Coleen Phillimore wrote: > > Hmmm okay - it seems fragile to have a psuedo-destructor in release(). > > I don't know what this comment means. Object lifetimes should be well managed such that you can't use an object after it has been "destroyed". Methods like

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-09-28 Thread Alex Menkov
> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread > stack references > The change: > - reorganize thread-related code/prepare it to use for unmounted vthreads: > - new ThreadDumper class caches stack frames, thread serial num, frame > serial number (trace serial number

Re: RFR: JDK-8316778: test hprof lib: invalid array element type from JavaValueArray.elementSize [v2]

2023-09-28 Thread Alex Menkov
> The change fixes 2 issues in hprof test library. > The issue were discovered during test development (logging values of dumped > heap objects). > - JavaValueArray.elementSize cannot determine size of the array elements and > throws RuntimeException: invalid array element type > - JavaObject.toS

Re: RFR: JDK-8316778: test hprof lib: invalid array element type from JavaValueArray.elementSize [v2]

2023-09-28 Thread Alex Menkov
On Thu, 28 Sep 2023 21:23:45 GMT, Chris Plummer wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added bug tag to the test > > test/lib-test/jdk/test/lib/hprof/HprofTest.java line 43: > >> 41: >> 42: /** >> 43: *

Re: RFR: 8308429: jvmti/StopThread/stopthrd007 failed with "NoClassDefFoundError: Could not initialize class jdk.internal.misc.VirtualThreads" [v2]

2023-09-28 Thread David Holmes
On Thu, 28 Sep 2023 21:04:58 GMT, Leonid Mesnik wrote: >> The test fails because ThreadDeath is raised during class >> jdk.internal.misc.VirtualThreads initialization. The proposed fix is to >> pre-initialize this step to avoid such failures. See more details in the bug. >> I reproduced the ori

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems. [v7]

2023-09-28 Thread Chris Plummer
On Thu, 28 Sep 2023 16:44:26 GMT, Varada M wrote: >> Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) >> where AttachCurrentThread is failing on AIX due t stack size issue. >> Test cases: >> runtime/jni/terminatedThread/TestTerminatedThread.java >> vmTestbase/nsk/jvmti/

Re: RFR: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-09-28 Thread Chris Plummer
On Thu, 28 Sep 2023 21:23:25 GMT, Ashutosh Mehra wrote: > Please review this change to fix the operands of the bytecodes that operate > on fields when dumping a class using SA. > > Testing: hotspot_serviceability > > I have also verified that > `test/hotspot/jtreg/serviceability/sa/ClhsdbDump

Re: RFR: JDK-8316778: test hprof lib: invalid array element type from JavaValueArray.elementSize

2023-09-28 Thread Chris Plummer
On Wed, 27 Sep 2023 21:34:37 GMT, Alex Menkov wrote: > The change fixes 2 issues in hprof test library. > The issue were discovered during test development (logging values of dumped > heap objects). > - JavaValueArray.elementSize cannot determine size of the array elements and > throws RuntimeE

Re: RFR: 8303773: Replace "main.wrapper" with "test.thread.factory" property in test code [v2]

2023-09-28 Thread Alex Menkov
On Thu, 28 Sep 2023 16:47:09 GMT, Leonid Mesnik wrote: >> The main.wrapper was the first name for jtreg test thread factory plugin. >> However, during integration of this feature in jtreg it was decided to use >> test.thread.factory name. So this fix just renames "main.wrapper" property >> to

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v2]

2023-09-28 Thread Alex Menkov
On Thu, 28 Sep 2023 02:11:45 GMT, David Holmes wrote: >> This is existing field in the class. >> There are a number (45) of misspelled "referer" in the lib, including some >> public methods (like getReferer() in line 140). >> If you think it makes sense to fix the, I can file a separate CR for t

Re: RFR: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-09-28 Thread Ashutosh Mehra
On Thu, 28 Sep 2023 22:32:29 GMT, Chris Plummer wrote: >> Please review this change to fix the operands of the bytecodes that operate >> on fields when dumping a class using SA. >> >> Testing: hotspot_serviceability >> >> I have also verified that >> `test/hotspot/jtreg/serviceability/sa/Clhs

Re: RFR: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-09-28 Thread Chris Plummer
On Thu, 28 Sep 2023 21:23:25 GMT, Ashutosh Mehra wrote: > Please review this change to fix the operands of the bytecodes that operate > on fields when dumping a class using SA. > > Testing: hotspot_serviceability > > I have also verified that > `test/hotspot/jtreg/serviceability/sa/ClhsdbDump

Re: RFR: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-09-28 Thread Chris Plummer
On Thu, 28 Sep 2023 21:23:25 GMT, Ashutosh Mehra wrote: > Please review this change to fix the operands of the bytecodes that operate > on fields when dumping a class using SA. > > Testing: hotspot_serviceability > > I have also verified that > `test/hotspot/jtreg/serviceability/sa/ClhsdbDump

RFR: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-09-28 Thread Ashutosh Mehra
Please review this change to fix the operands of the bytecodes that operate on fields when dumping a class using SA. Testing: hotspot_serviceability I have also verified that `test/hotspot/jtreg/serviceability/sa/ClhsdbDumpclass.javaClhsdbDumpclass.java`, which is in the problem list because o

Re: RFR: 8313997: The jdi/ListeningConnector/startListening/startlis001 may fail if the hosts file is modified

2023-09-28 Thread Alex Menkov
On Wed, 9 Aug 2023 07:46:58 GMT, Sergey Bylokhov wrote: > The test uses this code to create a list of valid addresses for the localhost: > > String hostname = "localhost"; > List validAddresses = new LinkedList<>(); > validAddresses.add(hostname); > Arrays.stream(

Re: RFR: 8308429: jvmti/StopThread/stopthrd007 failed with "NoClassDefFoundError: Could not initialize class jdk.internal.misc.VirtualThreads" [v2]

2023-09-28 Thread Leonid Mesnik
On Thu, 28 Sep 2023 21:04:58 GMT, Leonid Mesnik wrote: >> The test fails because ThreadDeath is raised during class >> jdk.internal.misc.VirtualThreads initialization. The proposed fix is to >> pre-initialize this step to avoid such failures. See more details in the bug. >> I reproduced the ori

Re: RFR: 8308429: jvmti/StopThread/stopthrd007 failed with "NoClassDefFoundError: Could not initialize class jdk.internal.misc.VirtualThreads" [v2]

2023-09-28 Thread Chris Plummer
On Thu, 28 Sep 2023 21:04:58 GMT, Leonid Mesnik wrote: >> The test fails because ThreadDeath is raised during class >> jdk.internal.misc.VirtualThreads initialization. The proposed fix is to >> pre-initialize this step to avoid such failures. See more details in the bug. >> I reproduced the ori

Re: RFR: 8308429: jvmti/StopThread/stopthrd007 failed with "NoClassDefFoundError: Could not initialize class jdk.internal.misc.VirtualThreads" [v2]

2023-09-28 Thread Leonid Mesnik
> The test fails because ThreadDeath is raised during class > jdk.internal.misc.VirtualThreads initialization. The proposed fix is to > pre-initialize this step to avoid such failures. See more details in the bug. > I reproduced the original problem and verified that it is not reproduced > after

Re: measuring object size in Java

2023-09-28 Thread daniel . daugherty
java.lang.instrument is owned by the Serviceability Team so I'm redirecting this message to that alias... Dan On 9/27/23 9:14 PM, Siddharth Jain wrote: Hello, I am using this method to measure object size in Java: https://stackoverflow.com/a/52682/147530 and it was (it still does) working wi

Re: RFR: 8303773: Replace "main.wrapper" with "test.thread.factory" property in test code [v2]

2023-09-28 Thread Chris Plummer
On Thu, 28 Sep 2023 16:47:09 GMT, Leonid Mesnik wrote: >> The main.wrapper was the first name for jtreg test thread factory plugin. >> However, during integration of this feature in jtreg it was decided to use >> test.thread.factory name. So this fix just renames "main.wrapper" property >> to

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems. [v6]

2023-09-28 Thread Chris Plummer
On Thu, 28 Sep 2023 16:38:07 GMT, Varada M wrote: > I have performed jtreg testing Yes, but what testing and on which platforms? - PR Comment: https://git.openjdk.org/jdk/pull/15924#issuecomment-1739789244

Integrated: 8316445: Mark com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java as vm.flagless

2023-09-28 Thread Leonid Mesnik
On Tue, 19 Sep 2023 17:24:15 GMT, Leonid Mesnik wrote: > Test > com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java > check how beans work with VM flags and ignore external flags. > It doesn't make sense to run it with external options so just mark it as > flagless. > Tested with running

RFR: 8308429: jvmti/StopThread/stopthrd007 failed with "NoClassDefFoundError: Could not initialize class jdk.internal.misc.VirtualThreads"

2023-09-28 Thread Leonid Mesnik
The test fails because ThreadDeath is raised during class jdk.internal.misc.VirtualThreads initialization. The proposed fix is to pre-initialize this step to avoid such failures. See more details in the bug. I reproduced the original problem and verified that it is not reproduced after fix. Tes

Re: RFR: 8316445: Mark com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java as vm.flagless [v2]

2023-09-28 Thread Serguei Spitsyn
On Wed, 20 Sep 2023 22:11:12 GMT, Leonid Mesnik wrote: >> Test >> com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java >> check how beans work with VM flags and ignore external flags. >> It doesn't make sense to run it with external options so just mark it as >> flagless. >> Tested with r

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

2023-09-28 Thread Serguei Spitsyn
On Thu, 28 Sep 2023 09:49:05 GMT, Afshin Zafari 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: 8303773: Replace "main.wrapper" with "test.thread.factory" property in test code [v2]

2023-09-28 Thread Leonid Mesnik
> The main.wrapper was the first name for jtreg test thread factory plugin. > However, during integration of this feature in jtreg it was decided to use > test.thread.factory name. So this fix just renames "main.wrapper" property to > "test.thread.factory" so it is more compliant with jtreg nam

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems. [v6]

2023-09-28 Thread Varada M
On Thu, 28 Sep 2023 14:25:16 GMT, Chris Plummer wrote: > Copyrights need updating. > > Can you tell me what testing you've done? I have performed jtreg testing - PR Comment: https://git.openjdk.org/jdk/pull/15924#issuecomment-1739670301

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems. [v7]

2023-09-28 Thread Varada M
> Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) > where AttachCurrentThread is failing on AIX due t stack size issue. > Test cases: > runtime/jni/terminatedThread/TestTerminatedThread.java > vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/TestDescription.

Re: RFR: 8309271: A way to align already compiled methods with compiler directives [v8]

2023-09-28 Thread Dmitry Chuyko
> Compiler Control (https://openjdk.org/jeps/165) provides method-context > dependent control of the JVM compilers (C1 and C2). The active directive > stack is built from the directive files passed with the > `-XX:CompilerDirectivesFile` diagnostic command-line option and the > Compiler.add_dir

Re: RFR: 8313997: The jdi/ListeningConnector/startListening/startlis001 may fail if the hosts file is modified

2023-09-28 Thread Serguei Spitsyn
On Wed, 9 Aug 2023 07:46:58 GMT, Sergey Bylokhov wrote: > The test uses this code to create a list of valid addresses for the localhost: > > String hostname = "localhost"; > List validAddresses = new LinkedList<>(); > validAddresses.add(hostname); > Arrays.stream(

Re: RFR: 8313997: The jdi/ListeningConnector/startListening/startlis001 may fail if the hosts file is modified

2023-09-28 Thread Serguei Spitsyn
On Wed, 9 Aug 2023 07:46:58 GMT, Sergey Bylokhov wrote: > The test uses this code to create a list of valid addresses for the localhost: > > String hostname = "localhost"; > List validAddresses = new LinkedList<>(); > validAddresses.add(hostname); > Arrays.stream(

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems. [v6]

2023-09-28 Thread Chris Plummer
On Thu, 28 Sep 2023 07:20:20 GMT, Varada M wrote: >> Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) >> where AttachCurrentThread is failing on AIX due t stack size issue. >> Test cases: >> runtime/jni/terminatedThread/TestTerminatedThread.java >> vmTestbase/nsk/jvmti/

Integrated: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-28 Thread Ashutosh Mehra
On Wed, 27 Sep 2023 20:45:00 GMT, Ashutosh Mehra wrote: > Please review trivial fix to display class name in the output of "where" > command of SA. > > Testing: hotspot_serviceability This pull request has now been integrated. Changeset: 065203d4 Author:Ashutosh Mehra URL: https:/

Re: RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-28 Thread Ashutosh Mehra
On Thu, 28 Sep 2023 01:57:59 GMT, David Holmes wrote: >> Please review trivial fix to display class name in the output of "where" >> command of SA. >> >> Testing: hotspot_serviceability > > Has the change been tested in the HSDB GUI as requested in the JBS issue? @dholmes-ora thanks for review

Re: RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-28 Thread Ashutosh Mehra
On Wed, 27 Sep 2023 20:45:00 GMT, Ashutosh Mehra wrote: > Please review trivial fix to display class name in the output of "where" > command of SA. > > Testing: hotspot_serviceability I believe my github user name has been linked to the OpenJDK user name. So I am going to try integrate it. -

Integrated: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-28 Thread Coleen Phillimore
On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore wrote: > This change makes WeakHandle and OopHandle release null out the obj pointer, > at the cost of making the release function non-const and some changes that > propagated from that. This enables ObjectMonitor code to test for null to >

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-28 Thread Coleen Phillimore
On Thu, 28 Sep 2023 01:46:37 GMT, David Holmes wrote: > Hmmm okay - it seems fragile to have a psuedo-destructor in release(). I don't know what this comment means. It was fragile to *not* have release destroy the _obj pointer, which was the cause of the original confusion and problems while

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

2023-09-28 Thread Afshin Zafari
On Thu, 28 Sep 2023 02:04:12 GMT, David Holmes wrote: >> This change came after fixing a merge conflict. >> In `mutableNUMASpace.cpp`, at lines 163, 182, 202 and 586 the `find` >> function is called in this way: >> >> int i = lgrp_spaces()->find(&lgrp_id, LGRPSpace::equals); >> >> where `lgrp

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

2023-09-28 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: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock" [v3]

2023-09-28 Thread Roman Kennke
> The SA can run concurrently with Java threads, SA code that inspects locking > state should be able to deal with that. On the other hand, the particular > code is only used in printing routine and is not expected to be precise. When > resolving an anonymous owner, we may not find one, because

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems. [v6]

2023-09-28 Thread Varada M
> Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) > where AttachCurrentThread is failing on AIX due t stack size issue. > Test cases: > runtime/jni/terminatedThread/TestTerminatedThread.java > vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/TestDescription.