4,9 · 10−8
7,6 · 10−8
1,5 · 10−7
1,0 · 10−4
2,7 · 10−8
6,2 · 10−6
6,4 · 10−3
Table IV. Relative inaccuracy of the computed number of executed bytecodes.
instructions in the accounting block not to be executed, even though they have been included in the consumption counter. Consequently, the computed consumption may indicate more bytecodes than really executed. The degree of this inaccuracy was determined by comparison with the exact number of executed bytecodes, which was obtained by modifying our accounting block analysis so that any bytecode that may throw an exception ends a block. While this allows fully precise bytecode counting, the overhead is high (code size and execution time), because many more locations are instrumented.
As illustrated in Table IV, the relative inaccuracy is below 0,1% for all benchmarks except ‘jack’, which is known to be a particularly exception-intensive program [10, 27]. We conclude that our chosen accounting block analysis reconciles accurate bytecode counting with reduced instrumentation overhead.
7.3. Impact on Code Size
One of our goals in designing the optimizations is to limit the num- ber of bytecode instructions added during the transformations. This is to avoid negative effects on locality, which may reduce overall per- formance, and also to help making J-RAF2 a reasonable option for embedded devices, with less memory than desktop and server systems. The Simple rewriting scheme expands the code by 17%, whereas the SPP transformation increases the size by 14% (averages calculated on the JDK class files of both Sun 1.5.0 and IBM 1.4.2).
The increased size may result in code validity problems if, before transformation, a method already is close to the limits defined by the JVM specification  (the maximum number of bytecodes in a method is 64K) and its instruction set (standard unconditional jumps and conditional branches may only express positive and negative offsets of 32K bytecodes). It is the task of the lower layer of our tool (currently provided by BCEL ) to ensure the transparent conversion of jumps and branches into their wide, 64K bytecodes-enabled counterparts when