Stack allocation of objects in the CACAO virtual machine

P. Molnár, A. Krall, F. Brandner
{"title":"Stack allocation of objects in the CACAO virtual machine","authors":"P. Molnár, A. Krall, F. Brandner","doi":"10.1145/1596655.1596680","DOIUrl":null,"url":null,"abstract":"Stack allocation of objects reduces the cost of object allocation and garbage collection and can thus lead to large reductions in runtime. Escape analysis can statically determine which objects are eligible to stack allocation by examining the escape behavior of allocation sites. If objects created at a particular allocation site do not escape, i.e., are guaranteed not to leave the scope of the allocation site, stack allocation instead of expensive heap allocation can be applied.\n We have implemented a lightweight and fast escape analysis within the CACAO Java Virtual Machine to enable stack allocation. The analysis proceeds in two stages: an intraprocedural analysis computes escape information for each allocation site within a single method and builds call-context agnostic summary information for the method. The summary information is then used during interprocedural analysis to capture the escape behavior of method arguments. The computed escape information is finally used to allocate a subset of thread-local Java objects on the call stack.\n The implementation has been evaluated using the SPEC JVM98 and the dacapo benchmark suites. For the SPEC benchmarks up to 90% of all objects allocated at runtime can be allocated on the call stack, leading to a speed up of up to 69%. The more complex dacapo benchmarks still show speedups of up to 10%, with up to 20% of all objects being allocated on the stack.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"58 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"10","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Principles and Practice of Programming in Java","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1596655.1596680","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 10

Abstract

Stack allocation of objects reduces the cost of object allocation and garbage collection and can thus lead to large reductions in runtime. Escape analysis can statically determine which objects are eligible to stack allocation by examining the escape behavior of allocation sites. If objects created at a particular allocation site do not escape, i.e., are guaranteed not to leave the scope of the allocation site, stack allocation instead of expensive heap allocation can be applied. We have implemented a lightweight and fast escape analysis within the CACAO Java Virtual Machine to enable stack allocation. The analysis proceeds in two stages: an intraprocedural analysis computes escape information for each allocation site within a single method and builds call-context agnostic summary information for the method. The summary information is then used during interprocedural analysis to capture the escape behavior of method arguments. The computed escape information is finally used to allocate a subset of thread-local Java objects on the call stack. The implementation has been evaluated using the SPEC JVM98 and the dacapo benchmark suites. For the SPEC benchmarks up to 90% of all objects allocated at runtime can be allocated on the call stack, leading to a speed up of up to 69%. The more complex dacapo benchmarks still show speedups of up to 10%, with up to 20% of all objects being allocated on the stack.
CACAO虚拟机中对象的堆栈分配
对象的堆栈分配减少了对象分配和垃圾收集的成本,因此可以大大减少运行时的时间。逸出分析可以通过检查分配站点的逸出行为来静态地确定哪些对象有资格进行堆栈分配。如果在特定分配站点创建的对象没有转义,即保证不会离开分配站点的范围,则可以应用堆栈分配而不是昂贵的堆分配。我们在CACAO Java虚拟机中实现了一个轻量级和快速的转义分析,以支持堆栈分配。分析分两个阶段进行:过程内分析为单个方法中的每个分配站点计算转义信息,并为该方法构建与调用上下文无关的摘要信息。然后在过程间分析期间使用摘要信息来捕获方法参数的转义行为。计算出的转义信息最后用于在调用堆栈上分配线程本地Java对象的子集。该实现已经使用SPEC JVM98和dacapo基准测试套件进行了评估。对于SPEC基准测试,在运行时分配的所有对象中,多达90%可以在调用堆栈上分配,从而使速度提高高达69%。更复杂的dacapo基准测试仍然显示出高达10%的加速,其中多达20%的对象被分配到堆栈上。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信