1 / 9

Hydra VM: Extracting Parallelization From Legacy Code Using STM

Mohamed. M. Saad. Hydra VM: Extracting Parallelization From Legacy Code Using STM . Hydra VM. Java Virtual Machine Prototype based on Jikes RVM Targets Code profiling/visualization using execution flow Utilize large number of cores through possible parallel portions of code. Jikes RVM.

redell
Download Presentation

Hydra VM: Extracting Parallelization From Legacy Code Using STM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mohamed. M. Saad Hydra VM: Extracting Parallelization From Legacy Code Using STM

  2. Hydra VM • Java Virtual Machine Prototype based on Jikes RVM • Targets • Code profiling/visualization using execution flow • Utilize large number of cores through possible parallel portions of code

  3. Jikes RVM • Adaptive Online System • Compiler • Baseline Complier • JIT Compiler

  4. The Basic Idea … • Insert TM_start& TM_endat every independent possible path • Lazy commit (write-buffer) • Contention Resolution based on • Program Order • Execution Frequency

  5. Execution Tracking Tool • Modifying the Baseline Compiler • TemplateCompilerFramework class • Converting Java Bytecode into Machine language (Assembly) genCode(){ ….. switch(opcode){ case <instruction bytecode>: emmit_<instruction>: } } • Plugin some code to profile block start event • Profiling execution using GraphViz script

  6. Example 0: iconst_0 1: istore_1 2: iconst_0 3: istore_2 4: goto 29 7: invokestatic #13; 10: ldc2_w #19; 13: dcmpl 14: ifle 23 17: iinc 1, 1 20: goto 26 23: iinc 1, -1 26: iinc 2, 1 29: iload_2 30: bipush 12 32: if_icmplt 7 35: return 0: iconst_0 1: istore_1 2: iconst_0 3: istore_2 4: goto 29 7: invokestatic #13; 10: ldc2_w #19; 13: dcmpl 14: ifle 23 17: iinc 1, 1 20: goto 26 23: iinc 1, -1 26: iinc 2, 1 29: iload_2 30: bipush 12 32: if_icmplt 7 35: return int counter = 0; for(inti=0; i<2; i++)      if(Math.random()>0.3)        counter++;      else          counter--; 

  7. Example public class Test{   public static void foo(){int counter = 0;     for(inti=0; i<12; i++)        if(Math.random()>0.3)           counter++;        else           counter--;   }    public static void zoo(){System.out.println("hi");   }   public static void main(String[] args){inti=6;        if(i<10)foo();        else                zoo();   }}

  8. Milestones •  Building execution flow tracking system • Split the code to basic blocks • Collect execution patterns • Visualizing execution •  Parallelizing the execution of the code using different threads • Dependency analysis • Branch prediction • Packaging & grouping blocks (superblock) •  Preserving program order and data consistency using STM • Checkpointing • Closed nesting in loop parallelization

  9. Questions

More Related