Skip to content

erik-brangs/method-specialization-sketch-for-Jikes-RVM

 
 

Repository files navigation

Method specialization sketch for Jikes RVM

This repository contains code for an implementation of method specialization for Jikes RVM that I wrote in 2012. The code is incomplete. I was originally planning to do some more work on this but I've come to the conclusion that I would rather spend the time on something else. I'm publishing this as it is; some parts of the code might be useful for someone else.

I've removed the development history by squashing the commits. The original work was done in a Mercurial repository and I didn't want to spend time migrating the history to Git.

What's implemented?

The code implements method specialization as a compiler optimization, i.e. method specialization in the spirit of papers such as "Selective specialization for object-oriented languages" by Dean et al. or "Design and Evaluation of Dynamic Optimizations for a Java Just-In-Time Compiler" by Suganuma et al.

The implementation in this repository is much less sophisticated and more buggy, of course. It provides parameter profiling of baseline compiled application methods on IA32 32-bit via listeners and allows specialization of methods on exactly one non-receiver parameter method.

Notes on the implementation

  • both parameter profiling and specialization are deactivated by default and must be switched on with flags
  • parameter profiling only supports 32-bit Linux IA32-baseline compiled methods; everything else (including opt-compiled methods) is unsupported
  • the implementation lacks useful heuristics for choosing the parameter to specialize on
  • the specialization implementation doesn't work with tail recursion elimination
  • the specialization implementation doesn't allow combining a thread-local invocation specialization and specialization on a method parameter
  • method specialization is implemented directly in BC2IR. It would probably better to do this in a separate compiler phase.
  • the synchronization of the listeners is too coarse

Building

Works the same as a normal Jikes RVM.

If you're building with require.rvm-unit-tests=true, please note that I've added specialization tests to OptTestHarnessTest. This has significantly increased the runtime for that test. For example, on prototype-opt on an old IA32 machine, the OptTestHarnessTest alone might take 1 minute.

License

The code is provided to you under the Eclipse Public License, the same license that the Jikes RVM uses.

Support

As described above, I don't plan to do further development on this so the code is unsupported.

References

In addition to the references mentioned above, I found the following references interesting (your mileage may vary):

  • "Runtime value specialization" by Panagiota Bilianou. The literature section covers most of the relevant works. The thesis also contains a chapter about possible integration of specialization with the adaptive optimization system. The thesis is available for free after registration via the electronic thesis online service of the British Library. See http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.549159 .
  • "Constraint based optimization of stationary fields" by Rogers et al.
  • "A methodology for procedure cloning" (1993) and "Procedure cloning"(1992) by Cooper et al.

Original Jikes RVM readme follows

Jikes Research Virtual Machine

Jikes RVM (Research Virtual Machine) provides a flexible open testbed to prototype virtual machine technologies and experiment with a large variety of design alternatives. The system is licensed under the EPL, an OSI approved license. Jikes RVM runs on IA32 32 bit (64 bit support is work in progress) and PowerPC (big endian only).

A distinguishing characteristic of Jikes RVM is that it is implemented in the Java™ programming language and is self-hosted i.e., its Java code runs on itself without requiring a second virtual machine. Most other virtual machines for the Java platform are written in native code (typically, C or C++). A Java implementation provides ease of portability, and a seamless integration of virtual machine and application resources such as objects, threads, and operating-system interfaces.

More information is available at our website.

Building

You'll need

  • a JDK (>= 6)
  • Ant (>= 1.7) with optional tasks
  • GCC with multilibs
  • Bison
  • an internet connection during the first build to download GNU Classpath and other components

Please see the user guide for more details.

Need support?

Please ask on the researchers mailing list.

Bug reports

If you want to report a bug, please see this page on our website.

Contributions

See the contributions page for details.

The short version:

  • Contributions are licsensed under EPL and require a Contributor License Agreement. You keep your copyright.
  • You can send us patches or use pull requests. Send patches to the core mailing list.
  • It is ok to test on one platform only (e.g. only on IA32).

Work based on Jikes RVM

For work based on Jikes RVM, see our publications page. Bear in mind that this page is almost always incomplete. You can help rectify this by submitting pull requests or patches against the website repository. Additionally, some authors have decided to publish the code for their papers in the research archive at Sourceforge.

Other GitHub repositories that are based on Jikes RVM

There are a lot of projects on GitHub that are based on Jikes RVM but aren't forks of this repository. If you want your project listed (or not listed) here, please send us a patch or pull request.

The list is divided into repositories with code changes and additional information (description, README, paper, thesis, ...), repositories that have code changes but no (known) support material and repositories where it's unclear if there are actually any code changes against the base Jikes RVM.

Projects with code changes and additional information

Projects with code changes but without any additional information

Projects that may or may not have any changes compared to a released version of Jikes RVM

History

The project migrated from Subversion to Mercurial and from Mercurial to Git. Certain older changes are not contained in this repository. If you need access to these changes, you can browse the old repositories at SourceForge. The relevant parts of the old repositories are also mirrored on GitHub (see below).

The last commit in the Mercurial repository is commit #11358 (hg commit id d4ced37a7a0d) from Tue, 08 Sep 2015 13:55:48 +0200. The matching commit in this Git repository has the commit id 871ee0e826c161c8cb99bba7280dced6da850779.

The last interesting commit in the Subversion repository is commit #16061 (Move assertion on heavy lock state to within lock mutex to avoid possible race with inflation code). The matching commit in this Git repository has the commit id 164e4f465640364da0b135b78307e8cf1de8a070. The very last commit in the Subversion repository is commit #16068 (disable runs on piccolo until we get hg working on AIX.).

Mirrors of the old repositories on GitHub:

About

Jikes RVM (Research Virtual Machine) with a sketch of an implementation of method specialization

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 91.1%
  • HTML 5.1%
  • C 2.0%
  • Shell 0.9%
  • C++ 0.4%
  • Perl 0.3%
  • Other 0.2%