Re: RFR: JDK-8327769: jcmd GC.heap_dump without options should write to location given by -XX:HeapDumpPath, if set [v2]

2024-03-13 Thread Yi Yang
On Tue, 12 Mar 2024 12:22:41 GMT, Matthias Baesken wrote: >> Currently jcmd command GC.heap_dump only works with an additionally provided >> file name. >> Syntax : GC.heap_dump [options] >> >> In case the JVM has the XX - flag HeapDumpPath set, we should support an >> additional mode where th

Re: RFR: 8327864: Support segmented heap dump for HotSpotDiagnosticMXBean

2024-03-13 Thread Yi Yang
On Wed, 13 Mar 2024 20:01:22 GMT, Kevin Walls wrote: >> We've received feedback from users of cloud APM platform wanting the new >> version of the JDK to allow the HotSpotDiagnosticMXBean.dumpHeap >> underpinnings to reduce STW time using sgemented heapdump. Supporting >> segmented heapdump fo

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Serguei Spitsyn
On Thu, 14 Mar 2024 00:12:43 GMT, Alex Menkov wrote: >> The `attributute_count ` is a property of the `RecordComponent` even though >> it is not stored but calculated. >> The `JvmtiClassFileReconstituter` should have a minimal knowledge about this >> property and how it is calculated, the same

Re: RFR: JDK-8326898: NSK tests should listen on loopback addresses only [v2]

2024-03-13 Thread Chris Plummer
On Tue, 5 Mar 2024 02:24:50 GMT, Alex Menkov wrote: >> Many NSK tests create socket channel for test/target interprocess >> communication. >> The change updates server side to listen only on loopback interface. >> >> Testing - all tests that use then functionality: >> - test/hotspot/jtreg/vmTe

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Alex Menkov
On Wed, 13 Mar 2024 20:59:43 GMT, Serguei Spitsyn wrote: >> This is the test itself as described in the bug report - without the fix it >> fails with ClassFormatError > > Could you add a short comment, please? Added. - PR Review Comment: https://git.openjdk.org/jdk/pull/18161#disc

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v4]

2024-03-13 Thread Alex Menkov
> RecordComponent class has _attributes_count field. > The only user of the field is JvmtiClassFileReconstituter. Incorrect value of > the field causes producing incorrect data for Record attribute. > Parsing Record attribute ClassFileParser skips unknown attributes and may > skip RuntimeInvisibl

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Alex Menkov
On Wed, 13 Mar 2024 21:05:22 GMT, Serguei Spitsyn wrote: >> RecordComponent contains information about Record attribute, but it knows >> nothing about class bytes and attributute_count doesn't make sense for it. >> So I think this is JvmtiClassFileReconstituter responsibility to calculate a >>

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Serguei Spitsyn
On Wed, 13 Mar 2024 23:25:55 GMT, Alex Menkov wrote: > But we have an issue here. if PreserveAllAnnotations is enabled and class has > only RuntimeInvisibleAnnotations (no RuntimeVisibleAnnotations), the class > constant pool does not contain "RuntimeVisibleAnnotations" and > JvmtiClassFileRec

Re: RFR: JDK-8327468: Do not restart close if errno is EINTR [macOS/linux] [v2]

2024-03-13 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 08:50:09 GMT, Matthias Baesken wrote: >> There are a number of places remaining in the linux/macOS native JDK >> codebase where we use the RESTARTABLE macro with close, but this is unwanted >> on Linux/macOS. > > Matthias Baesken has updated the pull request incrementally wi

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Alex Menkov
On Wed, 13 Mar 2024 04:36:26 GMT, Serguei Spitsyn wrote: > It is interesting that if an invisible attribute of a `RecordComponent` was > not ignored because the `PreserveAllAnnotations` is enabled then it the > `JvmtiClassFileReconstituter` treats it as a visible attribute. Not sure, if > we s

Re: RFR: JDK-8326898: NSK tests should listen on loopback addresses only [v2]

