Merge "Use dlmalloc from external/dlmalloc instead of bionic/."
diff --git a/compiler/optimizing/code_generator_mips64.cc b/compiler/optimizing/code_generator_mips64.cc
index 0505486..e3115f4 100644
--- a/compiler/optimizing/code_generator_mips64.cc
+++ b/compiler/optimizing/code_generator_mips64.cc
@@ -964,11 +964,15 @@
return Location::NoLocation();
}
-void CodeGeneratorMIPS64::MarkGCCard(GpuRegister object, GpuRegister value) {
+void CodeGeneratorMIPS64::MarkGCCard(GpuRegister object,
+ GpuRegister value,
+ bool value_can_be_null) {
Mips64Label done;
GpuRegister card = AT;
GpuRegister temp = TMP;
- __ Beqzc(value, &done);
+ if (value_can_be_null) {
+ __ Beqzc(value, &done);
+ }
__ LoadFromOffset(kLoadDoubleword,
card,
TR,
@@ -976,7 +980,9 @@
__ Dsrl(temp, object, gc::accounting::CardTable::kCardShift);
__ Daddu(temp, card, temp);
__ Sb(card, temp, 0);
- __ Bind(&done);
+ if (value_can_be_null) {
+ __ Bind(&done);
+ }
}
void CodeGeneratorMIPS64::SetupBlockedRegisters() const {
@@ -1601,7 +1607,7 @@
codegen_->MaybeRecordImplicitNullCheck(instruction);
if (needs_write_barrier) {
DCHECK_EQ(value_type, Primitive::kPrimNot);
- codegen_->MarkGCCard(obj, value);
+ codegen_->MarkGCCard(obj, value, instruction->GetValueCanBeNull());
}
} else {
DCHECK_EQ(value_type, Primitive::kPrimNot);
@@ -2827,7 +2833,8 @@
}
void InstructionCodeGeneratorMIPS64::HandleFieldSet(HInstruction* instruction,
- const FieldInfo& field_info) {
+ const FieldInfo& field_info,
+ bool value_can_be_null) {
Primitive::Type type = field_info.GetFieldType();
LocationSummary* locations = instruction->GetLocations();
GpuRegister obj = locations->InAt(0).AsRegister<GpuRegister>();
@@ -2869,7 +2876,7 @@
if (CodeGenerator::StoreNeedsWriteBarrier(type, instruction->InputAt(1))) {
DCHECK(locations->InAt(1).IsRegister());
GpuRegister src = locations->InAt(1).AsRegister<GpuRegister>();
- codegen_->MarkGCCard(obj, src);
+ codegen_->MarkGCCard(obj, src, value_can_be_null);
}
}
@@ -2886,7 +2893,7 @@
}
void InstructionCodeGeneratorMIPS64::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
- HandleFieldSet(instruction, instruction->GetFieldInfo());
+ HandleFieldSet(instruction, instruction->GetFieldInfo(), instruction->GetValueCanBeNull());
}
void LocationsBuilderMIPS64::VisitInstanceOf(HInstanceOf* instruction) {
@@ -3810,7 +3817,7 @@
}
void InstructionCodeGeneratorMIPS64::VisitStaticFieldSet(HStaticFieldSet* instruction) {
- HandleFieldSet(instruction, instruction->GetFieldInfo());
+ HandleFieldSet(instruction, instruction->GetFieldInfo(), instruction->GetValueCanBeNull());
}
void LocationsBuilderMIPS64::VisitUnresolvedInstanceFieldGet(
diff --git a/compiler/optimizing/code_generator_mips64.h b/compiler/optimizing/code_generator_mips64.h
index 140ff95..08e5615 100644
--- a/compiler/optimizing/code_generator_mips64.h
+++ b/compiler/optimizing/code_generator_mips64.h
@@ -227,7 +227,9 @@
void HandleBinaryOp(HBinaryOperation* operation);
void HandleCondition(HCondition* instruction);
void HandleShift(HBinaryOperation* operation);
- void HandleFieldSet(HInstruction* instruction, const FieldInfo& field_info);
+ void HandleFieldSet(HInstruction* instruction,
+ const FieldInfo& field_info,
+ bool value_can_be_null);
void HandleFieldGet(HInstruction* instruction, const FieldInfo& field_info);
void GenerateImplicitNullCheck(HNullCheck* instruction);
void GenerateExplicitNullCheck(HNullCheck* instruction);
@@ -285,7 +287,7 @@
Mips64Assembler* GetAssembler() OVERRIDE { return &assembler_; }
const Mips64Assembler& GetAssembler() const OVERRIDE { return assembler_; }
- void MarkGCCard(GpuRegister object, GpuRegister value);
+ void MarkGCCard(GpuRegister object, GpuRegister value, bool value_can_be_null);
// Register allocation.
diff --git a/compiler/optimizing/intrinsics_mips64.cc b/compiler/optimizing/intrinsics_mips64.cc
index ac969e3..769c422 100644
--- a/compiler/optimizing/intrinsics_mips64.cc
+++ b/compiler/optimizing/intrinsics_mips64.cc
@@ -1141,7 +1141,8 @@
}
if (type == Primitive::kPrimNot) {
- codegen->MarkGCCard(base, value);
+ bool value_can_be_null = true; // TODO: Worth finding out this information?
+ codegen->MarkGCCard(base, value, value_can_be_null);
}
}
@@ -1287,6 +1288,12 @@
DCHECK_NE(offset, out);
DCHECK_NE(expected, out);
+ if (type == Primitive::kPrimNot) {
+ // Mark card for object assuming new value is stored.
+ bool value_can_be_null = true; // TODO: Worth finding out this information?
+ codegen->MarkGCCard(base, value, value_can_be_null);
+ }
+
// do {
// tmp_value = [tmp_ptr] - expected;
// } while (tmp_value == 0 && failure([tmp_ptr] <- r_new_value));
diff --git a/runtime/gc/collector/concurrent_copying.h b/runtime/gc/collector/concurrent_copying.h
index 5d21c59..76315fe 100644
--- a/runtime/gc/collector/concurrent_copying.h
+++ b/runtime/gc/collector/concurrent_copying.h
@@ -57,7 +57,7 @@
// Enable the from-space bytes/objects check.
static constexpr bool kEnableFromSpaceAccountingCheck = true;
// Enable verbose mode.
- static constexpr bool kVerboseMode = true;
+ static constexpr bool kVerboseMode = false;
ConcurrentCopying(Heap* heap, const std::string& name_prefix = "");
~ConcurrentCopying();
diff --git a/runtime/image.cc b/runtime/image.cc
index 3cb6642..4254d94 100644
--- a/runtime/image.cc
+++ b/runtime/image.cc
@@ -24,7 +24,7 @@
namespace art {
const uint8_t ImageHeader::kImageMagic[] = { 'a', 'r', 't', '\n' };
-const uint8_t ImageHeader::kImageVersion[] = { '0', '2', '5', '\0' };
+const uint8_t ImageHeader::kImageVersion[] = { '0', '2', '6', '\0' };
ImageHeader::ImageHeader(uint32_t image_begin,
uint32_t image_size,
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index 48e10c3..36dd9f4 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -621,11 +621,6 @@
TEST_ART_BROKEN_MULTI_IMAGE_RUN_TESTS :=
-# Test is flaky b/26733951.
-ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
- $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
- $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),961-default-iface-resolution-generated,$(ALL_ADDRESS_SIZES))
-
# Clear variables ahead of appending to them when defining tests.
$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
$(foreach target, $(TARGET_TYPES), \
diff --git a/test/run-test b/test/run-test
index 033e2c6..faa597e 100755
--- a/test/run-test
+++ b/test/run-test
@@ -733,7 +733,10 @@
# To cause tests to fail fast, limit the file sizes created by dx, dex2oat and ART output to 2MB.
build_file_size_limit=2048
run_file_size_limit=2048
-if echo "$test_dir" | grep -Eq "(083|089|964|971)" > /dev/null; then
+
+# Add tests requiring a higher ulimit to this list. Ulimits might need to be raised to deal with
+# large amounts of expected output or large generated files.
+if echo "$test_dir" | grep -Eq "(083|089|961|964|971)" > /dev/null; then
build_file_size_limit=5120
run_file_size_limit=5120
fi
diff --git a/tools/libcore_failures_concurrent_collector.txt b/tools/libcore_failures_concurrent_collector.txt
index 6ea83d2..95d1292 100644
--- a/tools/libcore_failures_concurrent_collector.txt
+++ b/tools/libcore_failures_concurrent_collector.txt
@@ -34,5 +34,13 @@
"libcore.java.util.zip.ZipFileTest#testZipFileWithLotsOfEntries",
"libcore.java.util.zip.ZipInputStreamTest#testLongMessage"],
bug: 26507762
+},
+{
+ description: "TimeoutException on hammerhead-concurrent-collector",
+ result: EXEC_FAILED,
+ modes: [device],
+ names: ["libcore.icu.RelativeDateTimeFormatterTest#test_bug25821045",
+ "libcore.java.text.SimpleDateFormatTest#testLocales"],
+ bug: 26711853
}
]