메모리 대역폭 분석 — STREAM·Roofline·Bus Saturation 측정
STREAM benchmark (Copy·Scale·Add·Triad). Roofline. PMU BUS_ACCESS · DDR bandwidth.
Tech articles, book reviews, and presentations.
페이지 57 / 73
STREAM benchmark (Copy·Scale·Add·Triad). Roofline. PMU BUS_ACCESS · DDR bandwidth.
64-byte line alignment, software prefetch, false sharing 회피, SoA·AoS 선택.
Cold/Compulsory, Capacity (working set > cache), Conflict (associativity 한계).
Cache hierarchy. Direct mapped vs N-way set associative. LRU·PLRU·Random.
Out-of-order execution. ROB·issue queue·rename. Spectre 측면. Cortex-A 사례.
BTFNT, 2-bit saturating counter, BTB·BHT. Mispredict 10-20 cycle. PMU BR_MIS_PRED.
Stall은 pipeline bubble을 만듭니다. RAW·WAR·WAW hazard, forwarding, PMU STALL counter를 살펴봅니다.
Fetch·Decode·Execute·Memory·Writeback의 5-stage 파이프라인을 봅니다. Cortex-M3/M4는 3-stage, Cortex-A는 8~15-stage입니다.
두 가지 큰 접근을 비교합니다. Sampling은 perf처럼 가볍고 Instrumentation은 gprof처럼 정확하지만 무겁습니다. PGO로 최적화하는 방법도 다룹니다.
최적화 한계를 예측하는 수학 모델. Serial 부분이 결정. Memory-bound vs Compute-bound.