OSDN Git Service

Disable the CC collector / read barrier checks in non-debug build.
authorHiroshi Yamauchi <yamauchi@google.com>
Fri, 10 Jun 2016 21:27:38 +0000 (14:27 -0700)
committerHiroshi Yamauchi <yamauchi@google.com>
Fri, 10 Jun 2016 21:27:38 +0000 (14:27 -0700)
Bug: 12687968

Change-Id: Ia8295354b705018ffa864eb8101aa5c09528af13

runtime/gc/collector/concurrent_copying.h
runtime/read_barrier.h

index e9ff618..afdc0f1 100644 (file)
@@ -51,11 +51,10 @@ namespace collector {
 
 class ConcurrentCopying : public GarbageCollector {
  public:
-  // TODO: disable thse flags for production use.
   // Enable the no-from-space-refs verification at the pause.
-  static constexpr bool kEnableNoFromSpaceRefsVerification = true;
+  static constexpr bool kEnableNoFromSpaceRefsVerification = kIsDebugBuild;
   // Enable the from-space bytes/objects check.
-  static constexpr bool kEnableFromSpaceAccountingCheck = true;
+  static constexpr bool kEnableFromSpaceAccountingCheck = kIsDebugBuild;
   // Enable verbose mode.
   static constexpr bool kVerboseMode = false;
 
index b7bd99b..42e959c 100644 (file)
@@ -37,11 +37,10 @@ class ArtMethod;
 
 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.