{"title":"堆的哪一部分有用?改进堆有效性分析","authors":"Vini Kanvar, Uday P. Khedker","doi":"arxiv-2408.12947","DOIUrl":null,"url":null,"abstract":"With the growing sizes of data structures allocated in heap, understanding\nthe actual use of heap memory is critically important for minimizing cache\nmisses and reclaiming unused memory. A static analysis aimed at this is\ndifficult because the heap locations are unnamed. Using allocation sites to\nname them creates very few distinctions making it difficult to identify\nallocated heap locations that are not used. Heap liveness analysis using access\ngraphs solves this problem by (a) using a storeless model of heap memory by\nnaming the locations with access paths, and (b) representing the unbounded sets\nof access paths (which are regular languages) as finite automata. We improve the scalability and efficiency of heap liveness analysis, and\nreduce the amount of computed heap liveness information by using deterministic\nautomata and by minimizing the inclusion of aliased access paths in the\nlanguage. Practically, our field-, flow-, context-sensitive liveness analysis\non SPEC CPU2006 benchmarks scales to 36 kLoC (existing analysis scales to 10.5\nkLoC) and improves efficiency even up to 99%. For some of the benchmarks, our\ntechnique shows multifold reduction in the computed liveness information,\nranging from 2 to 100 times (in terms of the number of live access paths),\nwithout compromising on soundness.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-08-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Which Part of the Heap is Useful? Improving Heap Liveness Analysis\",\"authors\":\"Vini Kanvar, Uday P. Khedker\",\"doi\":\"arxiv-2408.12947\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"With the growing sizes of data structures allocated in heap, understanding\\nthe actual use of heap memory is critically important for minimizing cache\\nmisses and reclaiming unused memory. A static analysis aimed at this is\\ndifficult because the heap locations are unnamed. Using allocation sites to\\nname them creates very few distinctions making it difficult to identify\\nallocated heap locations that are not used. Heap liveness analysis using access\\ngraphs solves this problem by (a) using a storeless model of heap memory by\\nnaming the locations with access paths, and (b) representing the unbounded sets\\nof access paths (which are regular languages) as finite automata. We improve the scalability and efficiency of heap liveness analysis, and\\nreduce the amount of computed heap liveness information by using deterministic\\nautomata and by minimizing the inclusion of aliased access paths in the\\nlanguage. Practically, our field-, flow-, context-sensitive liveness analysis\\non SPEC CPU2006 benchmarks scales to 36 kLoC (existing analysis scales to 10.5\\nkLoC) and improves efficiency even up to 99%. For some of the benchmarks, our\\ntechnique shows multifold reduction in the computed liveness information,\\nranging from 2 to 100 times (in terms of the number of live access paths),\\nwithout compromising on soundness.\",\"PeriodicalId\":501197,\"journal\":{\"name\":\"arXiv - CS - Programming Languages\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-08-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Programming Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2408.12947\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.12947","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
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.