Home
General
Staff
Contact
Partners
Alumni
Research
Areas
Projects
Papers
Books
Reports
Awards
Teaching
Lectures
Exams
B.Projects
M.Theses
PhD Theses
Go Abroad
Misc
Library
Seminars
Gallery
Links
Search
Webmaster
|
Compiler and JVM Research at JKU
Since 2001 the Institute for System Software at the Johannes Kepler University (JKU) in Linz, Austria,
has been collaborating with the Java HotSpot™ team of Oracle (formerly Sun Microsystems) and the Maxine group of Oracle Labs
(formerly Sun Labs) to improve the performance of the HotSpot™ client compiler, the HotSpot™ VM, and the Maxine VM.
So far, three PhD theses have been completed and three more are in preparation. Two of the former JKU researchers are now
Engineers at Oracle Labs. Part of our research also found its way into the product version of the JDK.
Here is a picture of the involved researchers as of May 2012:
This page describes our research in the following areas:
Most of this work was funded by Oracle Inc. (formerly Sun Microsystems). We gratefully acknowledge
the support of the members of the Java HotSpot™ team (David Cox, Kenneth Russell, Thomas Rodriguez, John Rose)
and the Maxine group of Oracle Labs (Mario Wolczko, Doug Simon, Laurent Daynes).
Team
This is our most recent research project in which we develop a new Java just-in-time compiler
written in Java that works with both the Maxine Research VM and the HotSpot™ VM. It
features a new internal program representation that allows more aggressive optimizations.
Some goals for the near future are to improve the peak performance of the compiler with a
focus on vectorization (using the latest Intel vector instruction set) and on aggressive
memory optimizations.
This project is part of OpenJDK, it can be found here.
- Lukas Stadler, Gilles Duboscq, Hanspeter Mössenböck, Thomas Würthinger:
Compilation Queuing and Graph Caching for Dynamic Compilers
Proceedings of the 6th workshop on Virtual Machines and Intermediate Languages (VMIL'12), as part of the 3rd Annual Splash Conference, October 19-26, 2012, Tucson, Arizona, USA, pp.45-53
The Dynamic Code Evolution Virtual Machine (DCE VM) is a modification of the Java HotSpot™ VM
that allows unlimited redefinition of loaded classes at runtime. The current hotswapping mechanism
of the HotSpot™ VM allows only changing method bodies. Our enhanced VM allows adding and
removing fields and methods as well as changes to the super types of a class.
This is an open source project released under the GPL v2.0. For details
including source code and binaries see here.
- Thomas Würthinger, Christian Wimmer, Lukas Stadler:
Unrestricted and Safe Dynamic Code Evolution for Java
Science of Computer Programming, Elsevier, 2011.
- Thomas Würthinger, Danilo Ansaloni, Walter Binder, Christian Wimmer, Hanspeter Mössenböck:
Safe and Atomic Run-time Code Evolution and its Application to Dynamic AOP
Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and
Applications 2011 (OOPSLA'11), Portland Oregon, October 22-27, 2011, pp.825-841.
- Thomas Würthinger:
Dynamic Code Evolution for Java
PhD thesis, Johannes Kepler University Linz, April 2011.
- Thomas Würthinger, Christian Wimmer, Lukas Stadler:
Dynamic Code Evolution for Java
8th Intl. Conf. on the Principles and Practice of Programming in Java (PPPJ'10), Vienna, Austria, September 15-17, 2010.
- Thomas Würthinger, Walter Binder, Danilo Ansaloni, Philippe Moret, and Hanspeter Mössenböck:
Applications of Enhanced Dynamic Code Evolution for Java in GUI Development and Dynamic Aspect-oriented Programming
9th Intl. Conf. on Generative Programming and Component Engineering (GPCE'10), Eindhoven, The Netherlands, October 10-13, 2010.
- Thomas Würthinger, Walter Binder, Danilo Ansaloni, Philippe Moret, and Hanspeter Mössenböck:
Improving Aspect-Oriented Programming with Dynamic Code Evolution in an Enhanced Java Virtual Machine
7th ECOOP'10 Workshop on Reflection, AOP and Meta-Data for Software Evolution.
This research investigates garbage collection techniques targeted at multi-tasking client
Java environments for high-end mobile devices, i.e. smartphones, MIDs and consumer devices
that have a low amount of memory, decreased memory bandwidth and less processing power than
regular desktops. Garbage collection of concurrent tasks should be isolated from each other
and should guarantee short and regular pause times.
Although these are the primary target platforms, we also investigate applications on regular
Java virtual machines with high concurrency and large heaps.
- Thomas Schatzl, Laurent Daynès, Hanspeter Mössenböck:
Optimized Memory Management for Class Metadata in a JVM
9th Intl. Conf. on the Principles and Practice of Programming in Java (PPPJ'11),
Kongens Lyngby, Denmark, August 24-26, 2011, pp.151-160.
This work shows that the impact of class metadata memory management on garbage collection
is significant. It proposes an approach based on metaspaces and linkset graphs to remove
compaction costs and hence significantly decrease tracing and full collection time. These
techniques also enable fully isolated class unloading and metadata reclamation in
multi-tasking JVMs.
Trace-based compilation is a special form of just-in-time compilation in which frequently executed paths
of a program (instead of frequently executed methods) are translated to machine code. Traces can cross method boundaries,
so that the method invocation overhead is eliminated in many cases. This increases the peak performance.
Furthermore, trace-based compilation can reduce JIT compilation time and may also generate less machine code.
Whereas traditional trace compilation usually identifies traces only within loops we also look at traces that start
at other program locations.
This work is funded by the Austrian Science Foundation (FWF) under the project number P22493-N18.
Coroutines are non-preemptive light-weight processes. Their advantage over threads is that they
do not have to be synchronized because they pass control to each other explicitly and
deterministically. Coroutines are therefore an elegant and efficient implementation
construct for numerous algorithmic problems.
- Lukas Stadler:
Serializable Coroutines for the HotSpot™ Java Virtual Machine
Master's thesis, Johannes Kepler University Linz, February 2011.
This thesis provides a description of the basics of JVMs and coroutines and how they fit together, followed by an introduction into the Java API for coroutines.
It shows the details of the prototype implementation, along with performance measurements and source code examples.
This thesis also introduces the notion of coroutine serialization and thread-to-thread migration.
- Lukas Stadler, Thomas Würthinger, Christian Wimmer:
Efficient Coroutines for the Java Platform
8th Intl. Conf. on Principles and Practice of Programming in Java (PPPJ'10),
pp. 20-28. ACM Press, 2010. doi:10.1145/1852761.1852765
This conference paper describes the basic algorithm of our prototype implementation, which combines a stack-based approach for fast switching between coroutines with a copying based approach that allows large numbers of coroutines to be generated.
Continuations, or 'the rest of the computation', are a concept that is most often used in the
context of functional and dynamic programming languages. Our implementation of continuations
in the Java virtual machine uses a lazy or on-demand approach. Our system imposes zero run-time
overhead as long as no activations need to be saved and restored and performs well when continuations are used.
- Lukas Stadler, Christian Wimmer, Thomas Würthinger, Hanspeter Mössenböck, John Rose:
Lazy Continuations for Java Virtual Machines
7th Intl. Conf. on Principles and Practice of Programming in Java (PPPJ'09),
pp. 143-152. ACM Press, 2009. doi:10.1145/1596655.1596679
This conference paper introduces a very fine-grained ("lazy") approach to continuation management.
This approach always rescues stack frames at the latest possible point in time and thus allows continuations to share large portions of their data with other continuations.
This can lead to significant savings of both run time and memory.
We changed the high-level intermediate representation of the client compiler to use static
single assignment (SSA) form, which simplifies global optimizations. Additionally, we
implemented a global register allocator that uses the linear scan algorithm. This work
is part of the production version since Java 6.
- Thomas Kotzmann, Christian Wimmer, Hanspeter Mössenböck, Thomas Rodriguez, Kenneth Russell, David Cox:
Design of the Java HotSpot™ Client Compiler for Java 6
In ACM Transactions on Architecture and Code Optimization, volume 5, issue 1, article 7. ACM Press, 2008. doi:10.1145/1369396.1370017
Explains the structure of the client compiler, its intermediate representations, and the optimization
algorithms. It describes the client compiler of the Java HotSpot™ VM of Java 6.
Java 7 and OpenJDK contain no significant changes, so all information up-to-date.
- Christian Wimmer:
Linear Scan Register Allocation for the Java HotSpot™ Client Compiler
Master's thesis, Institute for System Software, Johannes Kepler University Linz, 2004.
Extended description of the client compiler, with a focus on the register allocator.
Read Chapter 4 for if you are interested in the details of the compiler and the intermediate
representations. The term "research compiler" in this thesis refers to the product version
of Java 6 (which was not released at the time of writing).
- Christian Wimmer, Hanspeter Mössenböck:
Optimized Interval Splitting in a Linear Scan Register Allocator
ACM/USENIX Intl. Conf. on Virtual Execution Environments (VEE'05),
pp. 132-141. ACM Press, 2005. doi:10.1145/1064979.1064998
Description of the register allocation algorithm of the current client compiler.
- Hanspeter Mössenböck, Michael Pfeiffer:
Linear Scan Register Allocation in the Context of SSA Form and Register Constraints
Intl. Conf. on Compiler Construction (CC'02), LNCS 2304, pp. 229-246. Springer-Verlag, 2002.
Describes an early version of the work, so it does not reflect the current product version.
- Hanspeter Mössenböck:
Adding Static Single Assignment Form and a Graph Coloring Register Allocator to the Java HotSpot™ Client Compiler
Technical Report 15, Institute for Practical Computer Science, Johannes Kepler University Linz, 2000.
Describes an early version of the work, so it does not reflect the current product version. The graph coloring
register allocator was later replaced by the linear scan register allocator.
In this research project, we implemented a fast algorithm for escape analysis. It detects objects
that are accessible only by a single method or thread. Its results are used to replace fields of
objects with scalar variables, to allocate objects on the stack instead of the heap, and to remove
synchronization. The produced machine code is smaller and executes faster because fewer objects are
allocated on the heap and the garbage collector runs less frequently. Deoptimization is used to handle
dynamic class loading. There are currently no plans to integrate this work into the product version,
however it influenced the implementation of escape analysis for the server compiler.
- Thomas Kotzmann:
Escape Analysis in the Context of Dynamic Compilation and Deoptimization
PhD thesis, Institute for System Software, Johannes Kepler University Linz, 2005.
Describes the details of all algorithms and contains an extensive evaluation as well as a survey of related work.
- Thomas Kotzmann, Hanspeter Mössenböck:
Run-Time Support for Optimizations Based on Escape Analysis
Intl. Symposium on Code Generation and Optimization (CGO'07), pp. 49-60.
IEEE Computer Society, 2007. doi:10.1109/CGO.2007.34
Conference paper that describes the support necessary in the runtime system, the garbage collector, and the deoptimization framework.
- Thomas Kotzmann, Hanspeter Mössenböck:
Escape Analysis in the Context of Dynamic Compilation and Deoptimization
ACM/USENIX Intl. Conf. on Virtual Execution Environments (VEE'05),
pp. 111-120. ACM Press, 2005. doi:10.1145/1064979.1064996
Conference paper that describes the core algorithm for escape analysis that is integrated into the client compiler.
We designed a feedback-directed optimization system for object inlining and array inlining that utilizes
the just-in-time compiler and the garbage collector. Object inlining reduces the costs of field accesses
by combining referenced objects with their referencing object. The order of objects on the heap is changed
by the garbage collector so that they are placed next to each other. Then their offset is fixed, i.e. the
objects are colocated. This allows field loads to be replaced by address arithmetic using the just-in-time
compiler. Array inlining expands the concepts of object inlining to arrays, which are frequently used for
the implementation of dynamic data structures. There are currently no plans to integrate this work into
the product version.
- Christian Wimmer, Hanspeter Mössenböck:
Automatic Feedback-Directed Object Fusing
In ACM Transactions on Architecture and Code Optimization (TACO), volume 7, issue 2, pp. 7:1-7:35, September 2010.
Summary paper that covers all parts of the optimization, but does not describe the algorithmic details.
Read this if you want to get familiar with the topic.
- Christian Wimmer:
Automatic Object Inlining in a Java Virtual Machine
PhD thesis, Institute for System Software, Johannes Kepler University Linz, 2008.
Describes the details of all algorithms and contains an extensive evaluation as well as a survey of
related work. Read this if you are interested in the implementation details.
- Christian Wimmer, Hanspeter Mössenböck:
Automatic Array Inlining in Java Virtual Machines
Intl. Symposium on Code Generation and Optimization (CGO'08), pp. 14-23.
ACM Press, 2008. doi:10.1145/1356058.1356061
Conference paper that covers only the array inlining part of the optimization system.
- Christian Wimmer, Hanspeter Mössenböck:
Automatic Feedback-Directed Object Inlining in the Java HotSpot™ Virtual Machine
ACM/USENIX Intl. Conf. on Virtual Execution Environments (VEE'07),
pp. 12-21. ACM Press, 2007. doi:10.1145/1254810.1254813
Conference paper that covers only the object inlining part of the optimization system.
- Christian Wimmer, Hanspeter Mössenböck:
Automatic Object Colocation Based on Read Barriers
Joint Modular Languages Conference (JMLC'06), LNCS 4228, pp. 326-345.
Springer-Verlag, 2006. doi:10.1007/11860990_20
Conference paper that covers only the object colocation part. It describes an early version of the work, so it does not fully reflect the final version.
We added a fast algorithm for array bounds check elimination to the client compiler that optimizes frequently
used patterns of array accesses and uses the deoptimization facilities of the Java HotSpot™ VM. This is a
research project, but the algorithm could be part of a future product version.
- Thomas Würthinger, Christian Wimmer, Hanspeter Mössenböck:
Array Bounds Check Elimination in the Context of Deoptimization
In Science of Computer Programming, volume 74, issue 5-6, pp. 279-295. Elsevier, 2009. doi:10.1016/j.scico.2009.01.002
Journal paper that describes the optimization process. It shows how deoptimization is used, compares the algorithm with the server compiler, and contains an extensive evaluation.
- Thomas Würthinger, Christian Wimmer, Hanspeter Mössenböck:
Array Bounds Check Elimination for the Java HotSpot™ Client Compiler
5th Intl. Conf. on Principles and Practice of Programming in Java (PPPJ'07),
pp. 125-133. ACM Press, 2007. doi:10.1145/1294325.1294343
Conference paper that describes the optimization process, with a focus on the usage of deoptimization to avoid code duplication.
We implemented an optimization that fuses the string object with its character array that holds the
actual content. New bytecodes access the characters and allocate the strings. Nevertheless, the
optimization is implemented completely inside the VM. The necessary bytecode rewriting is performed
by the class loader. Optimized string objects are significantly smaller than the old string and its
character array. This eliminates field loads, reduces the memory pressure, and the time necessary
for garbage collection. It is a research project, but could show up in a future product version
because it has a high impact on the performance.
- Christian Häubl, Christian Wimmer, Hanspeter Mössenböck:
Compact and Efficient Strings for Java
Science of Computer Programming, volume 75, issue 11, pages 1077-1094. Elsevier, 2010. doi:10.1016/j.scico.2010.04.010
Journal paper that describes the optimization in detail and evaluates it when applied to the client and the server compiler.
- Christian Häubl, Christian Wimmer, Hanspeter Mössenböck:
Optimized Strings for the Java HotSpot™ Virtual Machine
6th Intl. Conf. on Principles and Practice of Programming in Java (PPPJ'08),
pp. 105-114. ACM Press, 2008. doi:10.1145/1411732.1411747
Conference paper that covers the most important parts of the implementation and shows performance results for the client compiler.
- Christian Häubl:
Optimized Strings for the Java HotSpot™ Virtual Machine
Master's thesis, Institute for System Software, Johannes Kepler University Linz, 2008.
This thesis describes the complete architecture and implementation of the optimization for the client compiler, together with a comprehensive evaluation.
Tail calls are necessary when compiling functional languages, like Scheme, to Java bytecodes.
It guarantees that no stack frame is created for recursive calls and thus no stack overflow occurs.
Tail calls are supported in the interpreter, the client compiler, and the server compiler.
The source code is available from the Da Vinci Machine project.
- Arnold Schwaighofer:
Tail Call Optimization in the Java HotSpot™ VM
Master's thesis, Institute for System Software, Johannes Kepler University Linz, 2009.
This thesis describes the complete architecture and implementation of the virtual machine changes, together with a comprehensive evaluation.
This is a visualization tool for the internal data structures of the Java HotSpot™ client compiler.
The tool shows the high-level and the low-level intermediate representations as well as the lifetime intervals
used for register allocation. Additionally, the bytecodes of the compiled methods can be shown. Both textual
and graphical views are available. The tool uses information emitted by the debug version of the Java
HotSpot™ VM, starting with Java 6.
- Homepage of the Java HotSpot™ Client Compiler Visualizer:
https://c1visualizer.dev.java.net
The homepage contains the binary download, the source code repository, and the documentation (several bachelor
theses and master's theses).
The Java HotSpot™ server compiler uses a single intermediate representation in all compiler phases,
called ideal graph. The tool saves snapshots of the graph during the compilation. It displays the graphs
and provides filtering mechanisms based on customizable JavaScript code and regular expressions.
High performance and sophisticated navigation possibilities enable the tool to handle large graphs with
thousands of nodes. The tool will be part of the OpenJDK soon, but there is no release available yet.
- Thomas Würthinger:
Visualization of Program Dependence Graphs
Master's thesis, Institute for System Software, Johannes Kepler University Linz, 2007.
This thesis describes the architecture and implementation of the tool and also contains a user guide.
It does not describe the final version, but is still up-to-date.
- Thomas Würthinger, Christian Wimmer, Hanspeter Mössenböck:
Visualization of Program Dependence Graphs
Intl. Conf. on Compiler Construction (CC'08), LNCS 4959, pp. 193-196.
Springer-Verlag, 2008. doi:10.1007/978-3-540-78791-4_13
A short tool demonstration paper that briefly sketches the purpose and structure of the application.
Here are some other papers that resulted from our JVM and compiler research.
|