arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.12947cs.PL
收藏

堆的哪部分是有用的?改进堆活性分析

Which Part of the Heap is Useful? Improving Heap Liveness Analysis

Vini Kanvar, Uday P. Khedker

AI总结:

本文通过使用确定性自动机并最小化别名访问路径的包含,提升了堆活性分析的可扩展性与效率,在 SPEC CPU2006 上可扩展至 36 kLoC,效率提升达 99%,且大幅减少了计算的活性信息量。

摘要:

随着堆中分配的数据结构规模不断增大,理解堆内存的实际使用情况对于最小化缓存未命中和回收未使用内存至关重要。针对此问题的静态分析非常困难,因为堆位置是未命名的。使用分配点来命名它们产生的区分度极低,使得识别未使用的已分配堆位置变得困难。使用访问图的堆活性分析解决了这个问题,方法是(a)使用无存储模型,通过访问路径来命名堆位置,以及(b)将无界的访问路径集合(即正则语言)表示为有限自动机。我们通过使用确定性自动机并最小化语言中别名访问路径的包含,提升了堆活性分析的可扩展性和效率,并减少了计算的堆活性信息量。实际上,我们在 SPEC CPU2006 基准测试上进行的域敏感、流敏感、上下文敏感的活性分析可扩展至 36 kLoC(现有分析可扩展至 10.5 kLoC),效率提升甚至高达 99%。对于部分基准测试,我们的技术在计算的活性信息上实现了多倍减少,范围从 2 到 100 倍(以活跃访问路径的数量计),且不妥协健全性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