mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:47:34 +00:00
LibJS: Add source location for Handle nodes in GC graph dumper output
With this change JS::Handle root nodes will contain source location where they were constructed like: ``` "94675029575744": { "root": "Handle activate_event_handler \ serenity/Userland/Libraries/LibWeb/DOM/EventTarget.cpp:564", "class_name": "HTMLButtonElement", "edges": [ "94675025955904", "94675026899520", "94675030831168", ```
This commit is contained in:
parent
4b06cef93a
commit
719a00df3a
9 changed files with 129 additions and 121 deletions
|
@ -19,7 +19,7 @@
|
|||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Heap/CellAllocator.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibJS/Heap/HeapRootTypeOrLocation.h>
|
||||
#include <LibJS/Heap/HeapRoot.h>
|
||||
#include <LibJS/Heap/Internals.h>
|
||||
#include <LibJS/Heap/MarkedVector.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
|
@ -88,10 +88,10 @@ private:
|
|||
|
||||
Cell* allocate_cell(size_t);
|
||||
|
||||
void gather_roots(HashMap<Cell*, HeapRootTypeOrLocation>&);
|
||||
void gather_conservative_roots(HashMap<Cell*, HeapRootTypeOrLocation>&);
|
||||
void gather_asan_fake_stack_roots(HashMap<FlatPtr, HeapRootTypeOrLocation>&, FlatPtr);
|
||||
void mark_live_cells(HashMap<Cell*, HeapRootTypeOrLocation> const& live_cells);
|
||||
void gather_roots(HashMap<Cell*, HeapRoot>&);
|
||||
void gather_conservative_roots(HashMap<Cell*, HeapRoot>&);
|
||||
void gather_asan_fake_stack_roots(HashMap<FlatPtr, HeapRoot>&, FlatPtr);
|
||||
void mark_live_cells(HashMap<Cell*, HeapRoot> const& live_cells);
|
||||
void finalize_unmarked_cells();
|
||||
void sweep_dead_cells(bool print_report, Core::ElapsedTimer const&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue