Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Region-Based Compilation Technique for a Java Just-In-Time Compiler Toshio Suganuma, Toshiaki Yasue and Toshio Nakatani Presenter: Ioana Burcea.

Similar presentations


Presentation on theme: "A Region-Based Compilation Technique for a Java Just-In-Time Compiler Toshio Suganuma, Toshiaki Yasue and Toshio Nakatani Presenter: Ioana Burcea."— Presentation transcript:

1 A Region-Based Compilation Technique for a Java Just-In-Time Compiler Toshio Suganuma, Toshiaki Yasue and Toshio Nakatani Presenter: Ioana Burcea

2 Agenda Research question FBC – function based compilation VS RBC – region based compilation System overview Region exit handling Region selection Special optimizations Partial inlining Partial dead code elimination Escape analysis Experimental results

3 Research Question Method – the right unit of compilation? Methods often contain rarely or never executed code  Waste of compilation time  Conservative data flow analysis  Restrictive method inlining Possible solution: Region-based compilation (RBC)  Region selection  Partial inlining  Region exit handling

4 Dynamic Optimization Framework Sampling profiler The more CPU time used the hotter the method Instrumenting profiler Basic block execution frequency Virtual/interface call receiver type distribution

5 Region-Based Compilation

6 Intra-Procedural Region Selection Static heuristics Rare  Backup blocks / guards (e.g., devirtualizations)  Blocks that end with an exception throwing instruction  Exception handler blocks  Blocks containing unresolved or uninitialized class references Non-rare  Blocks that end with normal return instructions Dynamic profile information A block is non-rare if its dynamic count is beyond a certain threshold (which value they use?) Higher priority when conflicting with static heuristics Iterative framework for region selection

7 Region Exit Handling

8 Partial Inlining

9 Special Optimizations Partial dead code elimination Pushing computations that are only live in the region exit paths to the region exit BB Partial escape analysis Objects that are local to the method are allocated to the stack Objects that are local to a single thread do not need synchronization

10 Partial Escape Analysis

11 Experimental Results Machine Pentium 4 Xeon 2.8GHz, 1Gb WinXP Benchmarks SPECjvm98-1.04  Initial and max heap 128 Mb SPECjbb2000-1.02  Initial and max heap 256 Mb Thresholds MMI to level-0 compilation: 500 Timer interval for sampling profiler: 3 ms The number of samples: 10,000 The max number of OSR: 10 Other thresholds (rare bb, promotion to level-1 & level-2 compilation) ??

12 Configurations 5 configurations FBC – function based compilation (the baseline) RBC-noopt – RBC without any special optimizations RBC-nopi – RBC with partial dead code elimination and partial escape analysis, without partial inlining RBC-full – all optimizations on RBC-offline – RBC-full with offline profile information  No OSR, no recompilation (?)

13 Statistics for RBC

14 Performance Improvement

15 Compile Time Ratio

16 Compiled Code Size Ratio

17 Peak Work Memory Usage Ratio

18 Discussion


Download ppt "A Region-Based Compilation Technique for a Java Just-In-Time Compiler Toshio Suganuma, Toshiaki Yasue and Toshio Nakatani Presenter: Ioana Burcea."

Similar presentations


Ads by Google