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

Zhengyu Gu zgu at openjdk.org
Mon Jun 27 19:02:50 UTC 2022


On Fri, 24 Jun 2022 03:42:28 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Zhengyu Gu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 18 additional commits since the last revision:
>> 
>>  - Improve naming and cleanup
>>  - Merge branch 'master' into JDK-8256811-jdi-missing-class-unloading-event
>>  - v4
>>  - v3
>>  - v2
>>  - Merge branch 'master' into JDK-8256811-jdi-missing-class-unloading-event
>>  - Merge branch 'jdi_tmp' into JDK-8256811-jdi-missing-class-unloading-event
>>  - v0
>>  - v2
>>  - v1
>>  - ... and 8 more: https://git.openjdk.org/jdk/compare/dfdc1127...559b4bf1
>
> src/jdk.jdwp.agent/share/native/libjdwp/classTrack.c line 52:
> 
>> 50: 
>> 51: /*
>> 52:  * Add a class to the prepared class table.
> 
> This comment is out of date. There is no longer a table and hasn't been for a while. I'd suggest a comment about tagging it so we know when the class is freed. Aslo, maybe `classTrack_trackPreparedClass()` would be a better name.

Fixed

> src/jdk.jdwp.agent/share/native/libjdwp/classTrack.c line 156:
> 
>> 154: void
>> 155: classTrack_activate(JNIEnv *env)
>> 156: { }
> 
> Remove

Fixed

> src/jdk.jdwp.agent/share/native/libjdwp/classTrack.c line 165:
> 
>> 163: classTrack_reset(void)
>> 164: {}
>> 165: 
> 
> Remove

Fixed

> src/jdk.jdwp.agent/share/native/libjdwp/eventHandler.c line 462:
> 
>> 460: /* Create a synthetic class unload event for every class no longer present.
>> 461:  * Analogous to event_callback combined with a handler in a unload specific
>> 462:  * (no event structure) kind of way.
> 
> This comment was already out of date. It is based on when we took a new snapshot of loaded classes and compared it with the old snapshot to determine which ones were just unloaded. I would suggest change it to just say something like "Create a synthetic class unload event for the specified signature."

Fixed

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

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


More information about the serviceability-dev mailing list