We don't need to pass the filter and sort to the render function from
all these locations, the callers always use values from the same
inputs. Instead, just use the values directly from cached references
the input elements.
This fixes the class filter not being applied correctly after a refresh
autofills the old value back into it.
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.
Remove `word-break: break-all` and instead insert word breaks before
each transition from non-word to word characters. As an example, with
breaks represented by vertical bars:
Foo<|Bar>::|baz()
Thus, when wrapping a line, it'll break on whitespace, or on characters
indicating that there is more to follow.
When dumping a GC graph, we now write the output as a .js file
containing `var GC_GRAPH_DUMP = <json>;` instead of raw JSON.
This allows gc-heap-explorer.html to load the dump via a
dynamically created <script> element, avoiding CORS restrictions
that prevent file:// pages from fetching other file:// URLs.
After dumping, both the browser and test-web print a clickable
file:// URL that opens the heap explorer with the dump pre-loaded.
The heap explorer's drag-and-drop file picker also accepts both
the new .js format and plain .json files.
This adds a self-contained HTML tool for visualizing and exploring
LibGC heap dumps (JSON format). Features include:
- Drag-and-drop JSON file loading
- Class breakdown with filtering and sorting
- Interactive force-directed graph visualization
- Toggle between incoming/outgoing edge focus
- Node detail panel with edges and path-to-root finder
- Search by pointer address (hex or decimal)
- Collapsible root node browser
The tool is useful for investigating memory leaks and understanding
object retention in the GC heap.