United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7102445 G1: Unnecessary Resource allocations during RSet scanning
JDK-7102445 : G1: Unnecessary Resource allocations during RSet scanning

Details
Type:
Enhancement
Submit Date:
2011-10-18
Status:
Closed
Updated Date:
2012-01-23
Project Name:
JDK
Resolved Date:
2012-01-23
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7u2
Fixed Versions:
hs23 (b04)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
During some large benchmark runs - notably the ATG CRM demo - some inconsistencies were seen inthe PrintGCDetails output between the global Pallel Other time (the interval from when all workers are started to when all workers have finished) and the per-worker parallel time (the duration of the worker's work() method). The timings were consistently around 35-37ms.

We suspect this is because some destructors are executed at the end of the work() method and outside the timing scope. We should fix that and make sure that those two measurements are consistent.

                                    

Comments
SUGGESTED FIX

Stack allocate the DirtyCardToOopClosure instance in ScanRSClosure::scanCard.
                                     
2011-10-18
EVALUATION

An instance of a DirtyCardToOopClosure was being resource allocated for every card scanned during RSet scanning. While freeing the Chunks to the ChunkPools, upon execution of the ResourceMark desctructor, the GC worker threads were contending on the pthread mutex that is utilized by the ThreadCritical object.
                                     
2011-10-18
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/c6a6e936dc68
                                     
2011-10-24
EVALUATION

See main CR
                                     
2011-11-04
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/c6a6e936dc68
                                     
2011-11-10



Hardware and Software, Engineered to Work Together