> Currently, jdi only check and process class unloading event when it detects a > new GC cycle. > > After [JDK-8212879](https://bugs.openjdk.org/browse/JDK-8212879), posting > class events can overlap with GC finish event, that results, sometimes, it > only captures partial or even empty unloaded class list. The pending list > usually can be flushed out at next GC cycle. But for the classes unloaded > during the last GC cycle, the class unloading events may lost forever. > > This patch checks and processes class unloading events unconditionally, > suggested by @kbarrett, the last pending unloaded class list can be flushed > by other events, such as `VM_DEATH`. > > It also performs `commonRef_compact()` only when there are classes unloaded. > > New test failed about 20% without patch, none with patch.
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 16 additional commits since the last revision: - 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 - Remove redundant check - Update - ... and 6 more: https://git.openjdk.org/jdk/compare/929e29d5...89da788e ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9168/files - new: https://git.openjdk.org/jdk/pull/9168/files/abfe1aad..89da788e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9168&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9168&range=00-01 Stats: 22706 lines in 761 files changed: 12257 ins; 9005 del; 1444 mod Patch: https://git.openjdk.org/jdk/pull/9168.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9168/head:pull/9168 PR: https://git.openjdk.org/jdk/pull/9168