TypeCraft: A Lightweight Data Type Profiler with High Resolution
Zecheng Li, Xu Liu, Namhyung Kim, Blake Jones, Alexey Alexandrov, Jiajia Li
Abstract
Improving software efficiency often involves optimizing data locality to reduce memory stalls. However, identifying such optimization opportunities, particularly in complex production software like the Linux kernel, is challenging. Existing profiling tools typically provide metrics such as cache and TLB misses for instructions, loops, functions, or heap allocations, still requiring substantial manual efforts to identify optimization opportunities. To overcome this, we introduce TypeCraft, a lightweight, high-resolution data type profiler, integrated into the Linux perf tool, that annotates individual memory access instructions with their associated data types and fields. TypeCraft provides detailed type-centric telemetry such as access counts, CPU cycle costs, cache or TLB misses, which helps identify optimization opportunities around the expensive types. Applying TypeCraft to the Linux kernel, we gain insights that guide us in implementing simple yet effective optimizations. These optimizations, including reordering structure fields and removing pointer chasing patterns, result in significant performance improvements for both benchmarks and real-world workloads.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 928d8259-a8c2-4339-b220-7ec80686e483Builds on9
- OSPREY: Recovery of Variable and Data Structure via Probabilistic Analysis for Stripped BinaryZhuo Zhang, Yapeng Ye, Wei You, Guanhong Tao et al.S&P 2021 · 78 citations
- Propeller: A Profile Guided, Relinking Optimizer for Warehouse-Scale ApplicationsHan Shen, Krzysztof Pszeniczny, Rahman Lavaee, Snehasish Kumar et al.ASPLOS 2023 · 37 citations
- Debug information validation for optimized codeYuanbo Li, Shuo Ding, Qirun Zhang, Davide ItalianoPLDI 2020 · 30 citations
- Triangulating Python Performance Issues with SCALENEEmery D. Berger, Sam Stern, Juan Altmayer PizzornoOSDI 2023 · 25 citations
- ReSym: Harnessing LLMs to Recover Variable and Data Structure Symbols from Stripped BinariesDanning Xie, Zhuo Zhang, Nan Jiang, Xiangzhe Xu et al.CCS 2024 · 21 citations
Related papers
- Classifying Memory Access Patterns for PrefetchingGrant Ayers, Heiner Litz, Christos Kozyrakis, Parthasarathy RanganathanASPLOS 2020 · 83 citations
- MemPerf: Profiling Allocator-Induced Performance SlowdownsJin Zhou, Sam Silvestro, Steven (Jiaxun) Tang, Hanmei Yang et al.OOPSLA 2023
- The Impact of Generic Data Structures: Decoding the Role of Lists in the Linux KernelNic Volanschi, Julia LawallASE 2020
- Xkernel: Principled Performance Tunability of Operating System KernelsZhongjie Chen, Wentao Zhang, Yulong Tang, Ran Shu et al.OSDI 2026 · 2 citations
- Toward efficient interactions between Python and native librariesJialiang Tan, Yu Chen, Zhenming Liu, Bin Ren et al.FSE 2021 · 10 citations
