The method PSScavenge::invoke() can end up doing a young gc, full gc, both, or none. This is somewhat confusing, especially when calling code has the need to know what was done (7146343 made a small change in this direction). The policy in this method is better suited to a higher-level class such as ParallelScavengeHeap.
More specifically, the PSScavenge::invoke() method should do a young gc if possible, and return whether or not the young gc was done (nothing more). A new controlling method in ParallelScavengeHeap should then determine whether to do a full gc, and return to callers an indication of the type of gc(s) done (i.e., an enum).
More specifically, the PSScavenge::invoke() method should do a young gc if possible, and return whether or not the young gc was done (nothing more). A new controlling method in ParallelScavengeHeap should then determine whether to do a full gc, and return to callers an indication of the type of gc(s) done (i.e., an enum).
- relates to
-
JDK-7146343 PS invoke methods should indicate the type of gc done
-
- Closed
-