diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/gc/collector/mark_compact.cc | 6 | ||||
-rw-r--r-- | runtime/runtime.cc | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc index fafd8b55b4..cb314c5403 100644 --- a/runtime/gc/collector/mark_compact.cc +++ b/runtime/gc/collector/mark_compact.cc @@ -4824,6 +4824,12 @@ void MarkCompact::FinishPhase(bool performed_compaction) { compacting_ = false; marking_done_ = false; uint8_t* mark_bitmap_clear_end = black_dense_end_; + LOG(INFO) << " black_dense_end:" << static_cast<void*>(black_dense_end_) + << " mid_gen_end:" << static_cast<void*>(mid_gen_end_) + << " post_compact_end:" << static_cast<void*>(post_compact_end_) + << " black_allocations_begin:" << static_cast<void*>(black_allocations_begin_) + << " young:" << young_gen_ << " performed_compaction:" << performed_compaction; + // Retain values of some fields for logging in next GC cycle, in case there is // a memory corruption detected. prev_black_allocations_begin_ = static_cast<void*>(black_allocations_begin_); diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 23e06ab792..a1b77743cf 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1790,6 +1790,9 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) { (gUseUserfaultfd ? BackgroundGcOption(gc::kCollectorTypeCMCBackground) : runtime_options.GetOrDefault(Opt::BackgroundGc)); + bool verify_post_gc_heap = xgc_option.verify_post_gc_heap_ && + (android::base::GetProperty("ro.build.type", "") != "user"); + heap_ = new gc::Heap(runtime_options.GetOrDefault(Opt::MemoryInitialSize), runtime_options.GetOrDefault(Opt::HeapGrowthLimit), runtime_options.GetOrDefault(Opt::HeapMinFree), @@ -1822,7 +1825,7 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) { runtime_options.GetOrDefault(Opt::UseTLAB), xgc_option.verify_pre_gc_heap_, xgc_option.verify_pre_sweeping_heap_, - xgc_option.verify_post_gc_heap_, + verify_post_gc_heap, xgc_option.verify_pre_gc_rosalloc_, xgc_option.verify_pre_sweeping_rosalloc_, xgc_option.verify_post_gc_rosalloc_, |