Commit 5f1eed24 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[turbolizer] Only add offsets if they are available

In the case where we fail on the 'before register allocation' phase,
we will have the instructions to print, but turbolizer will fail to
show them because it will look for the non-existent offsets.

Bug: v8:7327
Change-Id: I52e520dcb662fe9931f1bb29cd2c16cd62913158
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1889883Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64650}
parent d7d44e69
......@@ -102,7 +102,9 @@ export class SequenceView extends TextView {
const offsets = view.sourceResolver.instructionToPcOffsets(instruction.id);
instId.classList.add("clickable");
instId.dataset.instructionId = instruction.id;
instId.setAttribute("title", `This instruction generated gap code at pc-offset 0x${offsets.gap.toString(16)}, code at pc-offset 0x${offsets.arch.toString(16)}, condition handling at pc-offset 0x${offsets.condition.toString(16)}.`);
if (offsets) {
instId.setAttribute("title", `This instruction generated gap code at pc-offset 0x${offsets.gap.toString(16)}, code at pc-offset 0x${offsets.arch.toString(16)}, condition handling at pc-offset 0x${offsets.condition.toString(16)}.`);
}
instNodeEl.appendChild(instId);
const instContentsEl = createElement("div", "instruction-contents");
......
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