Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-04-16 Thread Jan Kratochvil
On Tue, 16 Apr 2024 15:17:33 GMT, Severin Gehwolf wrote: > The idea here is to use this property to tune OpenJDK for in-container, > specifically k8s, use. In such a setup it's custom to run a single process > within set resource constraints. The in-container tuning means to use all the

Re: RFR: 8329433: Reduce nmethod header size [v6]

2024-04-16 Thread Vladimir Kozlov
> This is part of changes which try to reduce size of `nmethod` and `codeblob` > data vs code in CodeCache. > These changes reduced size of `nmethod` header from 288 to 232 bytes. From > 304 to 248 in optimized VM: > > Statistics for 1282 bytecoded nmethods for C2: > total in heap = 5560352

RFR: 8330303: Crash: assert(_target_jt == nullptr || _target_jt->vthread() == target_h()) failed

2024-04-16 Thread Serguei Spitsyn
This is a simple fix of three similar asserts. The `_target_jt->jvmti_vthread()` has to be used instead of `_target_jt->vthread()`. The `_target_jt->vthread()` can be outdated in some specific contexts as shown in the `hs_err` stack trace. I've seen similar issue and already fixed it in this

Re: RFR: 8328741: serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java failed with unexpected owner [v3]

2024-04-16 Thread Serguei Spitsyn
On Tue, 16 Apr 2024 21:55:54 GMT, Serguei Spitsyn wrote: >> This is the test issue. The `WaitingPT3` thread posted the `MonitorWait` >> event but has not released the `lockCheck` monitor yet. It has been fixed to >> wait for each `WaitingTask` thread to really reach the `WAITING` state. The

Re: RFR: 8329433: Reduce nmethod header size [v4]

2024-04-16 Thread Vladimir Kozlov
On Tue, 16 Apr 2024 19:47:06 GMT, Vladimir Kozlov wrote: >> Okay. > > It is tempting to do for `nmethod` to replace `init_defaults()`. I will look > what can be done. It does not work. It does not allow fields initialization after delegation: src/hotspot/share/code/nmethod.cpp: In constructor

Re: RFR: 8328741: serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java failed with unexpected owner [v3]

2024-04-16 Thread Serguei Spitsyn
> This is the test issue. The `WaitingPT3` thread posted the `MonitorWait` > event but has not released the `lockCheck` monitor yet. It has been fixed to > wait for each `WaitingTask` thread to really reach the `WAITING` state. The > same approach is used for `EnteringTask` threads. It has been

Re: RFR: 8328741: serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java failed with unexpected owner [v2]

2024-04-16 Thread Serguei Spitsyn
On Tue, 16 Apr 2024 19:21:16 GMT, Leonid Mesnik wrote: > The fix looks good, just one nit. rml.wait(100); might be changed to plain > sleep(100) Right, thanks. Will fix it. - PR Comment: https://git.openjdk.org/jdk/pull/18778#issuecomment-2059950982

Re: RFR: 8318026: jcmd should provide access to detailed JVM object information [v16]

2024-04-16 Thread Kevin Walls
> Introduce the jcmd "VM.inspect" to implement access to detailed JVM object > information. > > Not recommended for live production use. Requires UnlockDiagnosticVMOptions > and not included in jcmd help output, to remind us this is not a > general-purpose customer-facing tool. Kevin Walls

Re: RFR: 8329433: Reduce nmethod header size [v4]

2024-04-16 Thread Vladimir Kozlov
On Tue, 16 Apr 2024 19:20:37 GMT, Vladimir Kozlov wrote: >> Delegating constructors are the answer to having some common 'init' >> functions. It would simply save lines of code that look the same in both >> constructor initializer lists. But it's a drive-by comment. > > Okay. It is tempting

Re: RFR: 8322043: HeapDumper should use parallel dump by default [v3]

2024-04-16 Thread Alex Menkov
On Tue, 16 Apr 2024 09:08:20 GMT, David Holmes wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> check free_memory for OOME > > src/hotspot/share/services/heapDumper.hpp line 63: > >> 61: // additional info is

Re: RFR: 8329433: Reduce nmethod header size [v4]

2024-04-16 Thread Vladimir Kozlov
On Tue, 16 Apr 2024 19:03:01 GMT, Coleen Phillimore wrote: >> Thank you, @coleenp, foe looking on these changes. >> >> Which fields are initialized twice? Only `_oop_maps` is set to `nullptr` >> before we proper build oop maps in first constructor. >> >> The only saving could be lines of code

Re: RFR: 8328741: serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java failed with unexpected owner [v2]

