Felix Kwok (wkwok@sable.mcgill.ca)
September 5, 2000
This note explains how to apply Variable Type Analysis to whole-program optimizations. The user should first be familiar with material in both Soot command-line options and Phase options.
For more information on VTA, see the Sable technical report 1999-4.
Soot provides tools for whole-program optimizations in the wjop pack, some of which uses VTA. To use these tools, one must run soot in whole-program mode and must have turned on optimization. This is accomplished by the command-line options --app and -W. Also, since VTA needs to analyze the bodies of the java library code, one must include the command-line option -a or --analyze-context to tell Soot to obtain Jimple code for library methods.
StaticInliner (phase wjop.si) does the following:
StaticMethodBinder (phase wjop.smb) does the following:
By default, StaticInliner and StaticMethodBinder uses Class Hierarchy Analysis (CHA) to find monomorphic call sites. Changing the VTA-passes option can cause them to use VTA once or several times.
--dynamic-packages sun.security.providerwill mark a class like sun.security.provider.Provider as potentially dynamic.
java -mx300m soot.Main --app -W -a -p wjop.smb disabled:false -p wjop.si disabled -p wjop.smb VTA-passes:2 spec.benchmarks._201_compress.MainThis command runs StaticMethodBinder instead of StaticInliner. It also asks Soot to apply VTA twice on the analysis. It analyzes library classes, but does not include any dynamic packages. The -mx300m switch is present so that the virtual machine is allowed to use more memory (300 Mb) than the default value (since whole-program analysis usually uses a lot of memory). Note that the switch for allowing more memory usage may be different depending on the virtual machine used.
java -mx500m soot.Main --app -W -a --dynamic-packages java.text.resources,spec.benchmarks._213_javac SpecApplicationThis command runs StaticInliner with no VTA. It uses CHA to find monomorphic sites. It analyzes library classes, and it includes all classes in the packages java.text.resources, spec.benchmarks._213_javac, or any of their subpackages, as potentially dynamic classes. It allows the virtual machine to use 500 Mb of memory.
This document was generated using the LaTeX2HTML translator Version 99.2beta6 (1.42)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html vta -split 0 -nonavigation -dir ./
The translation was initiated by Feng QIAN on 2000-10-10