新增内存使用分析文档(报告/规划/优化建议)与 SVG 布局图生成脚本
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 740 340" width="740" height="340" style="font-family:Consolas,'Courier New',monospace; font-size:12px; background:#fff">
|
||||
<defs>
|
||||
<style>
|
||||
.title { font-size:14px; font-weight:bold; }
|
||||
.label { font-size:11px; }
|
||||
.legend-text { font-size:10px; }
|
||||
.bar-seg { stroke:#fff; stroke-width:0.5; }
|
||||
</style>
|
||||
</defs>
|
||||
<text x="370.0" y="24" text-anchor="middle" class="title">FreeRTOS 任务栈分配 (48KB 堆池)</text>
|
||||
<text x="180" y="54" class="legend-text" fill="#555">分配栈大小 (Bytes)</text>
|
||||
<text x="176" y="75.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">defaultTask</text>
|
||||
<rect class="bar-seg" x="180" y="60" width="65.0" height="30" fill="#2196F3" rx="3"/>
|
||||
<text x="212.5" y="75.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">2048B (2.0KB)</text>
|
||||
<text x="176" y="109.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">netTask</text>
|
||||
<rect class="bar-seg" x="180" y="94" width="130.0" height="30" fill="#2196F3" rx="3"/>
|
||||
<text x="245.0" y="109.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">4096B (4.0KB)</text>
|
||||
<text x="176" y="143.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">ftpTask</text>
|
||||
<rect class="bar-seg" x="180" y="128" width="130.0" height="30" fill="#2196F3" rx="3"/>
|
||||
<text x="245.0" y="143.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">4096B (4.0KB)</text>
|
||||
<text x="176" y="177.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">testTask</text>
|
||||
<rect class="bar-seg" x="180" y="162" width="130.0" height="30" fill="#2196F3" rx="3"/>
|
||||
<text x="245.0" y="177.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">4096B (4.0KB)</text>
|
||||
<text x="176" y="211.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">uiTask</text>
|
||||
<rect class="bar-seg" x="180" y="196" width="520.0" height="30" fill="#2196F3" rx="3"/>
|
||||
<text x="440.0" y="211.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">16384B (16.0KB)</text>
|
||||
<text x="176" y="245.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">timeSyncTask</text>
|
||||
<rect class="bar-seg" x="180" y="230" width="65.0" height="30" fill="#2196F3" rx="3"/>
|
||||
<text x="212.5" y="245.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">2048B (2.0KB)</text>
|
||||
<text x="180" y="268" class="label" fill="#555">堆总量: 49,152B (48KB) 任务栈合计: ~34304B (33.5KB) 空闲: ~13736B (13.4KB)</text>
|
||||
<rect x="180" y="286" width="10" height="10" fill="#2196F3" rx="2"/>
|
||||
<text x="194" y="294" class="legend-text" fill="#333">Normal 优先级</text>
|
||||
<rect x="310" y="286" width="10" height="10" fill="#FF9800" rx="2"/>
|
||||
<text x="324" y="294" class="legend-text" fill="#333">BelowNormal 优先级</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,35 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 820 240" width="820" height="240" style="font-family:Consolas,'Courier New',monospace; font-size:12px; background:#fff">
|
||||
<defs>
|
||||
<style>
|
||||
.title { font-size:14px; font-weight:bold; }
|
||||
.label { font-size:11px; }
|
||||
.legend-text { font-size:10px; }
|
||||
.bar-seg { stroke:#fff; stroke-width:0.5; }
|
||||
</style>
|
||||
</defs>
|
||||
<text x="410.0" y="24" text-anchor="middle" class="title">Flash (1MB) 使用布局</text>
|
||||
<rect class="bar-seg" x="60" y="50" width="155.2" height="40" fill="#2196F3" rx="2"/>
|
||||
<text x="137.6" y="70.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">代码段 (Code) 214.8KB</text>
|
||||
<rect class="bar-seg" x="215.24124145507812" y="50" width="8.1" height="40" fill="#4CAF50" rx="2"/>
|
||||
<text x="227.4" y="70.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">只读数据 (RO) 11.2KB</text>
|
||||
<rect class="bar-seg" x="223.35418701171875" y="50" width="576.3" height="40" fill="#E0E0E0" rx="2"/>
|
||||
<text x="511.5" y="70.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">Flash 空闲 797.4KB</text>
|
||||
<text x="60" y="108" class="label" fill="#333">已用: 226.6KB (22.1%) 空闲: 797.4KB (77.9%) 总量: 1024KB</text>
|
||||
<text x="60" y="124" class="label" fill="#555">代码段明细 (214.8KB)</text>
|
||||
<rect class="bar-seg" x="60" y="130" width="233.3" height="24" fill="#4CAF50" rx="2"/>
|
||||
<text x="176.7" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">LVGL 库 67.7KB</text>
|
||||
<rect class="bar-seg" x="293.34072807942687" y="130" width="143.1" height="24" fill="#2196F3" rx="2"/>
|
||||
<text x="364.9" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">应用代码/UI 41.5KB</text>
|
||||
<rect class="bar-seg" x="436.44543041059023" y="130" width="14.2" height="24" fill="#795548" rx="2"/>
|
||||
<text x="454.7" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">C 库 (microlib) 4.1KB</text>
|
||||
<rect class="bar-seg" x="450.6751645634069" y="130" width="38.8" height="24" fill="#9C27B0" rx="2"/>
|
||||
<text x="493.5" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">FatFS + dhara 11.3KB</text>
|
||||
<rect class="bar-seg" x="489.49576317416444" y="130" width="29.5" height="24" fill="#F44336" rx="2"/>
|
||||
<text x="523.0" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">CH395F 网络 8.6KB</text>
|
||||
<rect class="bar-seg" x="519.0182565370768" y="130" width="31.6" height="24" fill="#607D8B" rx="2"/>
|
||||
<text x="554.6" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">HAL 驱动 9.2KB</text>
|
||||
<rect class="bar-seg" x="550.6398879877805" y="130" width="14.3" height="24" fill="#00BCD4" rx="2"/>
|
||||
<text x="568.9" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">FreeRTOS 4.1KB</text>
|
||||
<rect class="bar-seg" x="564.9032621740554" y="130" width="235.1" height="24" fill="#E0E0E0" rx="2"/>
|
||||
<text x="682.5" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">其他 68.2KB</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,51 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 820 320" width="820" height="320" style="font-family:Consolas,'Courier New',monospace; font-size:12px; background:#fff">
|
||||
<defs>
|
||||
<style>
|
||||
.title { font-size:14px; font-weight:bold; }
|
||||
.label { font-size:11px; }
|
||||
.legend-text { font-size:10px; }
|
||||
.bar-seg { stroke:#fff; stroke-width:0.5; }
|
||||
</style>
|
||||
</defs>
|
||||
<text x="410.0" y="24" text-anchor="middle" class="title">SRAM (128KB) 使用布局</text>
|
||||
<rect class="bar-seg" x="60" y="50" width="277.5" height="50" fill="#2196F3" rx="2"/>
|
||||
<text x="198.8" y="75.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">FreeRTOS 堆 (48KB heap_4)</text>
|
||||
<rect class="bar-seg" x="337.5" y="50" width="231.2" height="50" fill="#4CAF50" rx="2"/>
|
||||
<text x="453.1" y="75.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">LVGL 内存池 (40KB)</text>
|
||||
<rect class="bar-seg" x="568.75" y="50" width="74.3" height="50" fill="#FF9800" rx="2"/>
|
||||
<text x="605.9" y="69.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">UI 帧缓冲</text>
|
||||
<text x="605.9" y="81.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">(~13KB)</text>
|
||||
<rect class="bar-seg" x="643.0368041992188" y="50" width="70.1" height="50" fill="#9C27B0" rx="2"/>
|
||||
<text x="678.1" y="69.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">FTL / 存储</text>
|
||||
<text x="678.1" y="81.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">(~11KB)</text>
|
||||
<rect class="bar-seg" x="713.1344604492188" y="50" width="40.1" height="50" fill="#F44336" rx="2"/>
|
||||
<text x="733.2" y="63.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">网络 /</text>
|
||||
<text x="733.2" y="75.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">CH395F</text>
|
||||
<text x="733.2" y="87.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">(~7KB)</text>
|
||||
<rect class="bar-seg" x="753.2757568359375" y="50" width="17.1" height="50" fill="#00BCD4" rx="2"/>
|
||||
<text x="774.3" y="75.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">内核 / CMSIS (~3KB)</text>
|
||||
<rect class="bar-seg" x="770.3485107421875" y="50" width="7.9" height="50" fill="#607D8B" rx="2"/>
|
||||
<text x="782.3" y="75.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">HAL 驱动 (~1.4KB)</text>
|
||||
<rect class="bar-seg" x="778.2525634765625" y="50" width="2.8" height="50" fill="#795548" rx="2"/>
|
||||
<text x="785.1" y="75.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">其他静态 (~0.5KB)</text>
|
||||
<rect class="bar-seg" x="781.0641479492188" y="50" width="33.7" height="50" fill="#E0E0E0" rx="2"/>
|
||||
<rect x="60" y="130" width="12" height="12" fill="#2196F3" rx="2"/>
|
||||
<text x="76" y="140" class="legend-text" fill="#333">FreeRTOS 堆 (48KB heap_4): 48.0KB (37.5%)</text>
|
||||
<rect x="60" y="146" width="12" height="12" fill="#4CAF50" rx="2"/>
|
||||
<text x="76" y="156" class="legend-text" fill="#333">LVGL 内存池 (40KB): 40.0KB (31.2%)</text>
|
||||
<rect x="60" y="162" width="12" height="12" fill="#FF9800" rx="2"/>
|
||||
<text x="76" y="172" class="legend-text" fill="#333">UI 帧缓冲 (~13KB): 12.8KB (10.0%)</text>
|
||||
<rect x="60" y="178" width="12" height="12" fill="#9C27B0" rx="2"/>
|
||||
<text x="76" y="188" class="legend-text" fill="#333">FTL / 存储 (~11KB): 12.1KB (9.5%)</text>
|
||||
<rect x="60" y="194" width="12" height="12" fill="#F44336" rx="2"/>
|
||||
<text x="76" y="204" class="legend-text" fill="#333">网络 / CH395F (~7KB): 6.9KB (5.4%)</text>
|
||||
<rect x="60" y="210" width="12" height="12" fill="#00BCD4" rx="2"/>
|
||||
<text x="76" y="220" class="legend-text" fill="#333">内核 / CMSIS (~3KB): 3.0KB (2.3%)</text>
|
||||
<rect x="60" y="226" width="12" height="12" fill="#607D8B" rx="2"/>
|
||||
<text x="76" y="236" class="legend-text" fill="#333">HAL 驱动 (~1.4KB): 1.4KB (1.1%)</text>
|
||||
<rect x="60" y="242" width="12" height="12" fill="#795548" rx="2"/>
|
||||
<text x="76" y="252" class="legend-text" fill="#333">其他静态 (~0.5KB): 0.5KB (0.4%)</text>
|
||||
<rect x="60" y="258" width="12" height="12" fill="#E0E0E0" rx="2"/>
|
||||
<text x="76" y="268" class="legend-text" fill="#333">SRAM 空闲: 5.8KB (4.6%)</text>
|
||||
<text x="60" y="120" class="label" fill="#333">已用: 122.2KB (95.4%) 空闲: 5.8KB (4.6%) 总量: 128KB</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
Reference in New Issue
Block a user