feat(debugger): heap snapshots of a debugged JVM (#2649)

Capture a heap dump of the debugged JVM over the attach listener (GC.heap_dump, after checking free disk space and the JDK's rules for suspended VMs) or open an .hprof file, and browse it in an editor tab: classes with shallow and retained sizes, biggest objects, dominators, the path from an object to a GC root, and a comparison of two snapshots. A snapshot captured at a stop adds a Retained Size column to that stop's Memory tab.

New crate ide-heap: HotSpot hprof parser (bounds-checked; unfinished or crafted dumps are refused), object graph, dominator tree (semi-NCA), retained sizes and GC-root paths. Snapshots live in private directories removed with their window; an opened dump is analyzed from a private copy so changes to the user's file can't affect the mapped data.

Co-authored-by: ntbang0901 <[email protected]>
Цей коміт міститься в:
ntbang0901 authored and GitHub committed 2026-11-11 17:43:07 +08:00
1 джерело 8fafde10b4
коміт 8d09479a65
100 files changed
+14207 -43

No files matched your search

+19
Переглянути файл
@@ -47,6 +47,19 @@
font-size: var(--fs-ui);
}
/* A row above the table: the table and the instances pane below it share what is left. */
.capture {
flex: none;
display: flex;
align-items: center;
gap: 12px;
padding-block: 4px;
border-bottom: 1px solid var(--border);
}
.captureBar {
flex: 0 1 160px;
}
.table {
flex: 1;
/* Its header, three rows and the footer; the instances pane below gives way first. */
@@ -60,6 +73,12 @@
.noSizes {
--memory-columns: minmax(0, 1fr) 96px 72px;
}
.withRetained {
--memory-columns: minmax(0, 1fr) 96px 72px 104px 104px;
}
.noSizes.withRetained {
--memory-columns: minmax(0, 1fr) 96px 72px 104px;
}
.head,
.row {