DynamoRIO - Dynamic Native Optimization for Interpreters.
Abstract
For domain specific languages, "scripting languages'", dynamic
languages, and for virtual machine-based languages, the most
straightforward implementation strategy is to write an
interpreter. A
simple interpreter consists of a loop that fetches the next bytecode,
dispatches to the routine handling that bytecode, then loops.
There
are many ways to improve upon this simple mechanism, but as long as
the execution of the program is driven by a representation of the
program other than as a stream of native instructions, there will be
some "interpretive overhead".
There is a long history of approaches to removing interpretive
overhead from programming language implementations. In practice,
what
often happens is that, once an interpreted language becomes popular,
pressure builds to improve performance until eventually a project is
undertaken to implement a native {\em Just In Time} (JIT) compiler
for the language. Implementing a JIT is usually a large effort,
affects a significant part of the existing language implementation,
and adds a significant amount of code and complexity to the overall
code base.
In this paper, we present an innovative approach that dynamically
removes much of the interpreted overhead from language
implementations, with minimal instrumentation of the original
interpreter. While it does not give the performance improvements
of
hand-crafted native compilers, our system provides an appealing point
on the language implementation spectrum.
Part of the DynamoRIO
project at MIT.
Paper, in Postscript,
in PDF.
Greg Sullivan
gregs@ai.mit.edu
Artificial Intelligence
Laboratory
Massachusetts Institute of
Technology
200
Technology Square, NE43-802
Cambridge, MA 02139
(617)253-5807 (voice) (617)253-5060 (fax)