From ca5ed9f281a5758814d2495da80178de56945720 Mon Sep 17 00:00:00 2001 From: Lokesh Gidra Date: Wed, 20 Apr 2022 01:39:28 +0000 Subject: Convert kUseReadBarrier to static const from constexpr This CL would compile both CC and userfaultfd GC in the art library, enabling us to choose either of the two during boot time depending on whether the device has userfaultfd kernel feature or not. The CC GC is still chosen unless we use ART_USE_READ_BARRIER=false during build time. This behavior will later be changed to choosing CC *only* if ART_USE_READ_BARRIER=true is used. In other cases, if the device has userfaultfd support then that GC will be chosen. Bug: 160737021 Bug: 230021033 Test: art/test/testrunner/testrunner.py Change-Id: I370f1a9f6b8cdff8c2ce3cf7aa936bccd7ed675f --- runtime/common_runtime_test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/common_runtime_test.h') diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h index 9fa9c5d7e5..e1360730d6 100644 --- a/runtime/common_runtime_test.h +++ b/runtime/common_runtime_test.h @@ -305,7 +305,7 @@ class CheckJniAbortCatcher { } #define TEST_DISABLED_WITHOUT_BAKER_READ_BARRIERS() \ - if (!kEmitCompilerReadBarrier || !kUseBakerReadBarrier) { \ + if (!gUseReadBarrier || !kUseBakerReadBarrier) { \ printf("WARNING: TEST DISABLED FOR GC WITHOUT BAKER READ BARRIER\n"); \ return; \ } @@ -317,7 +317,7 @@ class CheckJniAbortCatcher { } #define TEST_DISABLED_FOR_MEMORY_TOOL_WITH_HEAP_POISONING_WITHOUT_READ_BARRIERS() \ - if (kRunningOnMemoryTool && kPoisonHeapReferences && !kEmitCompilerReadBarrier) { \ + if (kRunningOnMemoryTool && kPoisonHeapReferences && !gUseReadBarrier) { \ printf("WARNING: TEST DISABLED FOR MEMORY TOOL WITH HEAP POISONING WITHOUT READ BARRIERS\n"); \ return; \ } -- cgit v1.2.3-59-g8ed1b