|
ABSTRACT
This paper presents Soot, a framework for optimizing Java bytecode. The framework is implemented in Java and supports three intermediate representations for representing Java bytecode: Baf, a streamlined representation of bytecode which is simple to manipulate; Jimple, a typed 3-address intermediate representation suitable for optimization; and Grimp, an aggregated version of Jimple suitable for decompilation. We describe the motivation for each representation, and the salient points in translating from one representation to another.In order to demonstrate the usefulness of the framework, we have implemented intraprocedural and whole program optimizations. To show that whole program bytecode optimization can give performance improvements, we provide experimental results for 12 large benchmarks, including 8 SPECjvm98 benchmarks running on JDK 1.2 for GNU/Linuxtm. These results show up to 8% improvement when the optimized bytecode is run using the interpreter and up to 21% when run using the JIT compiler.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
Ali-Reza Adl-Tabatabai , Michał Cierniak , Guei-Yuan Lueh , Vishesh M. Parikh , James M. Stichnoth, Fast, effective code generation in a just-in-time Java compiler, ACM SIGPLAN Notices, v.33 n.5, p.280-290, May 1998
|
| |
2
|
Alfred V. Aho , Ravi Sethi , Jeffrey D. Ullman, Compilers: principles, techniques, and tools, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1986
|
| |
3
|
|
 |
4
|
Ana Azevedo , Alex Nicolau , Joe Hummel, Java annotation-aware just-in-time (AJIT) complilation system, Proceedings of the ACM 1999 conference on Java Grande, p.142-151, June 12-14, 1999, San Francisco, California, United States
[doi> 10.1145/304065.304115]
|
 |
5
|
David F. Bacon , Peter F. Sweeney, Fast static analysis of C++ virtual function calls, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.324-341, October 06-10, 1996, San Jose, California, United States
|
| |
6
|
{6} Lars R. Clausen. A Java bytecode optimizer using side-effect analysis. Concurrency: Practice & Experience, 9(11):1031-1045, November 1997.
|
| |
7
|
{7} Geoff A. Cohen, Jeffrey S. Chase, and David L. Kaminsky. Automatic program transformation with JOIE. In Proceedings of the USENIX 1998 Annual Technical Conference , pages 167-178, Berkeley, USA, June 15-19 1998. USENIX Association.
|
 |
8
|
R. Cytron , J. Ferrante , B. K. Rosen , M. N. Wegman , F. K. Zadeck, An efficient method of computing static single assignment form, Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.25-35, January 11-13, 1989, Austin, Texas, United States
[doi> 10.1145/75277.75280]
|
| |
9
|
{9} DashOPro. .http://www.preemptive.com/products.html.
|
 |
10
|
Jeffrey Dean , Greg DeFouw , David Grove , Vassily Litvinov , Craig Chambers, Vortex: an optimizing compiler for object-oriented languages, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.83-100, October 06-10, 1996, San Jose, California, United States
|
| |
11
|
|
| |
12
|
{12} Étienne Gagnon and Laurie Hendren. Intraprocedural Inference of Static Types for Java Bytecode. Sable Technical Report 1999-1, Sable Research Group, McGill University, March 1999.
|
| |
13
|
{13} Robert Fitzgerald, Todd B. Knoblock, Erik Ruf, Bjarne Steensgaard, and David Tarditi. Marmot: an Optimizing Compiler for Java. Microsoft technical report, Microsoft Research, October 1998.
|
 |
