summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2015-12-22 11:09:18 -0800
committerHiroshi Yamauchi <yamauchi@google.com>2016-05-23 10:50:36 -0700
commit8e67465aa57ee58425be8812c8dba2f7f59cdc2e (patch)
treeb9ec80a0978d3a4d42a38efe1cee0e9a01696b47 /compiler/optimizing/graph_visualizer.cc
parent20eef176101924d5047895214bad4e73b8ae35ec (diff)
Avoid the need for the black color for the baker-style read barrier.
We used to set marked-through non-moving objects to black to distinguish between an unmarked object and a marked-through object (both would be white without black). This was to avoid a rare case where a marked-through (white) object would be incorrectly set to gray for a second time (and left gray) after it's marked through (white/unmarked -> gray/marked -> white/marked-through -> gray/incorrect). If an object is left gray, the invariant would be broken that all objects are white when GC isn't running. Also, we needed to have an extra pass over non-moving objects to change them from black to white after the marking phase. To avoid the need for the black color, we use a 'false gray' stack to detect such rare cases and register affected objects on it and change the objects to white at the end of the marking phase. This saves some GC time because we can avoid the gray-to-black CAS per non-moving object as well as the extra pass over non-moving objects. Ritzperf EAAC (N6): Avg GC time: 232 -> 183 ms (-21%) Total GC time: 15.3 -> 14.1 s (-7.7%) Bug: 12687968 Change-Id: Idb29c3dcb745b094bcf6abc4db646dac9cbd1f71
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions