Re: RFR: 8341273: JVMTI is not properly hiding some continuation related methods [v14]

2024-10-27 Thread Alan Bateman
On Sun, 27 Oct 2024 21:45:08 GMT, Serguei Spitsyn wrote: >> This fixes a problem in the VTMS (Virtual Thread Mount State) transition >> frames hiding mechanism. >> Please, see a fix description in the first comment. >> >> Testing: >> - Verified with new test `vthread/CheckHiddenFrames` >> - M

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v8]

2024-10-27 Thread Henry Jen
> This PR split out large array/set construction into separate factory methods > to avoid oversized method trying to construct several of those. > > In order to do that, we will need to generate those help methods on demand in > the class builder. Here we have two approach, one is for dedup set,

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v12]

2024-10-27 Thread David Holmes
On Fri, 25 Oct 2024 13:11:18 GMT, Patricio Chilano Mateo wrote: >> src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp line 1550: >> >>> 1548: #endif /* ASSERT */ >>> 1549: >>> 1550: push_cont_fastpath(); >> >> One of the callers of this gives a clue what it does. >> >> __ push_cont_fastpath

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v12]

2024-10-27 Thread David Holmes
On Fri, 25 Oct 2024 21:33:24 GMT, Patricio Chilano Mateo wrote: >> This is the implementation of JEP 491: Synchronize Virtual Threads without >> Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for >> further details. >> >> In order to make the code review easier the change

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v9]

2024-10-27 Thread David Holmes
On Fri, 25 Oct 2024 18:40:51 GMT, Patricio Chilano Mateo wrote: >>> Some comments here about the operation would be useful. >>> >> Added a comment. > >> I'm struggling to understand how a thread can already be on this list? >> > With the removal of the _Responsible thread, it's less likely but i

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v9]

2024-10-27 Thread David Holmes
On Mon, 28 Oct 2024 00:43:47 GMT, David Holmes wrote: >>> I'm struggling to understand how a thread can already be on this list? >>> >> With the removal of the _Responsible thread, it's less likely but it could >> still happen. One case is when the virtual thread acquires the monitor after >> a

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v7]

2024-10-27 Thread David Holmes
On Fri, 25 Oct 2024 18:36:50 GMT, Patricio Chilano Mateo wrote: >> src/java.base/share/classes/java/lang/VirtualThread.java line 952: >> >>> 950: for (;;) { >>> 951: boolean unblocked = false; >>> 952: synchronized (timedWaitLock()) { >> >> Where is the overall

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v9]

2024-10-27 Thread David Holmes
On Fri, 25 Oct 2024 11:59:03 GMT, Coleen Phillimore wrote: >> src/hotspot/share/runtime/objectMonitor.hpp line 174: >> >>> 172: >>> 173: int64_t volatile _owner; // Either tid of owner, NO_OWNER, >>> ANONYMOUS_OWNER or DEFLATER_MARKER. >>> 174: volatile uint64_t _previous_owner_tid; // t

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v9]

2024-10-27 Thread David Holmes
On Fri, 25 Oct 2024 22:29:56 GMT, Coleen Phillimore wrote: >>> If it's always the current thread, then it should be called 'current' imo. >>> >> The inflating thread is always the current one but it's not always equal to >> `inflating_thread`. > > I thought locking_thread there may not be the cu

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v9]

2024-10-27 Thread David Holmes
On Fri, 25 Oct 2024 18:46:52 GMT, Patricio Chilano Mateo wrote: >> src/hotspot/share/runtime/objectMonitor.cpp line 2028: >> >>> 2026: // First time we run after being preempted on Object.wait(). >>> 2027: // Check if we were interrupted or the wait timed-out, and in >>> 2028: // that cas

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v9]

2024-10-27 Thread David Holmes
On Fri, 25 Oct 2024 18:42:29 GMT, Patricio Chilano Mateo wrote: >> src/hotspot/share/runtime/objectMonitor.hpp line 349: >> >>> 347: ObjectWaiter* first_waiter() >>> { return _WaitSet; } >>> 348: ObjectWaiter* next_waiter(ObjectWaiter* o)

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v7]

2024-10-27 Thread Henry Jen
> This PR split out large array/set construction into separate factory methods > to avoid oversized method trying to construct several of those. > > In order to do that, we will need to generate those help methods on demand in > the class builder. Here we have two approach, one is for dedup set,

Re: RFR: 8341273: JVMTI is not properly hiding some continuation related methods [v14]

2024-10-27 Thread Serguei Spitsyn
> This fixes a problem in the VTMS (Virtual Thread Mount State) transition > frames hiding mechanism. > Please, see a fix description in the first comment. > > Testing: > - Verified with new test `vthread/CheckHiddenFrames` > - Mach5 tiers 1-6 are passed Serguei Spitsyn has updated the pull re

Re: RFR: 8336707: Contention of ForkJoinPool grows when stealing works [v10]

2024-10-27 Thread Doug Lea
> This addresses tendencies in previous update to increase fencing, scanning, > and signalling that can increase contention, and slow down performance > especially on ARM platforms. It also uses more ARM-friendly constructions to > reduce overhead (leading to several changes that all of the same

Request for Comments: Adding bulk-read method "CharSequence.getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)"

2024-10-27 Thread Markus Karg
>Hi Markus, >Should we drop the srcBigin/srcEnd parameters, as they can be replaced by a subSequence(srcBegin, srcEnd) call? Chen, I do understand your idea and while originally I had the same in mind (it really is appealing!), I came up with a draft using the original String.getChars() signature