2024-04-16 Thread Leonid Mesnik
On Tue, 16 Apr 2024 06:08:58 GMT, Serguei Spitsyn wrote: >> This is the test issue. The `WaitingPT3` thread posted the `MonitorWait` >> event but has not released the `lockCheck` monitor yet. It has been fixed to >> wait for each `WaitingTask` thread to really reach the `WAITING` state. The

Re: RFR: 8329433: Reduce nmethod header size [v4]

2024-04-16 Thread Coleen Phillimore
On Tue, 16 Apr 2024 18:54:40 GMT, Vladimir Kozlov wrote: >> src/hotspot/share/code/codeBlob.cpp line 106: >> >>> 104: >>> 105: // Simple CodeBlob used for simple BufferBlob. >>> 106: CodeBlob::CodeBlob(const char* name, CodeBlobKind kind, int size, >>> uint16_t header_size) : >> >> Just a

Re: RFR: 8329433: Reduce nmethod header size [v4]

2024-04-16 Thread Vladimir Kozlov
On Tue, 16 Apr 2024 16:33:18 GMT, Coleen Phillimore wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use 16-bits types for header_size and frame_complete_offset arguments > > src/hotspot/share/code/codeBlob.cpp

Re: RFR: 8329433: Reduce nmethod header size [v5]

2024-04-16 Thread Vladimir Kozlov
> This is part of changes which try to reduce size of `nmethod` and `codeblob` > data vs code in CodeCache. > These changes reduced size of `nmethod` header from 288 to 232 bytes. From > 304 to 248 in optimized VM: > > Statistics for 1282 bytecoded nmethods for C2: > total in heap = 5560352

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-04-16 Thread Thomas Stuefe
On Sat, 13 Apr 2024 18:29:59 GMT, Thomas Stuefe wrote: >> Severin Gehwolf 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 ten additional >>

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-04-16 Thread Thomas Stuefe
On Thu, 11 Apr 2024 12:08:02 GMT, Severin Gehwolf wrote: >> Please review this enhancement to the container detection code which allows >> it to figure out whether the JVM is actually running inside a container >> (`podman`, `docker`, `crio`), or with some other means that enforces >>

Re: RFR: 8329433: Reduce nmethod header size [v4]

2024-04-16 Thread Coleen Phillimore
On Tue, 16 Apr 2024 03:31:25 GMT, Vladimir Kozlov wrote: >> This is part of changes which try to reduce size of `nmethod` and `codeblob` >> data vs code in CodeCache. >> These changes reduced size of `nmethod` header from 288 to 232 bytes. From >> 304 to 248 in optimized VM: >> >> Statistics

Re: RFR: 8329433: Reduce nmethod header size [v3]

2024-04-16 Thread Vladimir Kozlov
On Tue, 16 Apr 2024 06:13:59 GMT, Dean Long wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Union fields which usages do not overlap > > src/hotspot/share/code/nmethod.cpp line 1235: > >> 1233: int

Re: RFR: 8329433: Reduce nmethod header size [v4]

2024-04-16 Thread Vladimir Kozlov
On Tue, 16 Apr 2024 03:31:25 GMT, Vladimir Kozlov wrote: >> This is part of changes which try to reduce size of `nmethod` and `codeblob` >> data vs code in CodeCache. >> These changes reduced size of `nmethod` header from 288 to 232 bytes. From >> 304 to 248 in optimized VM: >> >> Statistics

Re: RFR: 8329433: Reduce nmethod header size [v3]

2024-04-16 Thread Vladimir Kozlov
On Tue, 16 Apr 2024 06:48:05 GMT, Dean Long wrote: >> I thought about that but in both places where these accessors are called >> (`frame::get_native_monitor()` and `frame::get_native_receiver()`) there are >> such asserts already: >>

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-04-16 Thread Severin Gehwolf
On Tue, 16 Apr 2024 14:40:46 GMT, Jan Kratochvil wrote: > IMHO `is_containerized()` is OK to return `false` even when running in a > container but with no limitations set. The idea here is to use this property to tune OpenJDK for in-container, specifically k8s, use. In such a setup it's

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-04-16 Thread Jan Kratochvil
On Thu, 11 Apr 2024 12:08:02 GMT, Severin Gehwolf wrote: >> Please review this enhancement to the container detection code which allows >> it to figure out whether the JVM is actually running inside a container >> (`podman`, `docker`, `crio`), or with some other means that enforces >>

Integrated: 8188784: javax/management/notification/BroadcasterSupportDeadlockTest.java - TEST FAILED: deadlock

2024-04-16 Thread Kevin Walls
On Tue, 9 Apr 2024 11:08:31 GMT, Kevin Walls wrote: > This test incorrectly fails, although rarely, thinking its "thread 2" has > deadlocked. > A change of sleep will likely fix this, but there are other issues, so > cleaning up the test a little. > > Remove the probe for the

