JDK-7150222 : PS - cleanup invoke methods/policy
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs23
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2012-03-01
  • Updated: 2016-02-19
  • Resolved: 2016-02-19
Related Reports
Relates :  
Description
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).

Comments
EVALUATION Simplify PSScavenge::invoke() and create a new ParallelScavengeHeap method that contains the policy.
01-03-2012