diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-03-04 01:15:09 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-03-04 01:15:10 +0000 |
commit | a071575c616f1f8f6d462cc74e04cebf1b7e276d (patch) | |
tree | cf5177e9a1d762f72bd8dea971091a0ee3c3ecd6 /runtime/gc | |
parent | 55a0b53de40d6445447b80aff8f0d8a480de0d77 (diff) | |
parent | c2f4d0240b3a9b905dff5b546924865f15241481 (diff) | |
download | art-a071575c616f1f8f6d462cc74e04cebf1b7e276d.zip art-a071575c616f1f8f6d462cc74e04cebf1b7e276d.tar.gz art-a071575c616f1f8f6d462cc74e04cebf1b7e276d.tar.bz2 |
Merge "Fix SafePrettyTypeOf to never call VerifyObject."
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/accounting/card_table-inl.h | 1 | ||||
-rw-r--r-- | runtime/gc/heap.cc | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/runtime/gc/accounting/card_table-inl.h b/runtime/gc/accounting/card_table-inl.h index 841f4ae..564168e 100644 --- a/runtime/gc/accounting/card_table-inl.h +++ b/runtime/gc/accounting/card_table-inl.h @@ -154,6 +154,7 @@ inline void CardTable::ModifyCardsAtomic(byte* scan_begin, byte* scan_end, const // Now we have the words, we can process words in parallel. uintptr_t* word_cur = reinterpret_cast<uintptr_t*>(card_cur); uintptr_t* word_end = reinterpret_cast<uintptr_t*>(card_end); + // TODO: This is not big endian safe. union { uintptr_t expected_word; uint8_t expected_bytes[sizeof(uintptr_t)]; diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 89601ff..fc591e7 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -329,10 +329,10 @@ std::string Heap::SafeGetClassDescriptor(mirror::Class* klass) { return result; } else if (UNLIKELY(klass->IsPrimitive<kVerifyNone>())) { return Primitive::Descriptor(klass->GetPrimitiveType<kVerifyNone>()); - } else if (UNLIKELY(klass->IsProxyClass())) { + } else if (UNLIKELY(klass->IsProxyClass<kVerifyNone>())) { return Runtime::Current()->GetClassLinker()->GetDescriptorForProxy(klass); } else { - mirror::DexCache* dex_cache = klass->GetDexCache(); + mirror::DexCache* dex_cache = klass->GetDexCache<kVerifyNone>(); if (!IsValidContinuousSpaceObjectAddress(dex_cache)) { return StringPrintf("<non heap address dex_cache %p>", dex_cache); } @@ -357,7 +357,7 @@ std::string Heap::SafePrettyTypeOf(mirror::Object* obj) { } std::string result(SafeGetClassDescriptor(klass)); if (obj->IsClass()) { - result += "<" + SafeGetClassDescriptor(obj->AsClass()) + ">"; + result += "<" + SafeGetClassDescriptor(obj->AsClass<kVerifyNone>()) + ">"; } return result; } @@ -393,7 +393,7 @@ void Heap::DumpObject(std::ostream& stream, mirror::Object* obj) { if (space != nullptr) { stream << " in space " << *space; } - mirror::Class* klass = obj->GetClass(); + mirror::Class* klass = obj->GetClass<kVerifyNone>(); stream << "\nclass=" << klass; if (klass != nullptr) { stream << " type= " << SafePrettyTypeOf(obj); |