LibGC+Meta: Include inline frames in the GC explorer's stack trace
This commit is contained in:
parent
03284abee9
commit
a3922aa570
2 changed files with 22 additions and 3 deletions
|
|
@ -532,8 +532,10 @@ NO_SANITIZE_ADDRESS void Heap::gather_conservative_roots(HashMap<Cell*, HeapRoot
|
|||
size_t raw_frame_index = 0;
|
||||
for (size_t i = 0; i < resolved.frames.size() && raw_frame_index < frame_starts.size(); ++i) {
|
||||
auto const& frame = resolved.frames[i];
|
||||
if (frame.is_inline)
|
||||
if (frame.is_inline) {
|
||||
out_stack_frames->append({ .label = format_frame_label(frame) });
|
||||
continue;
|
||||
}
|
||||
|
||||
auto frame_label_index = static_cast<u32>(out_stack_frames->size());
|
||||
auto frame_start = frame_starts[raw_frame_index];
|
||||
|
|
|
|||
|
|
@ -958,6 +958,22 @@
|
|||
color: var(--accent-cyan);
|
||||
}
|
||||
|
||||
.stack-frame-item.inline {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.stack-frame-item.inline.highlighted {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.stack-frame-item.inline .stack-frame-size {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stack-frame-item.inline .stack-frame-symbol {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.root-category-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -1738,10 +1754,11 @@
|
|||
stackFrameElements = [];
|
||||
for (let i = 0; i < stackFrames.length; i++) {
|
||||
const frame = stackFrames[i];
|
||||
const isInline = frame.size === 0;
|
||||
const el = document.createElement('div');
|
||||
el.className = 'stack-frame-item';
|
||||
el.className = 'stack-frame-item' + (isInline ? ' inline' : '');
|
||||
el.innerHTML = `<span class="stack-frame-index">${i}</span>`
|
||||
+ `<span class="stack-frame-size">${formatSize(frame.size)}</span>`
|
||||
+ `<span class="stack-frame-size">${isInline ? '-' : formatSize(frame.size)}</span>`
|
||||
+ `<span class="stack-frame-symbol">${escapeHtml(insertWordBreaks(frame.label) || '???')}</span>`;
|
||||
content.appendChild(el);
|
||||
stackFrameElements.push(el);
|
||||
|
|
|
|||
Loading…
Reference in a new issue