Which Part of the Heap is Useful? Improving Heap Liveness Analysis
<|reference_start|>Which Part of the Heap is Useful? Improving Heap Liveness Analysis: With the growing sizes of data structures allocated in heap, understanding the actual use of heap memory is critically important for minimizing cache misses and reclaiming unused memory. A static analysis aimed at this is difficult because the heap locations are unnamed. Using allocation sites to name them creates very few distinctions making it difficult to identify allocated heap locations that are not used. Heap liveness analysis using access graphs solves this problem by (a) using a storeless model of heap memory by naming the locations with access paths, and (b) representing the unbounded sets of access paths (which are regular languages) as finite automata.   We improve the scalability and efficiency of heap liveness analysis, and reduce the amount of computed heap liveness information by using deterministic automata and by minimizing the inclusion of aliased access paths in the language. Practically, our field-, flow-, context-sensitive liveness analysis on SPEC CPU2006 benchmarks scales to 36 kLoC (existing analysis scales to 10.5 kLoC) and improves efficiency even up to 99%. For some of the benchmarks, our technique shows multifold reduction in the computed liveness information, ranging from 2 to 100 times (in terms of the number of live access paths), without compromising on soundness.<|reference_end|>
@article{kanvar2024which,
    title={Which Part of the Heap is Useful? Improving Heap Liveness Analysis},
    author={Vini Kanvar and Uday P. Khedker},
    journal={arXiv preprint arXiv:2408.12947},
    year={2024},
    archivePrefix={arXiv},
    eprint={2408.12947},
    primaryClass={cs.PL}
}