1 / 11

Dept of Computer & Information Sciences University of Delaware

Dept of Computer & Information Sciences University of Delaware. JikesRVM. Contents. Introduction to JikesRVM Optimizations IRs (Intermediate Representations) Modifying the JikesRVM Steps For Project1 Questions. Introduction to JikesRVM. This is not a Java source compiler.

jerom
Download Presentation

Dept of Computer & Information Sciences University of Delaware

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dept of Computer & Information Sciences University of Delaware JikesRVM

  2. Contents • Introduction to JikesRVM • Optimizations • IRs (Intermediate Representations) • Modifying the JikesRVM • Steps For Project1 • Questions

  3. Introduction to JikesRVM • This is not a Java source compiler. • JikesRVM is a Virtual Machine. • Converts from Byte code  Machine Code

  4. Introduction to JikesRVM • Functions of the RVM • Loads class files when needed • Converts the class files (OS independent bytecode) to machine code (OS and Architecture dependent) • Optimizes byte code in the process of the above conversion. • Tracks Compilation time and provides rudimentary profiling.

  5. Compiling Jikes • Download the gz file from source forge http://downloads.sourceforge.net/jikesrvm/jikesrvm-3.0.1.tar.gz?use_mirror=superb-westby using the command wget <web link> • Untar the file “tar –zxf jikesrvm-3.0.1.tar.bz2” • Inside the jikesrvm directory create a new .ant.properties file (http://www.cis.udel.edu/~skulkarn/ta_files/.ant.properties ) • Run command “java-config -s sun-jdk-1.6” • Inside this directory run “ant” and this would create the executable image of the rvm. • Binaries are stored in (jikesrvm-3.0.1/dist/FastAdaptiveGenMS_x86_64-linux) folder • Compile your source code with the javac command and run using the “rvm” binary present in the above folder. • You may want to add this directory to the PATH environment variable.

  6. Optimization • Levels of Optimization: O0 to O3. • List of optimizations (http://www.cis.udel.edu/~skulkarn/ta_files/OptLevels.tar.gz ) • Number of steps in an optimization level:

  7. Intermediate Representations

  8. Important source directories • Package responsible for choosing the optimizations is org.jikesrvm.compilers.opt.driver • OptimizationPlanner.java: is responsible for creating the list of optimizations that the code would go through. • CompilationPlan.java: Performs those optimizations in the order that was set in OptimizationPlanner. • Actuall implementations of the optimizations can be found under the root package org.jikesrvm.compilers.opt e.g. LocalCastOptimization.java is the implementation LocalCastOptimization.

  9. Modifying the JikesRVM • Adding of a new command line argument • Directory “jikesrvm-3.0.0/rvm/src-generated/options” • Change ValueOptions.opt.dat or BooleanOptions.opt.dat • Remember that the number of new lines also are important. So do not upset those. • You will have to clean the previous build by using “ant very-clean” command • Build again by “ant” command.

  10. Steps for Project1 • Based on the steps provided on the class website: • Step1: Writing a Java Code. • Step2: Screenshot of running the RVM. • Step3: use “time rvm <command line parameters>” to count the time taken. • Step4: Turn off optimizations and compare the resulting running time.

  11. Questions? Most of the files and this presentation is available at http://www.cis.udel.edu/~skulkarn/ta.html

More Related