14
|
|
| |
15
|
{15} JavaClass. . http://www.inf.fu-berlin.de/dahm/JavaClass/.
|
| |
16
|
{16} Compaq JTrek. . http://www.digital.com/java/download/jtrek.
|
| |
17
|
{17} Han Bok Lee and Benjamin G. Zorn. A Tool for Instrumenting Java Bytecodes. In The USENIX Symposium on Internet Technologies and Systems, pages 73-82, 1997.
|
| |
18
|
|
| |
19
|
|
| |
20
|
{20} Gilles Muller, Bárbara Moura, Fabrice Bellard, and Charles Consel. Harissa: A flexible and efficient Java environment mixing byte-code and compiled code. In Proceedings of the 3rd Conference on Object-Oriented Technologies and Systems, pages 1-20, Berkeley, June 16-20 1997. Usenix Association.
|
| |
21
|
{21} Todd A. Proebsting, Gregg Townsend, Patrick Bridges, John H. Hartman, Tim Newsham, and Scott A. Watterson. Toba: Java for applications: A way ahead of time (WAT) compiler. In Proceedings of the 3rd Conference on Object-Oriented Technologies and Systems, pages 41-54, Berkeley, June 16-20 1997. Usenix Association.
|
| |
22
|
{22} SableCC. . http://www.sable.mcgill.ca/sablecc/.
|
| |
23
|
{23} Tatiana Shpeisman and Mustafa Tikir. Generating Efficient Stack Code for Java. Technical report, University of Maryland, 1999.
|
| |
24
|
{24} Soot - a Java Optimization Framework. . http://www.sable.mcgill.ca/soot/.
|
| |
25
|
{25} 4thpass SourceGuard. . http://www.4thpass.com/sourceguard/.
|
| |
26
|
{26} Vijay Sundaresan, Laurie Hendren, Chrislain Razafimahefa, Raja Vallée-Rai, Patrick Lam, and Étienne Gagnon. Practical Virtual Method Call Resolution for Java . Sable Technical Report 1999-2, Sable Research Group, McGill University, April 1999.
|
| |
27
|
{27} SuperCede, Inc. SuperCede for Java. . http://www.supercede.com/.
|
| |
28
|
{28} Frank Tip, Chris Laffra, Peter F. Sweeney, and David Streeter. Practical Experience with an Application Extractor for Java . IBM Research Report RC 21451, IBM Research, 1999.
|
| |
29
|
{29} Tower Technology. Tower J. . http://www.twr.com/.
|
| |
30
|
{30} Raja Vallée-Rai and Laurie J. Hendren. Jimple: Simplifying Java Bytecode for Analyses and Transformations. Sable Technical Report 1998-4, Sable Research Group, McGill University, July 1998.
|
CITED BY 65
|
|
|
|
|
Xianghua Deng , Matthew B. Dwyer , John Hatcliff , Masaaki Mizuno, Invariant-based specification, synthesis, and verification of synchronization in concurrent programs, Proceedings of the 24th International Conference on Software Engineering, May 19-25, 2002, Orlando, Florida
|
|
|
Stephen Drape , Oege de Moor , Ganesh Sittampalam, Transforming the .NET intermediate language using path logic programming, Proceedings of the 4th ACM SIGPLAN international conference on Principles and practice of declarative programming, p.133-144, October 06-08, 2002, Pittsburgh, PA, USA
|
|
|
|
|
|
John Hatcliff , Matthew B. Dwyer , Corina S. Păsăreanu , Robby, Foundations of the Bandera abstraction tools, The essence of computation: complexity, analysis, transformation, Springer-Verlag New York, Inc., New York, NY, 2002
|
|
|
Patrice Pominville , Feng Qian , Raja Vallée-Rai , Laurie Hendren , Clark Verbrugge, A framework for optimizing Java using attributes, Proceedings of the 2000 conference of the Centre for Advanced Studies on Collaborative research, p.8, November 13-16, 2000, Mississauga, Ontario, Canada
|
|
|
|
|
|
|
|
|
Eric Bodden, A high-level view of Java applications, Companion of the 18th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 26-30, 2003, Anaheim, CA, USA
|
|
|
|
|
|
|
|
|
|
|
|
Neil Ongkingco , Pavel Avgustinov , Julian Tibble , Laurie Hendren , Oege de Moor , Ganesh Sittampalam, Adding open modules to AspectJ, Proceedings of the 5th international conference on Aspect-oriented software development, March 20-24, 2006, Bonn, Germany
|
|
|
|
|
|
Mathew Zaleski , Marc Berndl , Angela Demke Brown, Mixed mode execution with context threading, Proceedings of the 2005 conference of the Centre for Advanced Studies on Collaborative research, p.305-319, October 17-20, 2005, Toranto, Ontario, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ross Tate , Michael Stepp , Zachary Tatlock , Sorin Lerner, Equality saturation: a new approach to optimization, Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, January 21-23, 2009, Savannah, GA, USA
|
|
|
|
|
|
|
|
|
Jun Chen , Steve MacDonald, Towards a better collaboration of static and dynamic analyses for testing concurrent programs, Proceedings of the 6th workshop on Parallel and distributed systems: testing, analysis, and debugging, p.1-9, July 20-21, 2008, Seattle, Washington
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|