Generating realistic trace files for memory management simulators by instrumenting IBM's J9 Java Virtual Machine

Thumbnail Image



Journal Title

Journal ISSN

Volume Title


University of New Brunswick


High-level programming languages like Java, C#, or Python rely on memory management systems that allocate and free objects automatically. A Java Virtual Machine (JVM) is responsible to execute compiled Java code. Several JVM implementations are available that include ongoing improvements throughout many years with reductions in execution time and memory footprint as well as the addition of new features. JVM implementations are large-sized projects that consist of many files, classes, and functions. Changing or extending the code can be a difficult and time consuming task. Therefore, simulators that reproduce desired JVM operations are available. They can be used to implement and test new features in little time. As with the Java Virtual Machine, a simulator requires instructions as form of input files with information on what operations to perform. These files are called trace files and they are generated with an instrumented JVM. Relevant operations are captured and printed into a file while running the JVM. This master's thesis focuses on the generation of trace files that represent JVM operations as realistically as possible. At the start of this project, two types of trace file generators already exist. Unfortunately, both of them contain errors that lead to a false JVM representation. Thereby, results gathered from simulators are unreliable. A new form of trace file generation is required that is able to produce correct inputs for a simulator. The project presented in this thesis captures JVM operations directly from IBM's J9 Java Virtual Machine's bytecode instructions. In addition, a comparison between previous and new trace files and their different effects on the simulator is part of this thesis.