2024-03-13 Thread Serguei Spitsyn
On Tue, 5 Mar 2024 02:24:50 GMT, Alex Menkov wrote: >> Many NSK tests create socket channel for test/target interprocess >> communication. >> The change updates server side to listen only on loopback interface. >> >> Testing - all tests that use then functionality: >> - test/hotspot/jtreg/vmTe

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Serguei Spitsyn
On Wed, 13 Mar 2024 19:26:33 GMT, Alex Menkov wrote: >> src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp line 516: >> >>> 514: + component->annotations() != nullptr ? 1 : 0 >>> 515: + component->type_annotations() != nullptr ? 1 >>> : 0; >>

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Serguei Spitsyn
On Wed, 13 Mar 2024 19:34:17 GMT, Alex Menkov wrote: >> test/jdk/java/lang/instrument/RetransformRecordAnnotation.java line 96: >> >>> 94: { >>> 95: log("Test: retransform to null"); >>> 96: retransform(null); >> >> Q: Could you add a comment why it is needed? >

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

2024-03-13 Thread Serguei Spitsyn
On Wed, 13 Mar 2024 17:31:32 GMT, Dmitry Chuyko wrote: >> 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:CompilerDirectivesFil

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

2024-03-13 Thread Serguei Spitsyn
On Wed, 13 Mar 2024 16:55:28 GMT, Dmitry Chuyko wrote: >> src/hotspot/share/ci/ciEnv.cpp line 1144: >> >>> 1142: >>> 1143: if (entry_bci == InvocationEntryBci) { >>> 1144: if (TieredCompilation) { >> >> Just a naive question. Why this check has been removed? > > We want to let re

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs [v6]

2024-03-13 Thread Sean Mullan
On Tue, 5 Mar 2024 19:56:58 GMT, Weijun Wang wrote: >> This code change adds an alternative implementation of user-based >> authorization `Subject` APIs that doesn't depend on Security Manager APIs. >> Depending on if the Security Manager is allowed, the methods store the >> current subject di

Re: RFR: 8327864: Support segmented heap dump for HotSpotDiagnosticMXBean

2024-03-13 Thread Kevin Walls
On Tue, 12 Mar 2024 07:59:12 GMT, Yi Yang wrote: > We've received feedback from users of cloud APM platform wanting the new > version of the JDK to allow the HotSpotDiagnosticMXBean.dumpHeap > underpinnings to reduce STW time using sgemented heapdump. Supporting > segmented heapdump for mxbean

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Alex Menkov
On Wed, 13 Mar 2024 04:29:38 GMT, Serguei Spitsyn wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> removed attributes_count from RecordComponent > > test/jdk/java/lang/instrument/RetransformRecordAnnotation.java line

Re: RFR: JDK-8315575: Retransform of record class with record component annotation fails with CFE [v3]

2024-03-13 Thread Alex Menkov
On Wed, 13 Mar 2024 04:13:03 GMT, Serguei Spitsyn wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> removed attributes_count from RecordComponent > > src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp line 516: >

Re: RFR: 8326666: Remove the Java Management Extension (JMX) Subject Delegation feature [v10]

2024-03-13 Thread Kevin Walls
On Wed, 13 Mar 2024 17:39:24 GMT, Mandy Chung wrote: > The spec change looks good to me. I leave to others to review the > implementation and test changes. Thanks! - PR Comment: https://git.openjdk.org/jdk/pull/18025#issuecomment-1995445698

Re: RFR: 8326666: Remove the Java Management Extension (JMX) Subject Delegation feature [v10]

2024-03-13 Thread Mandy Chung
On Tue, 12 Mar 2024 19:58:24 GMT, Kevin Walls wrote: >> The deprecated Subject Delegation feature in JMX will be removed. >> >> This was marked in JDK 21 as deprecated for removal (JDK-8298966). > > Kevin Walls has updated the pull request incrementally with one additional > commit since the la

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

2024-03-13 Thread Dmitry Chuyko
On Wed, 13 Mar 2024 07:48:35 GMT, Serguei Spitsyn wrote: >> Dmitry Chuyko has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 47 commits: >> >> - Resolved master conflicts >> - Merge branch 'openjdk:master' into compiler-directives-

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

2024-03-13 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: 8309271: A way to align already compiled methods with compiler directives [v30]

2024-03-13 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: 8309271: A way to align already compiled methods with compiler directives [v29]

2024-03-13 Thread Dmitry Chuyko
On Wed, 13 Mar 2024 07:43:35 GMT, Serguei Spitsyn wrote: >> Dmitry Chuyko has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 47 commits: >> >> - Resolved master conflicts >> - Merge branch 'openjdk:master' into compiler-directives-

Re: RFR: 8327990: [macosx-aarch64] JFR enters VM without WXWrite

2024-03-13 Thread Richard Reingruber
On Tue, 12 Mar 2024 15:05:00 GMT, Richard Reingruber wrote: > This pr changes `JfrJvmtiAgent::retransform_classes()` and `jfr_set_enabled` > to switch to `WXWrite` before transitioning to the vm. > > Testing: > make test TEST=jdk/jfr/event/runtime/TestClassLoadEvent.java > TEST_VM_OPTS=-XX:+A

Re: RFR: 8327990: [macosx-aarch64] JFR enters VM without WXWrite

2024-03-13 Thread Richard Reingruber
On Wed, 13 Mar 2024 12:19:34 GMT, David Holmes wrote: >> This pr changes `JfrJvmtiAgent::retransform_classes()` and >> `jfr_set_enabled` to switch to `WXWrite` before transitioning to the vm. >> >> Testing: >> make test TEST=jdk/jfr/event/runtime/TestClassLoadEvent.java >> TEST_VM_OPTS=-XX:+A

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-13 Thread Magnus Ihse Bursie
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8327990: [macosx-aarch64] JFR enters VM without WXWrite

2024-03-13 Thread David Holmes
On Tue, 12 Mar 2024 15:05:00 GMT, Richard Reingruber wrote: > This pr changes `JfrJvmtiAgent::retransform_classes()` and `jfr_set_enabled` > to switch to `WXWrite` before transitioning to the vm. > > Testing: > make test TEST=jdk/jfr/event/runtime/TestClassLoadEvent.java > TEST_VM_OPTS=-XX:+A

Re: RFR: 8327990: [macosx-aarch64] JFR enters VM without WXWrite

2024-03-13 Thread Richard Reingruber
On Wed, 13 Mar 2024 09:49:19 GMT, David Holmes wrote: > As I wrote in JBS, shouldn't this be handled by `ThreadInVMfromNative`? (I wanted to publish the PR before answering your comment) This would be reasonable in my opinion. I've hoisted setting `WXWrite` mode in `JfrJvmtiAgent::retransform_c

Re: RFR: JDK-8327769: jcmd GC.heap_dump without options should write to location given by -XX:HeapDumpPath, if set

2024-03-13 Thread David Holmes
On Tue, 12 Mar 2024 08:23:04 GMT, Stefan Karlsson wrote: > > GC folk should be reviewing this not runtime. > > I don't fully agree with that. How these serviceability tools work, and their > interfaces, are usually not something that we GC devs are directly > responsible for. This change could

Re: RFR: 8327990: [macosx-aarch64] JFR enters VM without WXWrite

2024-03-13 Thread David Holmes
On Tue, 12 Mar 2024 15:05:00 GMT, Richard Reingruber wrote: > This pr changes `JfrJvmtiAgent::retransform_classes()` and `jfr_set_enabled` > to switch to `WXWrite` before transitioning to the vm. > > Testing: > make test TEST=jdk/jfr/event/runtime/TestClassLoadEvent.java > TEST_VM_OPTS=-XX:+A

RFR: 8327990: [macosx-aarch64] JFR enters VM without WXWrite

2024-03-13 Thread Richard Reingruber
This pr changes `JfrJvmtiAgent::retransform_classes()` and `jfr_set_enabled` to switch to `WXWrite` before transitioning to the vm. Testing: make test TEST=jdk/jfr/event/runtime/TestClassLoadEvent.java TEST_VM_OPTS=-XX:+AssertWXAtThreadSync make test TEST=compiler/intrinsics/klass/CastNullCheck

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

2024-03-13 Thread Serguei Spitsyn
On Tue, 12 Mar 2024 15:53:39 GMT, Dmitry Chuyko wrote: >> 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:CompilerDirectivesFil

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

2024-03-13 Thread Serguei Spitsyn
On Tue, 12 Mar 2024 15:53:39 GMT, Dmitry Chuyko wrote: >> 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:CompilerDirectivesFil