QEMU Size Analysis¶
本目录下的 size 文档统一采用 qemu 口径,目标是同时提供:
静态二进制体积
运行期
heap运行期
stack
相比旧的纯 ELF 静态统计方式,这套口径更完整,也更适合做配置取舍和回归比较。
Scope¶
HelloBasic/*,HelloSimple,HelloPerformance,HelloShowcase,HelloStyleDemo,HelloVirtual(virtual_stage_showcase)
Measurement Method¶
Static size build:
make all PORT=qemu CPU_ARCH=cortex-m0plusStatic data source:
output/main.mapinput sections from repo-sidesrc/+example/objectsStatic size scope: Map input sections from repo-side
src/+example/objects only; exclude toolchain libraries,driver/,porting/;ram_bytesexcludesPFB, andpfb_bytesstill comes from each case-localmain.map.bss.pfb_area.Runtime measure:
qemu-system-arm -machine mps2-an385 -cpu cortex-m3 -icount shift=0Runtime flags:
-DQEMU_HEAP_MEASURE=1 -DQEMU_HEAP_ACTIONS_APP_RECORDING=1 -DEGUI_CONFIG_FUNCTION_RECORDING_TEST=1Heap peak definition:
max(idle_peak, interaction_total_peak)Stack peak definition: qemu 侧保留栈区的 watermark 高水位统计
Size Categories¶
Category |
Description |
|---|---|
Code |
|
Resource |
|
RAM |
|
PFB |
|
Heap Idle |
UI 建立完成后的稳定 |
Heap Peak |
初始化或交互阶段出现的最大 |
Stack Peak |
qemu 运行时记录到的栈峰值 |
Generation Command¶
python scripts/size_analysis/main.py --case-set typical
python scripts/size_analysis/main.py size-to-doc