United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7173712 G1: Duplicated code in G1UpdateRSOrPushRefOopClosure::do_oop_nv()
JDK-7173712 : G1: Duplicated code in G1UpdateRSOrPushRefOopClosure::do_oop_nv()

Details
Type:
Enhancement
Submit Date:
2012-06-01
Status:
Resolved
Updated Date:
2013-04-30
Project Name:
JDK
Resolved Date:
2012-08-07
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:
hs24 (b19)

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
While looking at a collect profile that was generated for the ATG CRM demo, it was notcied that a fairly high amount of CPU time was being spent in the code for G1RemSet::par_write_ref() that had been inlined into G1UpdateRSOrPushRefOopClosure::do_oop_nv().

In the profile it was observed that the actual high CPU time was actually coming from looking up the region for the supplied object.

In the profile analyzer disassembly it was observed that offending piece of code in G1RemSet::par_write_ref() duplicated code in G1UpdateRSOrPushRef::do_oop_nv(). In do_oop_nv() the same code did not seem to incur any penalty.

The code in do_oop_nv() should be refactored to avoid the redundant checks that are also performed if we execute the path the calls G1RemSet::par_write_ref().

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/594dff5e3c2e
                                     
2012-07-18
SUGGESTED FIX

Refactor code to manually inline the non-duplicated code (leaving the duplicated call to get the heap region and the duplicated cross-region check out).
                                     
2012-07-18
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/594dff5e3c2e
                                     
2012-08-06
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/594dff5e3c2e
                                     
2012-08-14



Hardware and Software, Engineered to Work Together