summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2018-06-08 18:44:31 +0100
committer Roland Levillain <rpl@google.com> 2018-08-08 18:03:28 +0100
commit349af804d74c93e1dd3684f5cc5222ad2efbf80c (patch)
tree93a21a91c0610d1beb4087f34f06ed49a67f4340
parente21b437a58d7c02ccac3b72caf48af9bd814765f (diff)
Improve debugging in RegionSpace::PoisonDeadObjectsInUnevacuatedRegion.
Test: art/test.py Bug: 74064045 Bug: 67628039 Change-Id: Ibe78718740f26537f0b6cb6542bbf8d3e6e5b977
-rw-r--r--runtime/gc/space/region_space.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/gc/space/region_space.cc b/runtime/gc/space/region_space.cc
index f97b976e33..0569092bcd 100644
--- a/runtime/gc/space/region_space.cc
+++ b/runtime/gc/space/region_space.cc
@@ -16,6 +16,7 @@
#include "bump_pointer_space-inl.h"
#include "bump_pointer_space.h"
+#include "base/dumpable.h"
#include "gc/accounting/read_barrier_table.h"
#include "mirror/class-inl.h"
#include "mirror/object-inl.h"
@@ -465,7 +466,8 @@ void RegionSpace::PoisonDeadObjectsInUnevacuatedRegion(Region* r) {
// The live byte count of `r` should be different from -1, as this
// region should neither be a newly allocated region nor an
// evacuated region.
- DCHECK_NE(r->LiveBytes(), static_cast<size_t>(-1));
+ DCHECK_NE(r->LiveBytes(), static_cast<size_t>(-1))
+ << "Unexpected live bytes count of -1 in " << Dumpable<Region>(*r);
// Past-the-end address of the previously visited (live) object (or
// the beginning of the region, if `maybe_poison` has not run yet).