Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-23 Thread Serguei Spitsyn
On Tue, 20 Sep 2022 22:34:59 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiExport.cpp line 1055: >> >>> 1053: if (JavaThread::current()->is_in_tmp_VTMS_transition()) { >>> 1054: return false; >>> 1055: } >> >> You mentioned this in the PR description. However, it's not cle

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-23 Thread Serguei Spitsyn
On Tue, 20 Sep 2022 22:41:50 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/runtime/javaThread.cpp line 1174: >> >>> 1172: #if INCLUDE_JVMTI >>> 1173: // Suspending a JavaThread in VTMS transition or disabling VTMS >>> transitions can cause deadlocks. >>> 1174: assert(!is_in_non_tmp_VTMS_

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-22 Thread Serguei Spitsyn
On Wed, 21 Sep 2022 17:25:42 GMT, Chris Plummer wrote: >> Thank you for reviewing and the comment, Chris. >> I agree, this part and related comment is kind of obscure. >> I'll think how to make the comment better. >> In fact, all temporary VTMS transitions do temporary switch the `JavaThread` >>

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-21 Thread Chris Plummer
On Tue, 20 Sep 2022 22:41:50 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/runtime/javaThread.cpp line 1174: >> >>> 1172: #if INCLUDE_JVMTI >>> 1173: // Suspending a JavaThread in VTMS transition or disabling VTMS >>> transitions can cause deadlocks. >>> 1174: assert(!is_in_non_tmp_VTMS_

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-21 Thread Chris Plummer
On Tue, 20 Sep 2022 22:15:49 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 713: >> >>> 711: if (!jt->is_in_tmp_VTMS_transition()) { >>> 712: jvf = check_and_skip_hidden_frames(jt, jvf); >>> 713: } >> >> I think this comment needs some help. It's hard to ma

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-20 Thread Serguei Spitsyn
On Mon, 19 Sep 2022 20:41:50 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed typo in VirtualThread.c > > src/hotspot/share/runtime/javaThread.cpp line 1174: > >> 1172: #if INCLUDE_JVMTI

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-20 Thread Serguei Spitsyn
On Mon, 19 Sep 2022 20:22:54 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed typo in VirtualThread.c > > src/hotspot/share/prims/jvmtiExport.cpp line 1055: > >> 1053: if (JavaThread::

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-20 Thread Serguei Spitsyn
On Mon, 19 Sep 2022 20:19:10 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed typo in VirtualThread.c > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 713: > >> 711: if (!jt->is_in_tm

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-19 Thread Chris Plummer
On Mon, 19 Sep 2022 19:18:57 GMT, Serguei Spitsyn wrote: >> There are several places in VirtualThread class implementation where virtual >> threads are being mounted or unmounted, so there is a transition of the >> JavaThread identity from carrier thread to virtual thread and back. The >> exec

Re: RFR: 8293613: need to properly handle and hide tmp VTMS transitions [v3]

2022-09-19 Thread Serguei Spitsyn
> There are several places in VirtualThread class implementation where virtual > threads are being mounted or unmounted, so there is a transition of the > JavaThread identity from carrier thread to virtual thread and back. The > execution state in such transitions is inconsistent, and so, has to