JDK-6989448 : G1: refactor and simplify G1ParScanThreadState
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs20
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-10-04
  • Updated: 2013-09-18
  • Resolved: 2011-04-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u25Fixed 7Fixed hs20Fixed
Description
The G1ParScanThreadState code in g1CollectedHeap.* contains some replicated asserts in push_on_queue(), pop_from_queue(), trim_queue(), etc., that should be factored out and made consistent.  In addition, the changes for 6966222 enable trim_queue() to be significantly simplified.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/hotspot/rev/b14ec34b1e07
04-12-2010

SUGGESTED FIX Attached as 6989448.patch.zip.
12-10-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/b14ec34b1e07
12-10-2010

EVALUATION Coalesce the asserts and verification code from push_on_queue(), pop_from_queue(), pop_from_overflow_queue() and trim_queue() into debug-only methods verify_ref() and verify_task(). Simplify trim_queue() by adding a method deal_with_reference(StarTask ref) and using methods from OverflowTaskQueue. Clean up termination timing in G1ParEvacuateFollowersClosure::do_void(). Remove refs_to_scan() and overflowed_refs_to_scan(); use OverflowTaskQueue::is_empty() instead.
04-10-2010