Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-30 Thread Jiangli Zhou
On Wed, 29 Nov 2023 23:06:10 GMT, Daniel D. Daugherty wrote: > A belated thumbs up. Sorry I didn't get back to this review before the fix > was integrated. Still thanks for reviewing the change, @dcubed-ojdk. > > I found just a nit comment that could be more clear. The particular issue occu

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-29 Thread Daniel D . Daugherty
On Wed, 22 Nov 2023 22:40:20 GMT, Jiangli Zhou wrote: >> Please review JvmtiThreadState::state_for_while_locked change to handle the >> state->get_thread_oop() null case. Please see >> https://bugs.openjdk.org/browse/JDK-8319935 for details. > > Jiangli Zhou has updated the pull request increme

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-29 Thread Jiangli Zhou
On Tue, 28 Nov 2023 21:28:31 GMT, Jiangli Zhou wrote: >> This fix looks good to me, so approved now. >> I assume it is for 22. Is it correct? > >> This fix looks good to me, so approved now. I assume it is for 22. Is it >> correct? > > Thanks for the careful review, @sspitsyn! The fix is for 22

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-28 Thread David Holmes
On Wed, 22 Nov 2023 22:40:20 GMT, Jiangli Zhou wrote: >> Please review JvmtiThreadState::state_for_while_locked change to handle the >> state->get_thread_oop() null case. Please see >> https://bugs.openjdk.org/browse/JDK-8319935 for details. > > Jiangli Zhou has updated the pull request increme

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-28 Thread Man Cao
On Tue, 28 Nov 2023 20:38:55 GMT, Serguei Spitsyn wrote: >> @sspitsyn For the above suggestions, it seems cleaner/safer to handle the >> clean-ups in a separate RFE with full testing including the vthread cases. >> There are additional comments in >> https://github.com/openjdk/jdk/pull/16642#i

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-28 Thread Jiangli Zhou
On Tue, 28 Nov 2023 20:43:15 GMT, Serguei Spitsyn wrote: > This fix looks good to me, so approved now. I assume it is for 22. Is it > correct? Thanks for the careful review, @sspitsyn! The fix is for 22. We probably should also consider back-porting to JDK 11 to prevent any potential changes i

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-28 Thread Man Cao
On Wed, 22 Nov 2023 22:40:20 GMT, Jiangli Zhou wrote: >> Please review JvmtiThreadState::state_for_while_locked change to handle the >> state->get_thread_oop() null case. Please see >> https://bugs.openjdk.org/browse/JDK-8319935 for details. > > Jiangli Zhou has updated the pull request increme

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-28 Thread Serguei Spitsyn
On Tue, 28 Nov 2023 18:36:00 GMT, Jiangli Zhou wrote: >> This also was caught by my eyes. :) >> With the lines 99-101 in place the only case when `thread_oop` can be equal >> to `nullptr` is when `thread->threadObj() == nullptr`. My understanding is >> that it can be for a detached thread only.

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-28 Thread Serguei Spitsyn
On Wed, 22 Nov 2023 22:40:20 GMT, Jiangli Zhou wrote: >> Please review JvmtiThreadState::state_for_while_locked change to handle the >> state->get_thread_oop() null case. Please see >> https://bugs.openjdk.org/browse/JDK-8319935 for details. > > Jiangli Zhou has updated the pull request increme

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-28 Thread Jiangli Zhou
On Tue, 28 Nov 2023 05:08:58 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiThreadState.inline.hpp line 98: >> >>> 96:state->get_thread_oop() != thread_oop)) { >>> 97: // Check if java_lang_Thread already has a link to the >>> JvmtiThreadState. >>> 9

Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread [v5]

2023-11-27 Thread Serguei Spitsyn
On Mon, 13 Nov 2023 23:33:50 GMT, Man Cao wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address Serguei Spitsyn's comments/suggestions: >> - Remove the redundant thread->is_Java_thread() check from >> JvmtiSam