Felix Kwok (wkwok@sable.mcgill.ca)
September 5, 2000
This note explains how to use call graph information for whole-program devirtualization optimizations. The user should first be familiar with material in both Soot command-line options and Phase options.
Soot provides tools for whole-program optimizations in the wjop pack. 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 option -W. Since we want Soot to output all the classes in our application, we should also use the -app option.
StaticInliner (phase wjop.si) does the following:
StaticMethodBinder (phase wjop.smb) does the following:
By default, the call graph is build using CHA. Spark can be used instead by enabling it with the option -p cg.spark on. Spark can also simulate other analyses such as VTA (-p cg.spark vta) or RTA (-p cg.spark rta).
--dynamic-package sun.security.providerwill mark a class like sun.security.provider.Provider as potentially dynamic.
java -mx300m soot.Main --app -W -p wjop.smb on -p wjop.si off spec.benchmarks._201_compress.MainThis command runs StaticMethodBinder instead of StaticInliner. It 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 --dynamic-package java.text.resources --dynamic-package spec.benchmarks._213_javac SpecApplicationThis command runs StaticInliner. 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 2008 (1.71)
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 devirt -split 0 -nonavigation -dir ./
The translation was initiated by Eric Bodden on 2012-01-22