[profiler] Partially disable GCmole in V8HeapExplorer::AddEntry

GetConstructorName might allocate and thus triggers gcmole warnings.
This is a temporary workaround until the called function is cleanly
fixed.

Bug: v8:12674
Change-Id: I43bd190d887abcd79116e8c328ceedfb0c9fad79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497769
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79333}
This commit is contained in:
Camillo Bruni 2022-03-02 18:06:44 +01:00 committed by V8 LUCI CQ
parent 32634b571c
commit 2fa1f0457a

View File

@ -809,6 +809,8 @@ HeapEntry* V8HeapExplorer::AddEntry(HeapObject object) {
JSRegExp re = JSRegExp::cast(object);
return AddEntry(object, HeapEntry::kRegExp, names_->GetName(re.source()));
} else if (object.IsJSObject()) {
// TODO(v8:12674) Fix and run full gcmole.
DisableGCMole no_gcmole;
const char* name = names_->GetName(
GetConstructorName(heap_->isolate(), JSObject::cast(object)));
if (object.IsJSGlobalObject()) {