OSDN Git Service

Fix a check failure in the CC background transition.
authorHiroshi Yamauchi <yamauchi@google.com>
Wed, 31 Aug 2016 00:44:41 +0000 (17:44 -0700)
committerHiroshi Yamauchi <yamauchi@google.com>
Wed, 31 Aug 2016 00:51:57 +0000 (17:51 -0700)
commita01d06618b08688472d2609220c3ba9c9d6de6f4
tree94f1320b6664702067c73066e829226ce8fe0d7d
parent9495e0c56b25349220aed7adb997d81f9b0c86cc
Fix a check failure in the CC background transition.

If there's a process state update from jank perceptible to jank
in-perceptible and a reverse update right after it, there's a chance
that the heap task daemon sees desired_collector_type ==
kCollectorTypeCC rather than kCollectorTypeCCBackground in
DoPendingCollectorTransition() which leads to a !kUseReadBarrier check
failure in TransitionCollector(). The fix is to move this check after
the early return case where collector_type == collector_type_ in
TransitionCollector() like the CMS/Hspace case.

Bug: 31039431
Bug: 12687968
Test: test-art-host, aosp boot with CC, master boot with CC.

Change-Id: I5fe34cb41eaa01c6d8bf80a185253fde6778e852
runtime/gc/heap.cc