Commit 37ce416f authored by Seth Brenith's avatar Seth Brenith Committed by V8 LUCI CQ

[ext-code-space] Restore tagging of Code objects in heap snapshot

The heap snapshot generator is meant to apply descriptive names to Code
objects, but was using CodeDataContainer instead. Attempting to set the
name of the CodeDataContainer instances did nothing because they already
had the name "system / CodeDataContainer".

Bug: v8:11880
Change-Id: If7bd115bde36386d283d319c1ee28df565a39569
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3498849Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#79368}
parent 01b809d2
......@@ -1369,10 +1369,10 @@ void V8HeapExplorer::ExtractSharedFunctionInfoReferences(
HeapEntry* entry, SharedFunctionInfo shared) {
std::unique_ptr<char[]> name = shared.DebugNameCStr();
if (name[0] != '\0') {
TagObject(shared.GetCode(),
TagObject(FromCodeT(shared.GetCode()),
names_->GetFormatted("(code for %s)", name.get()));
} else {
TagObject(shared.GetCode(),
TagObject(FromCodeT(shared.GetCode()),
names_->GetFormatted("(%s code)",
CodeKindToString(shared.GetCode().kind())));
}
......
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