| O'Caml interpreter: |
byterun/interp.c |
| macros and defines: |
byterun/mlvalues.h |
Compiling C for a stack-based VM
There are some nice slides by Reinhart Wilhelm:
Click on "Presentations"
Click on "Slides of the Compiler Design Course, Summer 2001"
There are a few introductory slides in "Abstract Machines" (under heading
"Chapter 2 (revised)"
Then proceed to "The Translation of C"
The same page has information about compiling Pascal for the p-code machine
(One of the earliest stack-based VMs) under the heading "Chapter 2".
I don't recommend necessarily reading this material. I don't think that I
am going to cover it.
Introducing virtual machines
J. E, Smith
"An Overview of Virtual Machine Architectures"
A good taxonomy of virtual machines.
Optimizing interpreters
Java and CLR
Problem: cruising CiteSeer.
Look up "Dynamically managing processor temperature and power" on Google
follow the first link to CiteSeer. By working forward and backward in
bibliographic citations, see if you can find some interesting papers
on using program monitoring techniques to control power consumption.
Deliverable: a couple of abstracts of papers.
Same process, same deliverable, but start with title
"A Framework for Dynamic Energy Efficiency and Temperature Management"
Staged compilation and JIT compilation
Here are some papers on code generation for JITS
-
Dawson Engler
"VCODE: A Retargetable, Extensible, Very Fast Dynamic Code Generation
System" (1996)
Used for explic dynamic code generation
for the 'C (tickC) staged compiler rather than automatic code
generation.
Extreme tradeoff: low compilation time for not great quality code.
-
I am trying to get the author of the original paper on the Kaffe
JIT to send me a copy, since I can't find a copy online. I can't
find author's current address...
-
Ali-Reza Adl-Tabatabai, Michael Cierniak, Guei-Yuan Lueh, Vishesh
M. Parikh, James M. Stichnoth
"Fast, Effective Code Generation in a Just-In-Time Java Compiler" (1998)
The Intel JIT
-
The old and newer implementations of the CACAO JIT: how did they
change?
-
Michael Chen and Kunle Olukotun
"Targeting Dynamic Compilation for Embedded Environments" (2002)
-
a more recent data point
T. Suganuma, T. Ogasawara,
M. Takeuchi, T. Yasue, M. Kawahito, K. Ishizaki, H. Komatsu, and
T. Nakatani
"Overview of the IBM Java Just-in-Time compiler"
IBM Systems Journal, 39(1):175--193, 2000. 2, 1.1.1
I suggest skimming these, and compare:
(1) What optimizations do they make over just stringing instructions together?
(2) How long (in passes over source code / IR) does it take to make
the optimizations?
(3) What compromises do they (say they) make in terms of implementing standard
algorithms?
(4) Do they have breakdowns of compile time by optimization?
(5) Do they have compile time / run time breakdowns for benchmarks?
(6) How do the implementations of shadow stacks differ, if using
shadow stacks?
This is a lot of reading. Please skim and make comparisons.
Adaptive (dynamic) optimization
-
Matthew Arnold, Stephen Fink, David Grove, Michael Hind, Peter F. Swe
"Adaptive Optimization in the Jalapeño JVM" (2000)
-
Matthew Arnold, Michael Hind, Barbara G. Ryder
"Online Feedback-Directed Optimization of Java" (OOPSLA 2002)
The Gory Details! Not on reading list:
-
Vasanth Bala, Evelyn Duesterwald, Sanjeev Banerjia
"Dynamo: A Transparent Dynamic Optimization System" (2001)
The Gory Details! Not on reading list:
there is also the short tech report from 1999 (17 pages):
http://www.hpl.hp.com/techreports/1999/HPL-1999-77.html
and the long tech report from 1999 (102 pages, and I haven't read it!)
http://www.hpl.hp.com/techreports/1999/HPL-1999-78.html
- This one removed from reading list: too much else to read for this week...
Derek Bruening, Evelyn Duesterwald
"Design and Implementation of a Dynamic Optimization Framework for Windows"
4th ACM Workshop on Feedback-Directed and Dynamic Optimization
(FDDO-4), December, 2001.
-
Derek Bruening, Timothy Garnett, Saman Amarasinghe
"An Infrastructure for Adaptive Dynamic Optimization" (2003)
-
Giuseppe Desoli, Nikolay Mateev, Evelyn Duesterwald, Paolo Faraboschi,
and Joseph A. Fisher
"DELI: A New Run-Time Control Point"
- This one regretfully removed from reading list: too much else to
read for this week...
S. Subramanya Sastry, Rastislav Bodík
"Program Specialization for Dynamic Optimizers" (2003)
- This one removed from reading list: too much else to
read for this week...
White Paper
The Java HotSpot Virtual Machine, v1.4.0
(Did not look at in course)
Some things to think about:
(1) How is focus of Jikes different from Dynamo?
(2) How has DynamoRIO evolved from Dynamo
(3) How is DELI related to Dynamo? To DynamoRIO?
(4) If we started a dynamic optimization project today, what sort of
infrastructure would we want, what features would we work on first?
(5) How do Dynamo, Deli fit into Jim Smith's taxonomy of virtual
machines? If they don't fit then why not?
Profiling and machine counters
Dynamic translation in hardware
Dynamic and semi-dynamic binary translation in software
Register allocation in JITs
Present in class: The Chaitin graph-coloring allocator and/or variants
and its complexity.
Security in VMs: Software fault isolation
Present in class: reference monitors
Security: Stack inspection in JVM
All the papers are doing the same thing.
Compare terminology. What matches up with what between papers?
Software watermarking
At Chris' request
Tamper-proofing and obfuscation
-
White Paper
"ez platform 2.0: Technical Overview"
-
B. Horne, et. al.
"Dynamic Self-Checking Techniques for Improved Tamper Resistance"
Digital Rights Management Workshop, Lecture Notes in Comp. Sci. 2320,
Springer, 2002.
- (optional)
D. Lie, et. al.
"Architectural Support for Copy and Tamper Resistant Software"
Proc. 9th Int. Conf. on Architectural Support for
Prog. Languages and Systems (ASPLOS-IX), November 2000.
Obfuscation:
-
PreEmptive Solutions, Inc.
"dotfuscator: Producing Smaller, More Secure .NET Applications,
Technical White Paper" Version 1.1, 2002.
-
Christian Collberg, Clark Thomborson, Douglas Low
"A Taxonomy of Obfuscating Transformations"
Virtual OS
-
R.J. Creasy
"The Origin of the VM/370 Time-Sharing System"
IBM J. Res. Develop., 25(5):483-490, September 1981.
-
J. Sugerman, et. al.
"Virtualizing I/O Devices on VMware Workstation's
Hosted Virtual Machine Monitor"
Proc. 2001 USENIX Annual Technical
Conf., June 2001.
-
C. Waldspurger
"Memory Resource Management in VMware ESX Server"
Proc. 5th UNENIX Symp. on OS Design and Implementation, December
2002.
(optional)