On Tue, 29 Jun 2021 02:23:25 GMT, David Holmes <[email protected]> wrote:
>> Leonid Mesnik has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Added comment.
>
> src/hotspot/share/prims/jvmtiImpl.cpp line 968:
>
>> 966: for (QueueNode* node = _queue_head; node != NULL; node =
>> node->next()) {
>> 967: node->event().post_compiled_method_load_event(env);
>> 968: }
>
> Can't you dequeue() immediately after calling
> post_compiled_method_load_event()?
Seems that dequeue in for-loop deletes the node which posted. It is possible to
update the loop to have update dequeue in the same iteration however, I don't
think it is a good idea to mix iterator/deletion in the same loop. What is the
reason for this change?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4602