United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7045662 G1: OopsInHeapRegionClosure::set_region() should not be virtual
JDK-7045662 : G1: OopsInHeapRegionClosure::set_region() should not be virtual

Details
Type:
Bug
Submit Date:
2011-05-17
Status:
Closed
Updated Date:
2011-11-25
Project Name:
JDK
Resolved Date:
2011-09-30
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs22 (b02)

Related Reports
Backport:
Backport:

Sub Tasks

Description
Currently, the OopsInHeapRegionClosure::set_region() is virtual:

class OopsInHeapRegionClosure: public OopsInGenClosure {
protected:
  HeapRegion* _from;
public:
  virtual void set_region(HeapRegion* from) { _from = from; }
};

This seems to be so that two subclasses, FilterInHeapRegionAndIntoCSClosure and FilterAndMarkInHeapRegionAndIntoCSClosure, can overwrite it. It turns out that these two subclasses are not used. So, we should remove them and make set_region() non-virtual.

set_region() is used a fair amount during evacuation pauses so this might have a performance benefit.

                                    

Comments
SUGGESTED FIX

Remove the two closures, make set_region() non-virtual.
                                     
2011-05-17
EVALUATION

See Description.
                                     
2011-05-17
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/ae5b2f1dcf12
                                     
2011-06-09
EVALUATION

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

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

See main CR
                                     
2011-09-12



Hardware and Software, Engineered to Work Together