A s most people who have used or worked with Java will testify, serious performance issues
need to be addressed. Java is part of the emergence of a whole new class of highly dynamic and
object-oriented programming languages which present new challenges to the
established field of Compiler Optimizations. Given the popularity of these, and Java in particular, there is now a
great incentive for addressing related performance issues.
Java is compiled to classfiles that hold platform independent bytecode. Classfiles have a special feature
whereas they can hold user defined attributes. Adding custom attributes to classfiles will not change their
semantics as JVMs simply ignore attributes they do not understand. There is ongoing research on how to exploit
this classfile facility to improve the runtime performance of Java. In particular efforts have been devoted to
developing Virtual Register Allocation schemes for bytecode.
I have written a paper and a presentation describing how the Runtime performance of Java could benefit by annotating
Java code by means of classfile attributes and which detail how support for this feature has been added and implemented in
Soot . Soot is a Bytecode Optimization Framework being developed by the Sable Compiler Research
Group. It allows a user to easily implement high-level program analyses and transformations starting from a bytecode
representation. As detailed in my paper,
I have added attribute generation support to Soot, enabling new Soot based analyses to easily produce bytecode annotations.
Work involving identifying safe Java array accesses has already made use of Soot annotations. The analysis
creates ArrayCheckAttributes that are propagated by Soot to classfiles to flag safe array accesses.
The paper is available in pdf format here
You can either browse the presentation online or download it in PowerPoint format.
A paper that
builds on the information presented here will be presented at the upcoming
CASCON 2000 conference
next November, in Mississauga Canada.
|