Update Java 虚拟机.md
重新绘制配图,补充 ZGC、对象的创建与内存布局、堆和栈的区别、JVM 调优和线上问题排查,更新类加载等描述。
@@ -0,0 +1,68 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="230" viewBox="0 0 760 230">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="380" y="28" class="title">CMS:大部分时间与用户线程并发</text>
|
||||
<text x="30" y="102" class="sub b" style="fill:#444">用户线程</text>
|
||||
<rect x="111" y="65" width="88" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="87" width="88" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="109" width="88" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="131" width="88" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="201" y="65" width="38" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="220" y="168" class="c sub" style="fill:#444">初始标记</text>
|
||||
<line x1="200" y1="56" x2="200" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<line x1="240" y1="56" x2="240" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<text x="220" y="52" class="c sub note">停顿</text>
|
||||
<rect x="241" y="65" width="168" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="241" y="87" width="168" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="241" y="109" width="168" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="241" y="131" width="168" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="325" y="168" class="c sub" style="fill:#444">并发标记</text>
|
||||
<rect x="411" y="65" width="48" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="411" y="87" width="48" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="411" y="109" width="48" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="411" y="131" width="48" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="435" y="168" class="c sub" style="fill:#444">重新标记</text>
|
||||
<line x1="410" y1="56" x2="410" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<line x1="460" y1="56" x2="460" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<text x="435" y="52" class="c sub note">停顿</text>
|
||||
<rect x="461" y="65" width="148" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="461" y="87" width="148" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="461" y="109" width="148" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="461" y="131" width="148" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="535" y="168" class="c sub" style="fill:#444">并发清除</text>
|
||||
<rect x="611" y="65" width="118" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="611" y="87" width="118" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="611" y="109" width="118" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="611" y="131" width="118" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="30" y="198" class="sub">浅蓝是用户线程,浅青是 GC 线程,红线之间所有用户线程暂停(Stop The World)。</text>
|
||||
<text x="30" y="216" class="sub">只有初始标记和重新标记需要停顿;并发阶段占用一个 CPU,用户线程变慢,所以吞吐量较低。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,63 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="740" height="330" viewBox="0 0 740 330">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="370" y="28" class="title">HotSpot 的 7 个经典垃圾收集器</text>
|
||||
<rect x="30" y="50" width="680" height="96" rx="8" fill="#C6E4FB" fill-opacity="0.18"/>
|
||||
<rect x="30" y="186" width="680" height="96" rx="8" fill="#EAE9E7" fill-opacity="0.45"/>
|
||||
<text x="46" y="70" class="sub b" style="fill:#444">新生代</text>
|
||||
<text x="46" y="206" class="sub b" style="fill:#444">老年代</text>
|
||||
<rect x="80" y="82" width="140" height="36" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
|
||||
<text x="150" y="104.5" class="c sub b">Serial</text>
|
||||
<rect x="260" y="82" width="140" height="36" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
|
||||
<text x="330" y="104.5" class="c sub b">ParNew</text>
|
||||
<rect x="440" y="82" width="140" height="36" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
|
||||
<text x="510" y="104.5" class="c sub b">Parallel Scavenge</text>
|
||||
<rect x="80" y="218" width="140" height="36" rx="6" fill="#EAE9E7" stroke="#BFBEBA"/>
|
||||
<text x="150" y="240.5" class="c sub b">CMS</text>
|
||||
<rect x="260" y="218" width="140" height="36" rx="6" fill="#EAE9E7" stroke="#BFBEBA"/>
|
||||
<text x="330" y="240.5" class="c sub b">Serial Old</text>
|
||||
<rect x="440" y="218" width="140" height="36" rx="6" fill="#EAE9E7" stroke="#BFBEBA"/>
|
||||
<text x="510" y="240.5" class="c sub b">Parallel Old</text>
|
||||
<rect x="620" y="136" width="76" height="64" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
|
||||
<text x="658" y="164" class="c b" style="fill:#444">G1</text>
|
||||
<text x="658" y="182" class="c sub">整个堆</text>
|
||||
<line x1="150" y1="120" x2="330" y2="216" stroke="#666" stroke-width="1.3"/>
|
||||
<line x1="330" y1="120" x2="150" y2="216" stroke="#666" stroke-width="1.3"/>
|
||||
<line x1="510" y1="120" x2="330" y2="216" stroke="#666" stroke-width="1.3"/>
|
||||
<line x1="510" y1="120" x2="510" y2="216" stroke="#666" stroke-width="1.3"/>
|
||||
<line x1="150" y1="120" x2="150" y2="216" stroke="#C0605A" stroke-dasharray="4 3" stroke-width="1.3"/>
|
||||
<line x1="330" y1="120" x2="330" y2="216" stroke="#C0605A" stroke-dasharray="4 3" stroke-width="1.3"/>
|
||||
<path d="M220,236 H260" stroke="#999" stroke-width="1.3" stroke-dasharray="2 3" fill="none" marker-end="url(#a)"/>
|
||||
<text x="240" y="272" class="c sub">失败时退回</text>
|
||||
<text x="30" y="304" class="sub">实线是可以配合使用的组合;红色虚线的两种组合在 JDK 9 中移除(JEP 214)。JDK 9 起默认使用 G1,</text>
|
||||
<text x="30" y="322" class="sub">CMS 在 JDK 14 中移除(JEP 363)。新的 ZGC、Shenandoah 不在图中。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,65 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="320" viewBox="0 0 760 320">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="380" y="28" class="title">G1 的一次并发标记周期(JDK 21 实测,堆 128 MB)</text>
|
||||
<line x1="80" y1="200" x2="720" y2="200" class="line"/>
|
||||
<line x1="100" y1="200" x2="100" y2="205" stroke="#999"/>
|
||||
<text x="100" y="220" class="c sub mono">56 ms</text>
|
||||
<line x1="260" y1="200" x2="260" y2="205" stroke="#999"/>
|
||||
<text x="260" y="220" class="c sub mono">60 ms</text>
|
||||
<line x1="420" y1="200" x2="420" y2="205" stroke="#999"/>
|
||||
<text x="420" y="220" class="c sub mono">64 ms</text>
|
||||
<line x1="580" y1="200" x2="580" y2="205" stroke="#999"/>
|
||||
<text x="580" y="220" class="c sub mono">68 ms</text>
|
||||
<rect x="140" y="150" width="456" height="24" rx="4" fill="#C6ECE9" stroke="#7DBCB7"/>
|
||||
<text x="368" y="166" class="c sub" style="fill:#444">并发标记 11.4 ms:与用户线程同时运行,2 个并发线程</text>
|
||||
<rect x="136" y="166.318" width="8" height="29.682" rx="1" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<line x1="140" y1="164.318" x2="140" y2="78" stroke="#BBB" stroke-dasharray="2 2"/>
|
||||
<text x="140" y="72" class="c sub" style="fill:#444">Young (Concurrent Start) 1.649 ms</text>
|
||||
<rect x="296" y="162.43" width="8" height="33.57" rx="1" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="376" y="180.448" width="8" height="15.552" rx="1" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="416" y="193" width="8" height="3" rx="1" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<line x1="420" y1="191" x2="420" y2="78" stroke="#BBB" stroke-dasharray="2 2"/>
|
||||
<text x="420" y="72" class="c sub" style="fill:#444">Remark 0.096 ms</text>
|
||||
<rect x="496" y="183.04" width="8" height="12.96" rx="1" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="536" y="184.192" width="8" height="11.808" rx="1" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="576" y="193" width="8" height="3" rx="1" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<line x1="580" y1="191" x2="580" y2="102" stroke="#BBB" stroke-dasharray="2 2"/>
|
||||
<text x="580" y="96" class="c sub" style="fill:#444">Cleanup 0.046 ms</text>
|
||||
<rect x="616" y="186.19" width="8" height="9.81" rx="1" fill="#9F94D5" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<rect x="656" y="185.47" width="8" height="10.53" rx="1" fill="#9F94D5" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<line x1="660" y1="183.47" x2="660" y2="78" stroke="#BBB" stroke-dasharray="2 2"/>
|
||||
<text x="660" y="72" class="c sub" style="fill:#444">Mixed 0.585 ms</text>
|
||||
<text x="30" y="254" class="sub">柱子是停顿,高度表示时长。① 一次年轻代回收顺带开始标记(Concurrent Start);② 并发标记期间年轻代回收照常进行;</text>
|
||||
<text x="30" y="272" class="sub">③ 最终标记 Remark 和 ④ 清理 Cleanup 只停顿不到 0.1 ms;⑤ 之后的混合回收(Mixed)同时回收年轻代和</text>
|
||||
<text x="30" y="290" class="sub">垃圾最多的老年代 Region。这次运行共 88 次停顿,最长 2.38 ms。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,178 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="740" height="290" viewBox="0 0 740 290">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="370" y="28" class="title">G1 把堆分成大小相等的 Region</text>
|
||||
<rect x="30" y="52" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="48" y="73" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="70" y="52" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="88" y="73" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="110" y="52" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="128" y="73" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="150" y="52" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="168" y="73" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="190" y="52" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="208" y="73" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="230" y="52" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="248" y="73" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="270" y="52" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="288" y="73" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="310" y="52" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="328" y="73" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="350" y="52" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="368" y="73" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="390" y="52" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="408" y="73" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="430" y="52" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="448" y="73" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="470" y="52" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="488" y="73" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="510" y="52" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="528" y="73" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="550" y="52" width="36" height="34" rx="3" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="568" y="73" class="c sub b" style="fill:#444">S</text>
|
||||
<rect x="590" y="52" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="608" y="73" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="630" y="52" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="648" y="73" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="30" y="92" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="48" y="113" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="70" y="92" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="88" y="113" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="110" y="92" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="128" y="113" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="150" y="92" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="168" y="113" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="190" y="92" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="208" y="113" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="230" y="92" width="36" height="34" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="248" y="113" class="c sub b" style="fill:#444">H</text>
|
||||
<rect x="270" y="92" width="36" height="34" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="288" y="113" class="c sub b" style="fill:#444">H</text>
|
||||
<rect x="310" y="92" width="36" height="34" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="328" y="113" class="c sub b" style="fill:#444">H</text>
|
||||
<rect x="350" y="92" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="368" y="113" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="390" y="92" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="408" y="113" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="430" y="92" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="448" y="113" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="470" y="92" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="488" y="113" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="510" y="92" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="528" y="113" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="550" y="92" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="568" y="113" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="590" y="92" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="608" y="113" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="630" y="92" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="648" y="113" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="30" y="132" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="48" y="153" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="70" y="132" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="88" y="153" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="110" y="132" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="128" y="153" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="150" y="132" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="168" y="153" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="190" y="132" width="36" height="34" rx="3" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="208" y="153" class="c sub b" style="fill:#444">S</text>
|
||||
<rect x="230" y="132" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="248" y="153" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="270" y="132" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="288" y="153" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="310" y="132" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="328" y="153" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="350" y="132" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="368" y="153" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="390" y="132" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="408" y="153" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="430" y="132" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="448" y="153" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="470" y="132" width="36" height="34" rx="3" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="488" y="153" class="c sub b" style="fill:#444">S</text>
|
||||
<rect x="510" y="132" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="528" y="153" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="550" y="132" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="568" y="153" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="590" y="132" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="608" y="153" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="630" y="132" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="648" y="153" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="30" y="172" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="48" y="193" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="70" y="172" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="88" y="193" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="110" y="172" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="128" y="193" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="150" y="172" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="168" y="193" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="190" y="172" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="208" y="193" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="230" y="172" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="248" y="193" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="270" y="172" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="288" y="193" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="310" y="172" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="328" y="193" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="350" y="172" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="368" y="193" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="390" y="172" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="408" y="193" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="430" y="172" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="448" y="193" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="470" y="172" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="488" y="193" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="510" y="172" width="36" height="34" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="528" y="193" class="c sub b" style="fill:#444">O</text>
|
||||
<rect x="550" y="172" width="36" height="34" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="568" y="193" class="c sub b" style="fill:#444">E</text>
|
||||
<rect x="590" y="172" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="608" y="193" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="630" y="172" width="36" height="34" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="648" y="193" class="c sub b" style="fill:#444"></text>
|
||||
<rect x="30" y="222" width="22" height="20" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="41" y="236" class="c sub" style="fill:#444">E</text>
|
||||
<text x="58" y="236" class="sub">Eden</text>
|
||||
<rect x="116" y="222" width="22" height="20" rx="3" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="127" y="236" class="c sub" style="fill:#444">S</text>
|
||||
<text x="144" y="236" class="sub">Survivor</text>
|
||||
<rect x="238" y="222" width="22" height="20" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="249" y="236" class="c sub" style="fill:#444">O</text>
|
||||
<text x="266" y="236" class="sub">老年代</text>
|
||||
<rect x="315" y="222" width="22" height="20" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="326" y="236" class="c sub" style="fill:#444">H</text>
|
||||
<text x="343" y="236" class="sub">大对象(Humongous)</text>
|
||||
<rect x="491" y="222" width="22" height="20" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="502" y="236" class="c sub" style="fill:#444"></text>
|
||||
<text x="519" y="236" class="sub">空闲</text>
|
||||
<text x="30" y="270" class="sub">每个 Region 的角色可以变化。不小于半个 Region 的对象放在连续的大对象 Region 中。堆 128 MB 时 Region 为 1 MB,本机默认堆时为 4 MB。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,48 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="740" height="220" viewBox="0 0 740 220">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="370" y="28" class="title">分代的堆:其它收集器按新生代、老年代整体回收</text>
|
||||
<rect x="40" y="70" width="176" height="44" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="128" y="96" class="c sub b" style="fill:#444">Eden</text>
|
||||
<rect x="216" y="70" width="22" height="44" rx="3" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="227" y="96" class="c sub b" style="fill:#444">S0</text>
|
||||
<rect x="238" y="70" width="22" height="44" rx="3" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="249" y="96" class="c sub b" style="fill:#444">S1</text>
|
||||
<rect x="260" y="70" width="440" height="44" rx="3" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<text x="480" y="96" class="c sub b" style="fill:#444">老年代</text>
|
||||
<path d="M40,124 q0,8 8,8 H252 q8,0 8,-8" class="line"/>
|
||||
<text x="150" y="150" class="c sub">新生代:Eden 与两个 Survivor 默认 8 : 1 : 1</text>
|
||||
<path d="M260,124 q0,8 8,8 H692 q8,0 8,-8" class="line"/>
|
||||
<text x="480" y="150" class="c sub">老年代:默认是新生代的 2 倍(NewRatio = 2)</text>
|
||||
<text x="30" y="190" class="sub">新对象在 Eden 分配;Minor GC 时把存活对象复制到 Survivor,年龄够了晋升到老年代。</text>
|
||||
<text x="30" y="208" class="sub">类的元数据不在堆中,JDK 8 起放在本地内存的元空间(Metaspace)。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,65 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="230" viewBox="0 0 760 230">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="380" y="28" class="title">Parallel Scavenge 与 Parallel Old:两代都多线程</text>
|
||||
<text x="30" y="102" class="sub b" style="fill:#444">用户线程</text>
|
||||
<rect x="111" y="65" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="87" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="109" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="131" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="251" y="65" width="68" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="251" y="87" width="68" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="251" y="109" width="68" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="251" y="131" width="68" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="285" y="168" class="c sub" style="fill:#444">新生代复制</text>
|
||||
<line x1="250" y1="56" x2="250" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<line x1="320" y1="56" x2="320" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<text x="285" y="52" class="c sub note">停顿</text>
|
||||
<rect x="321" y="65" width="178" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="321" y="87" width="178" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="321" y="109" width="178" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="321" y="131" width="178" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="501" y="65" width="88" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="501" y="87" width="88" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="501" y="109" width="88" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="501" y="131" width="88" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="545" y="168" class="c sub" style="fill:#444">老年代标记 - 整理</text>
|
||||
<line x1="500" y1="56" x2="500" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<line x1="590" y1="56" x2="590" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<text x="545" y="52" class="c sub note">停顿</text>
|
||||
<rect x="591" y="65" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="591" y="87" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="591" y="109" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="591" y="131" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="30" y="198" class="sub">浅蓝是用户线程,浅青是 GC 线程,红线之间所有用户线程暂停(Stop The World)。</text>
|
||||
<text x="30" y="216" class="sub">目标是吞吐量:用户线程运行时间占总时间的比例越高越好。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.6 KiB |
@@ -0,0 +1,62 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="230" viewBox="0 0 760 230">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="380" y="28" class="title">ParNew:多线程收集新生代</text>
|
||||
<text x="30" y="102" class="sub b" style="fill:#444">用户线程</text>
|
||||
<rect x="111" y="65" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="87" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="109" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="131" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="251" y="65" width="68" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="251" y="87" width="68" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="251" y="109" width="68" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<rect x="251" y="131" width="68" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="285" y="168" class="c sub" style="fill:#444">新生代复制</text>
|
||||
<line x1="250" y1="56" x2="250" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<line x1="320" y1="56" x2="320" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<text x="285" y="52" class="c sub note">停顿</text>
|
||||
<rect x="321" y="65" width="158" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="321" y="87" width="158" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="321" y="109" width="158" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="321" y="131" width="158" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="481" y="65" width="158" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="560" y="168" class="c sub" style="fill:#444">Serial Old</text>
|
||||
<line x1="480" y1="56" x2="480" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<line x1="640" y1="56" x2="640" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<text x="560" y="52" class="c sub note">停顿</text>
|
||||
<rect x="641" y="65" width="88" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="641" y="87" width="88" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="641" y="109" width="88" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="641" y="131" width="88" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="30" y="198" class="sub">浅蓝是用户线程,浅青是 GC 线程,红线之间所有用户线程暂停(Stop The World)。</text>
|
||||
<text x="30" y="216" class="sub">新生代用多个 GC 线程并行复制,停顿更短;老年代仍由单线程的 Serial Old 或 CMS 回收。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,59 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="230" viewBox="0 0 760 230">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="380" y="28" class="title">Serial 与 Serial Old:单线程收集</text>
|
||||
<text x="30" y="102" class="sub b" style="fill:#444">用户线程</text>
|
||||
<rect x="111" y="65" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="87" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="109" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="111" y="131" width="138" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="251" y="65" width="108" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="305" y="168" class="c sub" style="fill:#444">新生代复制</text>
|
||||
<line x1="250" y1="56" x2="250" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<line x1="360" y1="56" x2="360" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<text x="305" y="52" class="c sub note">停顿</text>
|
||||
<rect x="361" y="65" width="158" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="361" y="87" width="158" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="361" y="109" width="158" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="361" y="131" width="158" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="521" y="65" width="158" height="16" rx="2" fill="#C6ECE9" stroke="#7DBCB7" stroke-width="1"/>
|
||||
<text x="600" y="168" class="c sub" style="fill:#444">老年代标记 - 整理</text>
|
||||
<line x1="520" y1="56" x2="520" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<line x1="680" y1="56" x2="680" y2="154" stroke="#C0605A" stroke-width="1.4"/>
|
||||
<text x="600" y="52" class="c sub note">停顿</text>
|
||||
<rect x="681" y="65" width="48" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="681" y="87" width="48" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="681" y="109" width="48" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<rect x="681" y="131" width="48" height="16" rx="2" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="30" y="198" class="sub">浅蓝是用户线程,浅青是 GC 线程,红线之间所有用户线程暂停(Stop The World)。</text>
|
||||
<text x="30" y="216" class="sub">收集期间只有一个 GC 线程工作,其它 CPU 空闲。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |