RFR: 8245877: assert(_value != __null) failed: resolving NULL _value in JvmtiExport::post_compiled_method_load [v2]

David Holmes dholmes at openjdk.java.net
Tue Jun 29 10:33:04 UTC 2021


On Tue, 29 Jun 2021 07:51:52 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> 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?

Just to save iterating the queue twice. And that is what the original loop did - you just have to switch the order of processing and deleting.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4602


More information about the serviceability-dev mailing list