Files
ladybird/Libraries/LibGC/HeapRoot.h
Zaggy1024 1a3e8fdf60 LibGC+Meta: Look up and display stack frames for StackPointer roots
This adds a stack trace to the JSON output from GC graph dumps which
is shown in a default-collapsed tray on the right side of the graph
explorer. When a stack pointer root is selected, the stack frame it
originated from is highlighted in the tray.
2026-03-01 21:50:51 +01:00

34 lines
609 B
C++

/*
* Copyright (c) 2023-2025, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Optional.h>
#include <AK/SourceLocation.h>
#include <LibGC/Export.h>
namespace GC {
struct GC_API HeapRoot {
enum class Type {
ConservativeVector,
HeapFunctionCapturedPointer,
MustSurviveGC,
RegisterPointer,
Root,
RootHashMap,
RootVector,
StackPointer,
VM,
};
Type type;
SourceLocation const* location { nullptr };
Optional<u32> stack_frame_index {};
};
}