Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Chris Plummer
On Tue, 25 Oct 2022 00:55:17 GMT, Serguei Spitsyn wrote: >> There are only 2 calls of removeNode and I don't see risk here. But fell >> free to file separate RFE > > I agree with Alex that there should not be any risk here. > But I'm okay if filing a separate RFE is more convenient to you. I fi

Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Serguei Spitsyn
On Mon, 24 Oct 2022 23:42:20 GMT, Alex Menkov wrote: >> Yes. I did the assert to first convince myself that this would always be the >> case. I was thinking it would be good to leave as-is until we get a full >> round of testing first. Are you ok if I file an RFE instead? > > There are only 2 c

Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Alex Menkov
On Mon, 24 Oct 2022 23:05:31 GMT, Chris Plummer wrote: >> I was almost to suggest the same. > > Yes. I did the assert to first convince myself that this would always be the > case. I was thinking it would be good to leave as-is until we get a full > round of testing first. Are you ok if I file

Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Alex Menkov
On Sat, 22 Oct 2022 03:05:07 GMT, Chris Plummer wrote: > The implementation of removeThread() is currently: > > > static void > removeThread(JNIEnv *env, ThreadList *list, jthread thread) > { > ThreadNode *node; > > node = findThread(list, thread); > if (node != NULL) { > r

Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Chris Plummer
On Mon, 24 Oct 2022 22:56:08 GMT, Serguei Spitsyn wrote: >> src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c line 322: >> >>> 320: ThreadNode *next; >>> 321: >>> 322: JDI_ASSERT(list == node->list); >> >> "list" argument is redundant >> I suggest to drop it and replace this asse

Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Serguei Spitsyn
On Mon, 24 Oct 2022 20:43:48 GMT, Alex Menkov wrote: >> The implementation of removeThread() is currently: >> >> >> static void >> removeThread(JNIEnv *env, ThreadList *list, jthread thread) >> { >> ThreadNode *node; >> >> node = findThread(list, thread); >> if (node != NULL) { >>

Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Serguei Spitsyn
On Sat, 22 Oct 2022 03:05:07 GMT, Chris Plummer wrote: > The implementation of removeThread() is currently: > > > static void > removeThread(JNIEnv *env, ThreadList *list, jthread thread) > { > ThreadNode *node; > > node = findThread(list, thread); > if (node != NULL) { > r

Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Alex Menkov
On Sat, 22 Oct 2022 03:05:07 GMT, Chris Plummer wrote: > The implementation of removeThread() is currently: > > > static void > removeThread(JNIEnv *env, ThreadList *list, jthread thread) > { > ThreadNode *node; > > node = findThread(list, thread); > if (node != NULL) { > r

Re: RFR: 8295810: cleanup debug agent removeThread() api

2022-10-24 Thread Kevin Walls
On Sat, 22 Oct 2022 03:05:07 GMT, Chris Plummer wrote: > The implementation of removeThread() is currently: > > > static void > removeThread(JNIEnv *env, ThreadList *list, jthread thread) > { > ThreadNode *node; > > node = findThread(list, thread); > if (node != NULL) { > r

RFR: 8295810: cleanup debug agent removeThread() api

2022-10-21 Thread Chris Plummer
The implementation of removeThread() is currently: static void removeThread(JNIEnv *env, ThreadList *list, jthread thread) { ThreadNode *node; node = findThread(list, thread); if (node != NULL) { removeNode(list, node); clearThread(env, node); } } However, curren