JDK-7046558 : G1: concurrent marking optimizations
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs21
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-05-19
  • Updated: 2013-09-18
  • Resolved: 2011-09-30
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u2Fixed 8Fixed hs22Fixed
Description
There are some simple optimizations we can do do improve the performance of the concurrent marking phase.

- CMOopClosure, which is used to scan objects during marking, is not specialized. By specializing it we will be able to get a nice performance boost. We should also rename it with a G1-specific name (say: G1CMOopClosure) given that its declaration will move to an .hpp file.

- There are a couple of methods in the fast path that will benefit from getting inlined. These are CMTask::deal_with_reference() and CMTask::push()

- We are using the wrong bitmap operations! In the parallel case we are using par_at_put() which in turn calls either par_set_bit() or par_clear_bit(). We should call the latter directly (which will also be inlined, par_at_put() is not). Ditto for at_put() and set_bit() / clear_bit().

- There are places where we can use the slightly more efficient heap_region_containing_raw(), instead of heap_region_containing(), as we know that the address is in the G1 heap.

- When we check whether an object is live or not we should first check whether it's marked on the bitmap and, only if it's not, get its containing region.

Comments
EVALUATION See main CR
2011-09-12

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/842b840e67db
2011-07-08

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/842b840e67db
2011-07-08

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/842b840e67db
2011-06-14

EVALUATION See Description
2011-05-19