A study of exception handling and its dynamic optimization in Java

Citation
T. Ogasawara et al., A study of exception handling and its dynamic optimization in Java, ACM SIGPL N, 36(11), 2001, pp. 83-95
Citations number
52
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
36
Issue
11
Year of publication
2001
Pages
83 - 95
Database
ISI
SICI code
1523-2867(200111)36:11<83:ASOEHA>2.0.ZU;2-L
Abstract
Optimizing exception handling is critical for programs that frequently thro w exceptions. We observed that there are many such exception-intensive prog rams in various categories of Java programs. There are two commonly used ex ception handling techniques, stack unwinding and stack cutting. Stack unwin ding optimizes the normal path, while stack cutting optimizes the exception handling path. However, there has been no single exception handling techni que to optimize both paths. We propose a new technique called Exception-Directed Optimization (EDO), wh ich optimizes exception-intensive programs without slowing down exception-m inimal programs. EDO, a feedback-directed dynamic optimization, consists of three steps, exception path profiling, exception path inlining, and throw elimination. Exception path profiling attempts to detect hot exception path s. Exception path inlining compiles the catching method in a hot exception path, inlining the rest of methods in the path. Throw elimination replaces a throw with the explicit control flow to the corresponding catch. We imple mented EDO in IBM's production Justin-Time compiler, and obtained the exper imental results, which show that, in SPECjvm98, it improved performance of exception-intensive programs by up to 18.3% without affecting performance o f exception-minimal programs at all.