RFR: 8256811: Delayed/missed jdwp class unloading events [v18]

Serguei Spitsyn sspitsyn at openjdk.org
Thu Jul 21 06:54:11 UTC 2022


On Wed, 20 Jul 2022 18:30:43 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> > get_objects_with_tags
> 
> @sspitsyn Good catch!
> 
> I believe it should be synchronized if `JvmtiEnv::GetObjectsWithTags()` call can overlap disable/enable `ObjectFree` event.
> 
> But it raises a question: why it needs `remove_and_post_dead_objects()` here? `JvmtiEnv::GetObjectsWithTags()` returns live objects, posting `ObjectFree` event does not have immediate effect due to queuing in old implementation. Could we have ServiceThread to deal with it instead?
> 
> Thanks.
> 
> @coleenp
> 
> ```
> if (collector.some_dead_found() && env()->is_enabled(JVMTI_EVENT_OBJECT_FREE)) {
>    post_dead_objects_on_vm_thread();
> ```
> 
> came in from [JDK-8212879](https://bugs.openjdk.org/browse/JDK-8212879), could you comment why it is needed?
> 
> Thanks!

I do not remember the exact motivation to add this call.
It could be added because some of the tests started failing.
The GetObjectsWithTags spec says nothing about it.
Will look at the CSR if there is any.

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

PR: https://git.openjdk.org/jdk/pull/9168


More information about the serviceability-dev mailing list