ladybird/Userland/Libraries/LibJS/Heap
Aliaksandr Kalenik 0ff29349e6 LibJS: Add GC graph dumper
This change introduces a very basic GC graph dumper. The `dump_graph()`
function outputs JSON data that contains information about all nodes in
the graph, including their class types and edges.

Root nodes will have a property indicating their root type or source
location if the root is captured by a SafeFunction. It would be useful
to add source location for other types of roots in the future.

Output JSON dump have following format:
```json
    "4908721208": {
        "class_name": "Accessor",
        "edges": [
            "4909298232",
            "4909297976"
        ]
    },
    "4907520440": {
        "root": "SafeFunction Optional Optional.h:137",
        "class_name": "Realm",
        "edges": [
            "4908269624",
            "4924821560",
            "4908409240",
            "4908483960",
            "4924527672"
        ]
    },
    "4908251320": {
        "class_name": "CSSStyleRule",
        "edges": [
            "4908302648",
            "4925101656",
            "4908251192"
        ]
    },
```
2023-08-17 18:27:02 +02:00
..
BlockAllocator.cpp
BlockAllocator.h
Cell.cpp LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Cell.h LibJS: Mark classes and virtual functions final where possible 2023-08-13 18:05:09 +02:00
CellAllocator.cpp
CellAllocator.h
DeferGC.h
GCPtr.h LibJS+LibWeb: Mark NonnullGCPtr::ptr() as returns_nonnull 2023-08-07 22:20:03 -04:00
Handle.cpp
Handle.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
Heap.cpp LibJS: Add GC graph dumper 2023-08-17 18:27:02 +02:00
Heap.h LibJS: Add GC graph dumper 2023-08-17 18:27:02 +02:00
HeapBlock.cpp LibJS: Resolve a circular include problem between HeapBlock and Cell 2023-07-11 09:38:37 +03:30
HeapBlock.h LibJS: Resolve a circular include problem between HeapBlock and Cell 2023-07-11 09:38:37 +03:30
HeapRootTypeOrLocation.h LibJS: Add GC graph dumper 2023-08-17 18:27:02 +02:00
Internals.h LibJS: Resolve a circular include problem between HeapBlock and Cell 2023-07-11 09:38:37 +03:30
MarkedVector.cpp
MarkedVector.h LibJS: Add GC graph dumper 2023-08-17 18:27:02 +02:00