Generating run-time compiler tests automatically [JEP 233]
Java is arguably the most used programming language and resides on an increasingly diverse number of platforms. This exacerbates the problem of running targeted compiler tests in an efficient manner. The purpose of JEP 233 was to create a tool that could automate the runtime compiler tests.
The tool that was created starts by generating a random set of Java source code and/or byte code. The generated code will have three key characteristics:
- Be syntactically correct
- Be semantically correct
- Use a random seed that permits reusing the same randomly-generated code
The source code that is randomly generated will be saved in the following directory:
hotspot/test/testlibrary/jit-tester
These test cases will be stored for later re-use. They can be run from the j-treg
directory or from the tool's makefile. One of the benefits of re-running saved tests is to test the stability of your system.