Integrated: JDK-8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416

2021-11-04 Thread Thomas Stuefe
On Thu, 4 Nov 2021 13:25:14 GMT, Thomas Stuefe wrote: > `VM.metaspace`, `VM.classloaders` and `VM.class_hierarchy` all print out > reflection invocation targets for delegating reflection class loaders. Post > JEP 416 we don't use DelegatingClassLoaders anymore. > > This patch removes the

Re: RFR: JDK-8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416

2021-11-04 Thread Thomas Stuefe
On Thu, 4 Nov 2021 17:02:05 GMT, Mandy Chung wrote: >> `VM.metaspace`, `VM.classloaders` and `VM.class_hierarchy` all print out >> reflection invocation targets for delegating reflection class loaders. Post >> JEP 416 we don't use DelegatingClassLoaders anymore. >> >> This patch removes the

Re: RFR: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12 [v2]

2021-11-04 Thread Thomas Stuefe
On Thu, 4 Nov 2021 22:59:39 GMT, Daniel D. Daugherty wrote: >> macOS12 has changed the dladdr() function to accept "-1" as a valid address >> and >> we have functions that use dladdr() to convert DLL addresses into function or >> library names. We also have a gtest that verifies that "-1" is

Re: RFR: JDK-8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416

2021-11-04 Thread David Holmes
On Thu, 4 Nov 2021 13:25:14 GMT, Thomas Stuefe wrote: > `VM.metaspace`, `VM.classloaders` and `VM.class_hierarchy` all print out > reflection invocation targets for delegating reflection class loaders. Post > JEP 416 we don't use DelegatingClassLoaders anymore. > > This patch removes the

Integrated: 8275185: Remove dead code and clean up jvmstat LocalVmManager

2021-11-04 Thread Ioi Lam
On Wed, 13 Oct 2021 04:17:25 GMT, Ioi Lam wrote: > LocalVmManager and PerfDataFile have APIs that are supposed to look for VMs > owned by a specific user. No one uses these APIs, and they don't work anyway. > > The current code is very confusing to look at. Since we're likely to change > code

Re: RFR: 8275185: Remove dead code and clean up jvmstat LocalVmManager [v2]

2021-11-04 Thread Ioi Lam
On Thu, 4 Nov 2021 03:44:43 GMT, Chris Plummer wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains three additional commits >>

Re: RFR: 8276628: Use blessed modifier order in serviceability code [v2]

2021-11-04 Thread David Holmes
On Thu, 4 Nov 2021 17:36:52 GMT, Magnus Ihse Bursie wrote: >> I ran bin/blessed-modifier-order.sh on source owned by serviceability. This >> scripts verifies that modifiers are in the "blessed" order, and fixes it >> otherwise. I have manually checked the changes made by the script to make >>

Re: RFR: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12 [v2]

2021-11-04 Thread Daniel D . Daugherty
> macOS12 has changed the dladdr() function to accept "-1" as a valid address > and > we have functions that use dladdr() to convert DLL addresses into function or > library names. We also have a gtest that verifies that "-1" is not a valid > value to use > as a symbol address. > > As you might

Re: RFR: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12

2021-11-04 Thread Daniel D . Daugherty
On Mon, 1 Nov 2021 15:32:54 GMT, Daniel D. Daugherty wrote: > macOS12 has changed the dladdr() function to accept "-1" as a valid address > and > we have functions that use dladdr() to convert DLL addresses into function or > library names. We also have a gtest that verifies that "-1" is not a

Re: RFR: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12 [v2]

2021-11-04 Thread Daniel D . Daugherty
On Thu, 4 Nov 2021 05:13:29 GMT, Thomas Stuefe wrote: >> Daniel D. Daugherty has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8273967.cr1.patch > > Marked as reviewed by stuefe (Reviewer). @tstuefe and @gerard-ziemski - please re-review

Re: RFR: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes [v10]

2021-11-04 Thread Coleen Phillimore
On Thu, 4 Nov 2021 17:02:59 GMT, Daniel D. Daugherty wrote: >> Sorry I missed that line 463 is still within the else from line 447. >> >> Thread::current() is a compiler-defined thread-local access so should be >> relatively cheap these days, but I have no numbers. > > I'm really tempted to go

Re: RFR: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes [v6]

2021-11-04 Thread Coleen Phillimore
On Fri, 15 Oct 2021 21:34:50 GMT, Daniel D. Daugherty wrote: >> src/hotspot/share/prims/jvmtiEventController.cpp line 623: >> >>> 621: // If we have a JvmtiThreadState, then we've reached the point >>> where >>> 622: // threads can exist so create a ThreadsListHandle to protect them.

Re: RFR: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes [v10]

2021-11-04 Thread Coleen Phillimore
On Tue, 2 Nov 2021 17:26:41 GMT, Daniel D. Daugherty wrote: >> A fix to reduce ThreadsListHandle overhead in relation to handshakes and >> we add sanity checks for ThreadsListHandles higher in the call stack. >> >> This fix was tested with Mach5 Tier[1-8]; Tier8 is still running. > > Daniel D.

