United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7121547 G1: High number of mispredicted branches while iterating over the marking bitmap
JDK-7121547 : G1: High number of mispredicted branches while iterating over the marking bitmap

Details
Type:
Enhancement
Submit Date:
2011-12-14
Status:
Closed
Updated Date:
2013-10-04
Project Name:
JDK
Resolved Date:
2012-03-24
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:
hs23 (b12)

Related Reports
Backport:
Backport:

Sub Tasks

Description
While analysing performance data from benchmark runs using the changes in 6484965 (Piggy-back liveness accounting phase on marking) it was observed that there were a high number of mispredicted branches coming from CMTask::do_marking_step().

Further analysis indicated that these mispredicted branches were the actual call of the BitMap::iterate function. This is caused by a couple of reasons - first BitMap::iterate is defined in the .cpp file and so cannot be inlined.

We might be able to do better by actually implementing a version of the "iterate" routine using inline-able routines from BitMap and using the object sizes to increase the granularity of the iteration.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/2e966d967c5c
                                     
2012-03-22
EVALUATION

There is a high number of mispredicted branches associated with calling BitMap::iteratate() from within CMBitMapRO::iterate. The reason seems to be that BitMap::iterate can not be inlined.

We could implement CMBitMapRO::iterate directly using inline-able routines. This would require no interface changes to the actual marking bitmap itself and no changes to the calling code.
                                     
2011-12-20
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/2e966d967c5c
                                     
2012-01-14
SUGGESTED FIX

Implement CMBitMapRO::iterate routines using the get_next_one_offset() from the BitMap class and the sizes of marked objects.
                                     
2012-01-17



Hardware and Software, Engineered to Work Together