Transparent Gif

Department of Computer Science

University of California, Santa Barbara

Abstract

Online Verification of Offline Escape Analysis

by: M. Franz, V. Haldar, C. Krintz, C. Stork

Abstract:

Dynamic compilation often comes at the price of reduced code qualitysince there is not enough time available to perform expensiveoptimizations. One solution to this problem has been the addition ofannotations by the code producer that enable an annotation-aware dynamic code generator on the code consumer\'s side to shortcut certain analysis andoptimization steps. However, code annotation often creates a newproblem in that most annotations are unsafe---if they become corruptedduring transit, the safety of the target system is jeopardized.In this paper, we consider annotations that transport escape-analysisinformation for Java programs. This information can be highly beneficial,not only for enabling stack allocation instead of costly heap allocation, but also for reducing synchronization overhead. The traditional solution of annotating allocation sites, however, is unsafe and cannot be verified without repeating the complete analysis.Our solution consists of annotating variables rather than allocationsites, partitioning them into two classes. This annotation can be verified inlinear time. It is a conservative annotation and less precise than annotatingallocation sites, i.e., some optimization opportunitiesget lost in the process. However, our benchmarks suggest thatthe optimization potential that is actually lost in practice is close to zero.An interesting consequence of our annotation method is that it can beintegrated with an inherently safe program encoding that makes it impossibleto represent illegal programs in the first place. Adding our safe annotationsactually increases encoding density since it reduces the number of validchoices that need to be represented, so that the addition of theannotations comes at almost no space cost.

Keywords:

Dynamic Compilation, Annotation, Optimization, Compression, Escape Analysis

Date:

September 2002

Document: 2002-26

XHTML Validation | CSS Validation
Updated 14-Nov-2005
Questions should be directed to: webmaster@cs.ucsb.edu