Re: RFR: JDK-8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416

2021-11-04 Thread Coleen Phillimore
On Thu, 4 Nov 2021 13:25:14 GMT, Thomas Stuefe wrote: > `VM.metaspace`, `VM.classloaders` and `VM.class_hierarchy` all print out > reflection invocation targets for delegating reflection class loaders. Post > JEP 416 we don't use DelegatingClassLoaders anymore. > > This patch removes the

Re: RFR: JDK-8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416

2021-11-04 Thread Thomas Stuefe
On Thu, 4 Nov 2021 17:02:05 GMT, Mandy Chung wrote: > Looks good to me. Thanks for following this up. The new implementation does > not spin any new class loader and so I don't think jcmd needs to extend its > support for the new implementation using method handles. Thank you Mandy!

Re: RFR: 8276628: Use blessed modifier order in serviceability code [v2]

2021-11-04 Thread Chris Plummer
On Thu, 4 Nov 2021 17:36:52 GMT, Magnus Ihse Bursie wrote: >> I ran bin/blessed-modifier-order.sh on source owned by serviceability. This >> scripts verifies that modifiers are in the "blessed" order, and fixes it >> otherwise. I have manually checked the changes made by the script to make >>

Re: RFR: 8276628: Use blessed modifier order in serviceability code [v2]

2021-11-04 Thread Magnus Ihse Bursie
> I ran bin/blessed-modifier-order.sh on source owned by serviceability. This > scripts verifies that modifiers are in the "blessed" order, and fixes it > otherwise. I have manually checked the changes made by the script to make > sure they are sound. Magnus Ihse Bursie has updated the pull

Re: RFR: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12

2021-11-04 Thread Daniel D . Daugherty
On Wed, 3 Nov 2021 21:14:17 GMT, Gerard Ziemski wrote: >> macOS12 has changed the dladdr() function to accept "-1" as a valid address >> and >> we have functions that use dladdr() to convert DLL addresses into function or >> library names. We also have a gtest that verifies that "-1" is not a

Re: RFR: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12

2021-11-04 Thread Daniel D . Daugherty
On Thu, 4 Nov 2021 05:12:48 GMT, Thomas Stuefe wrote: >> I took a quick look at the other calls to `dladdr()` in >> src/hotspot/os/bsd/os_bsd.cpp >> and I'm not comfortable with changing those uses without having a specific >> test >> case that I can use to investigate those code paths. >> >>

Re: RFR: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12

2021-11-04 Thread Daniel D . Daugherty
On Mon, 1 Nov 2021 15:32:54 GMT, Daniel D. Daugherty wrote: > macOS12 has changed the dladdr() function to accept "-1" as a valid address > and > we have functions that use dladdr() to convert DLL addresses into function or > library names. We also have a gtest that verifies that "-1" is not a

Re: RFR: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12

2021-11-04 Thread Daniel D . Daugherty
On Thu, 4 Nov 2021 05:12:32 GMT, Thomas Stuefe wrote: >> It's actually fairly common to have Mac-specific stuff in the BSD files. The >> macOS >> port was built on top of the BSD port and the BSD port was built by copying >> a LOT >> of code from Linux into BSD specific files with

Re: RFR: 8276173: Clean up and remove unneeded casts in HeapDumper [v2]

2021-11-04 Thread Harold Seigel
On Tue, 2 Nov 2021 19:25:40 GMT, Leo Korinth wrote: >> HeapDumper does a lot of unneeded casts. Some arguments should be const. >> Headers are not correctly sorted. Comment about identifier size on Windows >> and Solaris is not true. >> >> First I cleaned up casting in the "union casting",

Re: RFR: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes [v10]

2021-11-04 Thread Daniel D . Daugherty
On Thu, 4 Nov 2021 01:16:03 GMT, David Holmes wrote: >> I suspect that the way that git is displaying the diffs is confusing you. >> >> We need `current_thread` set if we get to line 474 so we have to init >> `current_thread` on line 446 for the `checkTLHOnly == true` case and >> on line 463

Re: RFR: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes [v10]

2021-11-04 Thread Daniel D . Daugherty
On Thu, 4 Nov 2021 01:18:23 GMT, David Holmes wrote: >> The rationale for removing the is_exiting() check from `java_suspend()` was >> that it >> was redundant because the handshake code detected and handled the >> `is_exiting()` >> case so we didn't need to do that work twice. >> >> If we

Re: RFR: 8276628: Use blessed modifier order in serviceability code

2021-11-04 Thread Magnus Ihse Bursie
On Thu, 4 Nov 2021 15:59:48 GMT, Chris Plummer wrote: >> I ran bin/blessed-modifier-order.sh on source owned by serviceability. This >> scripts verifies that modifiers are in the "blessed" order, and fixes it >> otherwise. I have manually checked the changes made by the script to make >> sure

Re: RFR: JDK-8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416

