Commit fb855334 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

[heap] Fix --trace-gc-object-stats stats in debug builds

Bug: v8:11708
Change-Id: Ibf0f91b9e63646f226a2e70ec4a1733820e968ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3373135
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78538}
parent db77f7fb
......@@ -1101,6 +1101,9 @@ class ObjectStatsVisitor {
namespace {
void IterateHeap(Heap* heap, ObjectStatsVisitor* visitor) {
// We don't perform a GC while collecting object stats but need this scope for
// the nested SafepointScope inside CombinedHeapObjectIterator.
AllowGarbageCollection allow_gc;
CombinedHeapObjectIterator iterator(heap);
for (HeapObject obj = iterator.Next(); !obj.is_null();
obj = iterator.Next()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment