Stack allocation of objects in the cacao virtual machine

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

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.

Original languageEnglish
Title of host publicationProceedings of the 7th International Conference on Principles and Practice of Programming in Java, PPPJ 2009
Pages153-161
Number of pages9
DOIs
Publication statusPublished - 23 Nov 2009
Externally publishedYes
Event7th International Conference on Principles and Practice of Programming in Java, PPPJ 2009 - Calgary, AB, United States
Duration: 27 Aug 200928 Aug 2009

Publication series

NameProceedings of the 7th International Conference on Principles and Practice of Programming in Java, PPPJ 2009

Conference

Conference7th International Conference on Principles and Practice of Programming in Java, PPPJ 2009
Country/TerritoryUnited States
CityCalgary, AB
Period27/08/0928/08/09

Keywords

  • Escape analysis
  • Just-in-time compiler
  • Object allocation on stack

Fingerprint

Dive into the research topics of 'Stack allocation of objects in the cacao virtual machine'. Together they form a unique fingerprint.

Cite this