summaryrefslogtreecommitdiffstats
path: root/runtime/globals.h
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2014-03-31 15:14:47 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2014-03-31 17:40:21 -0700
commit624468cd401cc1ac0dd70c746301e0788a597759 (patch)
treeb21c389d43e25c3d95208c9d2f3f1bc81355a4e5 /runtime/globals.h
parentcfd5acf281b0c509f86b13d73c6a8dfa3ea9922c (diff)
downloadart-624468cd401cc1ac0dd70c746301e0788a597759.zip
art-624468cd401cc1ac0dd70c746301e0788a597759.tar.gz
art-624468cd401cc1ac0dd70c746301e0788a597759.tar.bz2
Make the support code for read barriers a bit more general.
Add an option for Baker in addition to Brooks. Bug: 12687968 Change-Id: I8a31db817ff6686c72951b6534f588228e270b11
Diffstat (limited to 'runtime/globals.h')
-rw-r--r--runtime/globals.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/runtime/globals.h b/runtime/globals.h
index 9c6fa0d..f2d6862 100644
--- a/runtime/globals.h
+++ b/runtime/globals.h
@@ -19,7 +19,7 @@
#include <stddef.h>
#include <stdint.h>
-#include "brooks_pointer.h"
+#include "read_barrier.h"
namespace art {
@@ -97,12 +97,20 @@ static constexpr bool kMovingMethods = false;
// code, if possible.
static constexpr bool kEmbedClassInCode = true;
-#ifdef USE_BROOKS_POINTER
-static constexpr bool kUseBrooksPointer = true;
+#ifdef USE_BAKER_READ_BARRIER
+static constexpr bool kUseBakerReadBarrier = true;
#else
-static constexpr bool kUseBrooksPointer = false;
+static constexpr bool kUseBakerReadBarrier = false;
#endif
+#ifdef USE_BROOKS_READ_BARRIER
+static constexpr bool kUseBrooksReadBarrier = true;
+#else
+static constexpr bool kUseBrooksReadBarrier = false;
+#endif
+
+static constexpr bool kUseBakerOrBrooksReadBarrier = kUseBakerReadBarrier || kUseBrooksReadBarrier;
+
// If true, references within the heap are poisoned (negated).
static constexpr bool kPoisonHeapReferences = false;