Re: RFR: 8188784: javax/management/notification/BroadcasterSupportDeadlockTest.java - TEST FAILED: deadlock [v2]

2024-04-16 Thread Kevin Walls
On Tue, 16 Apr 2024 09:26:58 GMT, Kevin Walls wrote: >> This test incorrectly fails, although rarely, thinking its "thread 2" has >> deadlocked. >> A change of sleep will likely fix this, but there are other issues, so >> cleaning up the test a little. >> >> Remove the probe for the

Re: RFR: 8188784: javax/management/notification/BroadcasterSupportDeadlockTest.java - TEST FAILED: deadlock [v2]

2024-04-16 Thread Kevin Walls
On Tue, 16 Apr 2024 00:31:10 GMT, Leonid Mesnik wrote: >> Kevin Walls 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 >>

Re: RFR: 8188784: javax/management/notification/BroadcasterSupportDeadlockTest.java - TEST FAILED: deadlock [v2]

2024-04-16 Thread Kevin Walls
> This test incorrectly fails, although rarely, thinking its "thread 2" has > deadlocked. > A change of sleep will likely fix this, but there are other issues, so > cleaning up the test a little. > > Remove the probe for the ManagementFactory class, to check we are on jdk5 or > later. 8-) > >

Re: RFR: 8322043: HeapDumper should use parallel dump by default [v3]

2024-04-16 Thread David Holmes
On Mon, 15 Apr 2024 23:18:54 GMT, Alex Menkov wrote: >> The fix makes VM heap dumping parallel by default. >> `jcmd GC.heap_dump` and `jmap -dump` had parallel dumping by default, the >> fix affects `HotSpotDiagnosticMXBean.dumpHeap()`, >> `-XX:+HeapDumpBeforeFullGC`,

Re: RFR: 8329433: Reduce nmethod header size [v3]

2024-04-16 Thread Dean Long
On Tue, 16 Apr 2024 03:12:48 GMT, Vladimir Kozlov wrote: >> src/hotspot/share/code/nmethod.hpp line 282: >> >>> 280: _has_flushed_dependencies:1, // Used for maintenance of >>> dependencies (under CodeCache_lock) >>> 281: _is_unlinked:1, // mark during class

Re: RFR: 8329433: Reduce nmethod header size [v3]

2024-04-16 Thread Dean Long
On Tue, 16 Apr 2024 03:06:13 GMT, Vladimir Kozlov wrote: >> src/hotspot/share/code/nmethod.hpp line 205: >> >>> 203: // offsets to find the receiver for non-static native wrapper >>> frames. >>> 204: ByteSize _native_receiver_sp_offset; >>> 205: ByteSize

Re: RFR: 8329433: Reduce nmethod header size [v3]

2024-04-16 Thread Dean Long
On Mon, 15 Apr 2024 03:24:07 GMT, Vladimir Kozlov wrote: >> This is part of changes which try to reduce size of `nmethod` and `codeblob` >> data vs code in CodeCache. >> These changes reduced size of `nmethod` header from 288 to 232 bytes. From >> 304 to 248 in optimized VM: >> >> Statistics

Re: RFR: 8329433: Reduce nmethod header size [v3]

2024-04-16 Thread Dean Long
On Mon, 15 Apr 2024 03:24:07 GMT, Vladimir Kozlov wrote: >> This is part of changes which try to reduce size of `nmethod` and `codeblob` >> data vs code in CodeCache. >> These changes reduced size of `nmethod` header from 288 to 232 bytes. From >> 304 to 248 in optimized VM: >> >> Statistics

Re: RFR: 8329433: Reduce nmethod header size [v3]

2024-04-16 Thread Dean Long
On Mon, 15 Apr 2024 03:24:07 GMT, Vladimir Kozlov wrote: >> This is part of changes which try to reduce size of `nmethod` and `codeblob` >> data vs code in CodeCache. >> These changes reduced size of `nmethod` header from 288 to 232 bytes. From >> 304 to 248 in optimized VM: >> >> Statistics

Re: RFR: 8328741: serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java failed with unexpected owner [v2]

2024-04-16 Thread Serguei Spitsyn
> This is the test issue. The `WaitingPT3` thread posted the `MonitorWait` > event but has not released the `lockCheck` monitor yet. It has been fixed to > wait for each `WaitingTask` thread to really reach the `WAITING` state. The > same approach is used for `EnteringTask` threads. It has been

Re: RFR: 8328741: serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java failed with unexpected owner [v2]

2024-04-16 Thread Serguei Spitsyn
On Mon, 15 Apr 2024 21:34:48 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: removed event_lock; moved wait_for_state() to jvmti_common.hpp > >