Revert "Revert CC related changes."
Disable entrypoint switching in ResetQuickAllocEntryPointsForThread
instead of callers. Fixes bug where instrumentation would switch
to non CC entrypoints for non X86_64 architectures causing aborts.
Bug: 31018974
Test: test-art-host
Test: test/run-test 099
This reverts commit 96172e0172c5fca6e9a5ad4b857a24d8c7b064e5.
Change-Id: If206694ae35ff4446c6a8a97bfbcbf2dac35e3f9
diff --git a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
index 397655a..82bb8e5 100644
--- a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
@@ -292,7 +292,7 @@
entry_points_instrumented = instrumented;
}
-void ResetQuickAllocEntryPoints(QuickEntryPoints* qpoints) {
+void ResetQuickAllocEntryPoints(QuickEntryPoints* qpoints, bool is_marking) {
#if !defined(__APPLE__) || !defined(__LP64__)
switch (entry_points_allocator) {
case gc::kAllocatorTypeDlMalloc: {
@@ -320,7 +320,12 @@
}
case gc::kAllocatorTypeRegionTLAB: {
CHECK(kMovingCollector);
- SetQuickAllocEntryPoints_region_tlab(qpoints, entry_points_instrumented);
+ if (is_marking) {
+ SetQuickAllocEntryPoints_region_tlab(qpoints, entry_points_instrumented);
+ } else {
+ // Not marking means we need no read barriers and can just use the normal TLAB case.
+ SetQuickAllocEntryPoints_tlab(qpoints, entry_points_instrumented);
+ }
return;
}
default:
@@ -328,6 +333,7 @@
}
#else
UNUSED(qpoints);
+ UNUSED(is_marking);
#endif
UNIMPLEMENTED(FATAL);
UNREACHABLE();