Technology of Object-Oriented Languages and Systems
Dynamic Bytecode Usage by Object Oriented Java Programs
Nancy, France
June 07-June 10
ISBN: 0-7695-0275-X
Java is an object oriented language that has grown in popularity since its release in 1996 and is particularly interesting because it uses a bytecode intermediate language to represent programs, so that the same program can be run unchanged on machines with different underlying instruction sets.To measure dynamic bytecode usage it was necessary to modify the source code of Kaffe, a Java Virtual Machine. A selection of programs was measured to compare the way different applets and applications use the bytecodes, and it was found that very similar patterns of usage appear in all cases.For the test suite studied most of the bytecodes were used at least once during execution. However a small subset of the bytecodes was executed with very high frequency. 40% of instructions executed either pushed local variables or constants onto the operand stack, merely telling the useful instructions which operands to use.This result questions the stack based design for the intermediate representation of Java programs, since the bytecodes only occupy on average twelve percent of a class file, an intermediate representation that is less compact, but executes more efficiently might be possible.
Index Terms:
Java, Object Oriented Platform Design, Java Virtual Machine, bytecode
Citation:
John Waldron, "Dynamic Bytecode Usage by Object Oriented Java Programs," tools, pp.384, Technology of Object-Oriented Languages and Systems, 1999