Disable the CC collector / read barrier checks in non-debug build.
Bug: 12687968
Change-Id: Ia8295354b705018ffa864eb8101aa5c09528af13
diff --git a/runtime/read_barrier.h b/runtime/read_barrier.h
index b7bd99b..42e959c 100644
--- a/runtime/read_barrier.h
+++ b/runtime/read_barrier.h
@@ -37,11 +37,10 @@
class ReadBarrier {
public:
- // TODO: disable thse flags for production use.
// Enable the to-space invariant checks.
- static constexpr bool kEnableToSpaceInvariantChecks = true;
+ static constexpr bool kEnableToSpaceInvariantChecks = kIsDebugBuild;
// Enable the read barrier checks.
- static constexpr bool kEnableReadBarrierInvariantChecks = true;
+ static constexpr bool kEnableReadBarrierInvariantChecks = kIsDebugBuild;
// It's up to the implementation whether the given field gets updated whereas the return value
// must be an updated reference unless kAlwaysUpdateField is true.