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().