A Trace-based Java JIT Compiler Retrofitted from a Method-based ...
Recommend Documents
Sep 30, 1998 - portability of the JIT compiler itself, as well as JIT-specific compilation issues, ... Most JITs today are either written in C or in assembly language, and .... Figure 1: Comparison of Traditional JITs and OpenJIT .... The Graph in Fi
The JIT compiler may be able to inline the callee method when the reference to it has been resolved. On-line profiler. The on-line profiler continuously updates.
Jan 27, 2014 - as Haskell comes with a price, namely performance. Although ..... rent instruction pointer to get the responsible closure for handling the trap. ... server client cacao mate jamvm. HelloWorld. 0.06. 0.03. 0.12. 0.00. 0.03. Fib. 0.15.
ebx, 8 add ebp, -56 loop. Back emms jmp old_entry. Program Code 4. the JIT compiler to use a vector of bytes instead of in- tegers. In the resulting byte array, ...
Oct 24, 2011 - HappyJIT: A Tracing JIT Compiler for PHP. Andrei Homescu. Department of Computer Science. University of C
Mar 26, 2010 - on CIL enables TJIT optimizations for any program com- piled to this platform. ...... just-in-time compilation, e.g. Apple's SquirrelFish Extreme.
Dalvik Execution Environment. • Virtual Machine for Android Apps. – See 2008
Google IO talk. • http://www.youtube.com/watch?v=ptjedOZEXPM. • Very compact
...
Oct 24, 2011 - Python programs generate the actual HTML page after querying a .... Variables in PHP have one of several
Mar 3, 2012 - and laptops for market and popularity. As a widely ..... sor for its power efficiency, simple design and low price. And. RISC processors often have ...
Mar 3, 2012 - of-the-art JIT compiler in Android, JITC-Droid, Swift achieves a ...... JemBench2.0(ARMv6). JITC-Droid. Swift/no-opt. Swift. 0. 0.5. 1. 1.5. 2. 2.5. 3.
A description for this result is not available because of this site's robots.txtLearn more
paper appeared at The Second Asia-Pacific Conference on ... Conferences in Research and Practice in ..... the testing is to use java.lang.reflect to call instance ...
of the threads' executions, which makes the bugs nearly impossible to find and ...
Java source and byte code have the same thread and concurrency model,.
We are developing an optimizing compiler with multiple front- and back-ends. The idea ... Our main design goal was to build a compiler that can re-use the same ...
Section 2, we present in Section 3 a small Java program that is the basis for the examples that run throughout the rest of the paper. The example, though small, ...
Most modern computer programs are written in high-level programming languages that are ... programming languages, there exists a program named distcc, the ...
At the same time, the ARM architecture [1, 2] is becoming the industry's leading 16/32 bit embedded system processor solution due to its performance and RISC ...
Sep 13, 2013 - 2 Micro Edition (J2ME) for embedded systems and Java virtual machine ...... environment, 300 kilobytes of RAM, 1 megabytes of flash and ROM, ...... Method Call Overhead. http://www.bytecodes.com/techHACCEL2B.html,.
testing, helping students learn good software engineering skills and become better programmers. The book covers all of t
Such high performance virtual machines are complex artifacts, difficult to ... statically, writing such test suites to validate dynamic deoptimization is difficult. ... how this subset of JIT compiler optimizations works, we define two Java classes.
Sep 28, 2011 - embedded computing. However, its programming model that relies on the capabilities of just-in-time compilation limits the opportunities to ...
Sep 26, 2011 - the Java program into native code during runtime of the application ... Java to small devices such as the Java 2 Micro Edition [14]. In this paper ...
Section 3 describes the compilation phase when QSI's are generated, and Section ..... necessary to verify a digital signature each time a class is loaded, thereby ...
comparable to the best of various Java implementation strategies. 1. Introduction. The Java [1] programming language is a strongly typed, gen- eral-purpose, concurrent ..... âtrueâ or âfalseâ to a screen on a desktop. This allows a developer.
A Trace-based Java JIT Compiler Retrofitted from a Method-based ...
Apr 6, 2011 - 1. develop an efficient trace-based Java JIT compiler (trace-JIT) based on existing ..... 0.4. 0.5. 0.6. 0.7. 0.8. 0.9. 1.0 method-JIT trace-JIT norm a lized C. P. U tim e . 0.0. 0.1 ... Trace-JIT often (not always) shows better JITted code performance (blue parts). â¹ Trace-JIT ..... Trace Selection vs. Method Inlining.
IBM Research - Tokyo
A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler Hiroshi Inoue†, Hiroshige Hayashizaki†, Peng Wu‡ and Toshio Nakatani† † IBM Research – Tokyo ‡ IBM Research – T.J. Watson Research Center
Goal and Motivation Goals 1. develop an efficient trace-based Java JIT compiler (trace-JIT) based on existing mature method-based JIT compiler (method-JIT) 2. understand the benefits and drawbacks of the trace-JIT against the method-JIT Why not method-JIT? – Limited optimization opportunities in larger application with a flat execution profile (no hot spots) Can trace-JIT provide more optimization opportunities than method-JIT for such applications?
2
A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler
Motivating Example A trace can span multiple methods – Free from method boundaries – In large server workloads, there are deep (>100) layers of methods method 1
method 2
method 3
method 4
Web Container
JavaServer Pages
Enterprise JavaBeans
JDBC Driver
ok?
error!
search for a handler
log?
4
ok?
error!
search for a bean
print
log?
print
ok?
error!
create an SQL
log?
print
A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler
Technical challenge in reusing a method-based compiler for trace-JIT Scope mismatch problem In method-JIT, – local variables must be dead at the start and the end of compilation scope In trace-JIT – local variables may live at the start and the end of compilation scope Live range of local variables does not match with compilation scope in trace-JIT
12
A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler
Analyze outside the compilation scope We identify all live variables at each compilation scope boundary point – trace head, trace exit points For each boundary point, we analyze the method that includes the point – mostly in live range analyzer and use-def analyzer in the framework, not in each optimizer entry
method 1
method 2
method 3
method 4
Web Container
JavaServer Pages
Enterprise JavaBeans
JDBC Driver
exit
ok?
error!
search for a handler
log? exit print
ok?
exit
error!
search for a bean
log? exitprint
exit
ok?
error!
ok?
exit
error!
create an SQL
send the SQL to DB
log? exit print
log? exitprint
exit 14
A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler
hash code hash map map code cache cache Apply simple one-path value propagation to exploit simple (e.g. compiled code address) topologies of traces compiled code
Trace-JIT
trace trace side side exit exit elimination elimination IR IR generator generator
It removes potential side exits to reduce IR tree size and code code generator generator compilationnew time component new component optimizers optimizers
Performance Evaluation Hardware: IBM BladeCenter JS22 – 4 cores (8 SMT threads) of POWER6 4.0GHz – 16 GB system memory Software: – AIX 6.1 – Method-JIT: IBM JDK for Java 6 (32 bit) – Trace-JIT: Our Trace-JIT based on the same IBM JDK • used only standard optimization level (-Xjit:optlevel=warm) • 512 MB Java heap with large page enabled • generational garbage collector (gencon)
Benchmark: – DaCapo benchmark suite 9.12
17
A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler
Optimization opportunities and challenges Opportunities – Potentially larger compilation scope than method-JIT – Simple control flow • main path of a trace is a very large extended basic block
– Explicit control flow • like method inlining
– More specialization • type specialization, value specialization etc
Challenges – Interaction between trace selection and optimizations • e.g. Loop optimizations
22
A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler
Future work: Effective Loop Optimization in trace-JIT More loop optimizations in trace-JIT – backward-branch-based cyclic trace identification is not suitable for loop optimizations need to enhance trace selection algorithm to maximize the optimization opportunities
23
backward branch
exit:
loop preheader (e.g. initialization of loop variable) is not included in a cyclic trace. a cyclic trace