Файли
openidea/src/features/run/threadDump/ThreadDump.module.css
T
ntbang0901 9a74fe4418 feat(run): show virtual threads and their deadlocks in thread dumps (#5596)
Thread.print lists only platform threads, so Dump Threads never showed virtual threads or deadlocks between them. On Java 21+ it now also takes the JSON thread dump (Thread.dump_to_file -format=json into an owner-only directory under the heap snapshot root, read with a size cap and always removed) and lists the virtual threads in a Virtual threads (n) group by container. On Java 25 the JSON carries lock owners, so monitor deadlocks between virtual threads show in the deadlock banner; on 21-24 the viewer says lock owners need Java 25. The JSON request is skipped while a debugger holds the JVM suspended, since it would hang the attach listener until resume.

Part of #5593.

Co-authored-by: ntbang0901 <[email protected]>
2026-11-25 14:46:31 +08:00

119 рядки
1.9 KiB
CSS

.root {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
height: 100%;
}
.banner {
flex: none;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
padding: var(--space-1) var(--space-3);
border-bottom: 1px solid var(--border);
background: color-mix(in srgb, var(--danger) 12%, transparent);
color: var(--fg-strong);
font-size: var(--fs-ui);
}
.cycle {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: var(--space-1);
}
.cycleLabel {
color: var(--danger);
font-weight: 600;
}
.threadLink {
padding: 0;
border: none;
background: none;
color: var(--link);
font: inherit;
cursor: pointer;
}
.threadLink:hover {
color: var(--link-hover);
text-decoration: underline;
}
.body {
flex: 1;
display: flex;
min-width: 0;
min-height: 0;
}
.split {
flex: 1;
min-width: 0;
min-height: 0;
}
.threads {
display: flex;
flex-direction: column;
min-height: 0;
}
.listHeader {
flex: none;
display: flex;
align-items: center;
gap: var(--space-1);
padding: var(--space-1);
}
.filter {
flex: 1;
min-width: 0;
}
.counts {
flex: none;
display: flex;
flex-wrap: wrap;
gap: var(--space-0-5) var(--space-2);
padding: 0 var(--space-2) var(--space-1);
border-bottom: 1px solid var(--border);
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.note {
flex: none;
padding: var(--space-1) var(--space-2);
border-bottom: 1px solid var(--border);
color: var(--fg-muted);
font-size: var(--fs-small);
}
.list {
flex: 1;
min-height: 0;
}
.container {
min-width: 0;
padding-left: var(--space-2);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.name {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.deadlockMark {
flex: none;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--danger);
}
.stack {
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
}