Efficient Java']Java exception handling in just-in-time compilation

被引:2
作者
Lee, SI [1 ]
Yang, BS [1 ]
Moon, SM [1 ]
机构
[1] Seoul Natl Univ, Sch Elect Engn, Seoul 151742, South Korea
关键词
!text type='Java']Java[!/text] virtual machine; exception handling; just-in-time compiler; on-demand translation; exception handier prediction;
D O I
10.1002/spe.622
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Java uses exceptions to provide elegant error handling capabilities during program execution. However, the presence of exception handlers complicates the job of the just-in-time (JIT) compiler, while exceptions are rarely used in most programs. This paper describes two techniques for reducing such complications. First, we delay the translation of an exception handier until the exception really occurs. This on-demand translation of exception handlers allows more optimizations when translating the main flow, without being hindered by constraints caused by the exception flows. Secondly, for those exceptions that are actually thrown during program execution we insert exception-type check code and a direct branch to the translated exception handlers. This exception handler prediction is motivated by an observation that frequently thrown exceptions are likely to be handled by the same exception handlers, so this will eliminate the exception processing overhead of the Java virtual machine. Our experiments indicate that the code quality of the main flow is no longer affected by the presence of exception handlers. Also, frequently thrown exceptions can be efficiently handled by the exception handier prediction. Copyright (C) 2004 John Wiley Sons, Ltd.
引用
收藏
页码:1463 / 1480
页数:18
相关论文
共 17 条
  • [1] AGESEN O, 1998, PROGRAMMING LANGUAGE, P269
  • [2] Arnold K., 2000, JAVA PROGRAMMING LAN
  • [3] GUPTA M, 2000, P 14 EUR C OBJ OR PR
  • [4] HOELZLE U, 1994, THESIS STANDFORD U S
  • [5] KRALL A, 1998, P ACM 1998 WORKSH JA, P15
  • [6] LEE S, 2000, P ACM 2000 JAV GRAND
  • [7] LINDHOLM T, 1997, JAVA MACHINE SPECIFI
  • [8] SENTINEL SCHEDULING - A MODEL FOR COMPILER-CONTROLLED SPECULATIVE EXECUTION
    MAHLKE, SA
    CHEN, WY
    BRINGMANN, RA
    HANK, RE
    HWU, WMW
    RAU, BR
    SCHLANSKER, MS
    [J]. ACM TRANSACTIONS ON COMPUTER SYSTEMS, 1993, 11 (04): : 376 - 408
  • [9] MOON SM, 2000, COMPUTER, V33, P41
  • [10] OGASAWARA T, 2001, P 2001 ACM SIGPLAN C