Conrad Benham Java Opcode and Runtime Data Analysis By: Conrad Benham Supervisor: Professor Arthur Sale
Conrad Benham Project Goals To collect data on Java’s: Opcodes, Runtime System and Create a program to automate this. These statistics will be used by Professor Sale to create an optimised Hardware Java Virtual Machine (JVM).
Conrad Benham Why do this? - Competitive Analysis Presently there are few JVMs implemented in hardware. Existing implementations rarely have published documented to the level necessary for advanced research. Java statistics are often difficult to obtain or sketchy in detail.
Conrad Benham Why do this? - Research Analysis Statistics will identify most common opcodes. Allows hardware developers to focus on optimising a specific sub-set of the opcodes. Findings will be published to help other research efforts. Presently there are few tools which collect data of this kind.
Conrad Benham So how does Java work? Java Source Code Created by Java Programmer Java Compiler Produces Java Byte Codes Platform Independent JVM Runs Java Byte Codes Go to Sun Microsystems’ Java web site at: FOR MORE INFO...
Conrad Benham What are we looking for? Static Data collected from the byte codes. does not change during execution time. will change at compile time. Dynamic Data collected at runtime. will change at runtime (depending on inputs to a program).
Conrad Benham Static Data Includes data found in Java class files e.g. the iadd instruction which adds two integer operands on the operand stack together and pushes the result back on the stack. Branching Instructions The offset of instructions resulting from the conditional statements (i.e. if, while, switch, try).
Conrad Benham Types of Branching Instruction Forward i.e. if, else, switch and try. Backward i.e. loops such as for and while
Conrad Benham Dynamic Data Includes runtime analysis e.g. average loop iterations, processor usage, memory usage. analysing feasibility of using registers, efficient heap allocation/de-allocation and garbage collection routines.
Conrad Benham Analysis Benchmarks There are a number of benchmark suites available: Including the Dhrystone and Whetstone benchmarks Benchmark code must be: representative of most Java applications, they must follow the typical programmers coding style able to test a JVM in terms of of how much system resources it uses (e.g processor usage and memory usage).
Conrad Benham Method of Collection Static Data Source Code Compilation Class File Disassembly File Parsing Dynamic Data Not finalised Memory usage patterns Execution times Other performance issues
Conrad Benham Demonstration
Conrad Benham Conclusion Relatively few organisations have collected data on Java, the emphasis is on code optimisation. The main aim of this project is to create and collect reusable components, data and statistics for other research. Comments and questions.