[heap] Fix --gc-verbose flag

Calling Heap::Print in GC is not safe because the function tries
to print the stack and may allocate.

Change-Id: I48fe29863076792657e2184c52d355821375f969
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2835239
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74695}
This commit is contained in:
Ulan Degenbaev 2021-04-19 12:57:02 +02:00 committed by V8 LUCI CQ
parent 3871bc8466
commit 735471b366

View File

@ -1291,7 +1291,6 @@ void Heap::GarbageCollectionEpilogueInSafepoint(GarbageCollector collector) {
if (FLAG_print_global_handles) isolate_->global_handles()->Print();
if (FLAG_print_handles) PrintHandles();
if (FLAG_gc_verbose) Print();
if (FLAG_code_stats) ReportCodeStatistics("After GC");
if (FLAG_check_handle_count) CheckHandleCount();
#endif