Abstract
The Java language provides exceptions in order to handle errors gracefully. However, the presence of exception handlers complicate the job of a JIT (Just-in-Time) compiler, including optimizations and register allocation, even though exceptions are rarely used in most programs. This paper describes some mechanisms for removing overheads imposed by the existence of exception handlers, including on-demand translation of exception handlers, which expose more optimization opportunities in normal flow. In addition, we also minimize the exception handling overhead for frequently thrown exceptions by jumping directly from the exception throwing point into the exception handler through a technique called exception handler prediction. Experiments show that the existence of exception handlers indeed does not interfere with the translation of normal flow using our exception handling mechanisms. Also, the results reveal that frequently thrown exceptions are efficiently handled with exception handler prediction.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have