2021-11-04 Thread Mandy Chung
On Thu, 4 Nov 2021 13:25:14 GMT, Thomas Stuefe wrote: > `VM.metaspace`, `VM.classloaders` and `VM.class_hierarchy` all print out > reflection invocation targets for delegating reflection class loaders. Post > JEP 416 we don't use DelegatingClassLoaders anymore. > > This patch removes the

Re: RFR: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes

2021-11-04 Thread Daniel D . Daugherty
On Sun, 4 Jul 2021 23:39:00 GMT, David Holmes wrote: >> A fix to reduce ThreadsListHandle overhead in relation to handshakes and >> we add sanity checks for ThreadsListHandles higher in the call stack. >> >> This fix was tested with Mach5 Tier[1-8]; Tier8 is still running. > > Hi Dan, > > I

Re: RFR: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes [v11]

2021-11-04 Thread Daniel D . Daugherty
> A fix to reduce ThreadsListHandle overhead in relation to handshakes and > we add sanity checks for ThreadsListHandles higher in the call stack. > > This fix was tested with Mach5 Tier[1-8]; Tier8 is still running. Daniel D. Daugherty has updated the pull request incrementally with one

Re: RFR: 8276173: Clean up and remove unneeded casts in HeapDumper [v2]

2021-11-04 Thread Coleen Phillimore
On Tue, 2 Nov 2021 19:25:40 GMT, Leo Korinth wrote: >> HeapDumper does a lot of unneeded casts. Some arguments should be const. >> Headers are not correctly sorted. Comment about identifier size on Windows >> and Solaris is not true. >> >> First I cleaned up casting in the "union casting",

Re: RFR: 8276628: Use blessed modifier order in serviceability code

2021-11-04 Thread Chris Plummer
On Thu, 4 Nov 2021 10:44:41 GMT, Magnus Ihse Bursie wrote: > I ran bin/blessed-modifier-order.sh on source owned by serviceability. This > scripts verifies that modifiers are in the "blessed" order, and fixes it > otherwise. I have manually checked the changes made by the script to make >

Re: RFR: 8276628: Use blessed modifier order in serviceability code

2021-11-04 Thread Leonid Mesnik
On Thu, 4 Nov 2021 10:44:41 GMT, Magnus Ihse Bursie wrote: > I ran bin/blessed-modifier-order.sh on source owned by serviceability. This > scripts verifies that modifiers are in the "blessed" order, and fixes it > otherwise. I have manually checked the changes made by the script to make >

RFR: JDK-8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416

2021-11-04 Thread Thomas Stuefe
`VM.metaspace`, `VM.classloaders` and `VM.class_hierarchy` all print out reflection invocation targets for delegating reflection class loaders. Post JEP 416 we don't use DelegatingClassLoaders anymore. This patch removes the display of reflection targets from these commands as well as

Re: RFR: 8276628: Use blessed modifier order in serviceability code

2021-11-04 Thread David Holmes
On Thu, 4 Nov 2021 10:44:41 GMT, Magnus Ihse Bursie wrote: > I ran bin/blessed-modifier-order.sh on source owned by serviceability. This > scripts verifies that modifiers are in the "blessed" order, and fixes it > otherwise. I have manually checked the changes made by the script to make >

Re: RFR: 8275185: Remove dead code and clean up jvmstat LocalVmManager

2021-11-04 Thread Kevin Walls
On Thu, 4 Nov 2021 02:07:42 GMT, Ioi Lam wrote: > ...moved the filename patterns back to PerfDataFile.java... Thanks, looks good! - PR: https://git.openjdk.java.net/jdk/pull/5923

Re: RFR: 8275185: Remove dead code and clean up jvmstat LocalVmManager [v2]

2021-11-04 Thread Kevin Walls
On Thu, 4 Nov 2021 02:15:45 GMT, Ioi Lam wrote: >> LocalVmManager and PerfDataFile have APIs that are supposed to look for VMs >> owned by a specific user. No one uses these APIs, and they don't work anyway. >> >> The current code is very confusing to look at. Since we're likely to change >>

RFR: 8276628: Use blessed modifier order in serviceability code

2021-11-04 Thread Magnus Ihse Bursie
I ran bin/blessed-modifier-order.sh on source owned by serviceability. This scripts verifies that modifiers are in the "blessed" order, and fixes it otherwise. I have manually checked the changes made by the script to make sure they are sound. - Commit messages: - 8276628: Use

Re: RFR: 8275185: Remove dead code and clean up jvmstat LocalVmManager [v2]

2021-11-04 Thread Claes Redestad
On Thu, 4 Nov 2021 02:15:45 GMT, Ioi Lam wrote: >> LocalVmManager and PerfDataFile have APIs that are supposed to look for VMs >> owned by a specific user. No one uses these APIs, and they don't work anyway. >> >> The current code is very confusing to look at. Since we're likely to change >>

Re: [External] : Re: RFC: Extend DCmd(Diagnostic-Command) framework to support Java level DCmd

2021-11-04 Thread Chris Plummer
Hi Denghui, Yes, there are other ways the same thing could be accomplished like sockets or signals, but all of this is outside of the purview of the JDK, and therefore we don't become responsible for its design, maintenance, and potential security