RFR: 8296089: Remove debug agent code for special handling of Thread.resume() [v2]
Chris Plummer
cjplummer at openjdk.org
Thu Nov 10 20:51:27 UTC 2022
On Thu, 10 Nov 2022 11:03:25 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Cleanup some suspect suspendOnStart and toBeResumed checks.
>
> src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c line 841:
>
>> 839: debugMonitorNotifyAll(threadLock);
>> 840: if ((node->suspendCount == 0) && node->toBeResumed) {
>> 841: JDI_ASSERT(!node->suspendOnStart);
>
> It'd be nice to add a small comment explaining why this asserted is here.
Ok. The root reason is to sanity check that removing this check from the `if` statement is in fact ok to do. I guess that might be obvious to someone looking at the diff, but not someone just looking at the above code. I'll try to come up with a reasonable comment.
-------------
PR: https://git.openjdk.org/jdk/pull/10922
More information about the serviceability-dev
mailing list