Revert "Avoid adding region space bitmap to heap bitmap"
This reverts commit fdb7d5d882a5f18326746cd92e83473be48231eb.
Test failures due to failing the added DCHECK.
Bug: 34967844
Change-Id: If4a6ec70330c7f773b550481c3dd2e7a2e5d4f9a
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index a78de37..0a45fce 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -987,9 +987,7 @@
// Continuous spaces don't necessarily have bitmaps.
accounting::ContinuousSpaceBitmap* live_bitmap = continuous_space->GetLiveBitmap();
accounting::ContinuousSpaceBitmap* mark_bitmap = continuous_space->GetMarkBitmap();
- // The region space bitmap is not added since VisitObjects visits the region space objects with
- // special handling.
- if (live_bitmap != nullptr && !space->IsRegionSpace()) {
+ if (live_bitmap != nullptr) {
CHECK(mark_bitmap != nullptr);
live_bitmap_->AddContinuousSpaceBitmap(live_bitmap);
mark_bitmap_->AddContinuousSpaceBitmap(mark_bitmap);
@@ -1030,7 +1028,7 @@
// Continuous spaces don't necessarily have bitmaps.
accounting::ContinuousSpaceBitmap* live_bitmap = continuous_space->GetLiveBitmap();
accounting::ContinuousSpaceBitmap* mark_bitmap = continuous_space->GetMarkBitmap();
- if (live_bitmap != nullptr && !space->IsRegionSpace()) {
+ if (live_bitmap != nullptr) {
DCHECK(mark_bitmap != nullptr);
live_bitmap_->RemoveContinuousSpaceBitmap(live_bitmap);
mark_bitmap_->RemoveContinuousSpaceBitmap(mark_bitmap);
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index f390645..133502e 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -463,7 +463,6 @@
}
bool okay;
- visited_objects_.clear();
if (direct_to_ddms_) {
if (kDirectStream) {
okay = DumpToDdmsDirect(overall_size, max_length, CHUNK_TYPE("HPDS"));
@@ -912,9 +911,6 @@
// bits.
std::unordered_set<uint64_t> simple_roots_;
- // To make sure we don't dump the same object multiple times. b/34967844
- std::unordered_set<mirror::Object*> visited_objects_;
-
friend class GcRootVisitor;
DISALLOW_COPY_AND_ASSIGN(Hprof);
};
@@ -1097,7 +1093,6 @@
if (obj->IsClass() && obj->AsClass()->IsRetired()) {
return;
}
- DCHECK(visited_objects_.insert(obj).second) << "Already visited " << obj;
++total_objects_;