From 886d676de3c7ca299695cf2033516ca5b4ac1fe5 Mon Sep 17 00:00:00 2001 From: Mythri A Date: Thu, 23 Apr 2020 11:59:14 +0100 Subject: [PATCH] [log] Update LogAllMaps to also log maps from readonly space With --trace-maps, we log all maps in the heap at the end of bootstrapping. LogAllMaps scans through the heap and logs a map-create even for all the maps in the heap. This cl updates this function to also look for maps in the read only space. Change-Id: I50025a909691be8dca3455c0583a0392b4756aef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2162725 Reviewed-by: Ross McIlroy Commit-Queue: Mythri Alle Cr-Commit-Position: refs/heads/master@{#67366} --- src/logging/log.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/logging/log.cc b/src/logging/log.cc index dc79ffda5e..fbcf1b0148 100644 --- a/src/logging/log.cc +++ b/src/logging/log.cc @@ -19,6 +19,7 @@ #include "src/execution/runtime-profiler.h" #include "src/execution/vm-state-inl.h" #include "src/handles/global-handles.h" +#include "src/heap/combined-heap.h" #include "src/init/bootstrapper.h" #include "src/interpreter/bytecodes.h" #include "src/interpreter/interpreter.h" @@ -1838,7 +1839,7 @@ void Logger::LogAccessorCallbacks() { void Logger::LogAllMaps() { DisallowHeapAllocation no_gc; Heap* heap = isolate_->heap(); - HeapObjectIterator iterator(heap); + CombinedHeapObjectIterator iterator(heap); for (HeapObject obj = iterator.Next(); !obj.is_null(); obj = iterator.Next()) { if (!obj.IsMap()) continue;