1 / 19

Improving Region Selection in Dynamic Optimization Systems

Improving Region Selection in Dynamic Optimization Systems. Author: David Hiniker, Kim Hazelwood, Michael D. Smith Presenter: Oh Hyeong-Seok Date: 2006.11.22. Contents. Introduction NET Trace and Shortcomings Last-Executed Iterating (LEI) Algorithm Trace Combination Algorithm Conclusion.

Télécharger la présentation

Improving Region Selection in Dynamic Optimization Systems

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. Improving Region Selection in Dynamic Optimization Systems Author: David Hiniker, Kim Hazelwood, Michael D. Smith Presenter: Oh Hyeong-Seok Date: 2006.11.22

  2. Contents • Introduction • NET Trace and Shortcomings • Last-Executed Iterating (LEI) Algorithm • Trace Combination Algorithm • Conclusion

  3. Introduction • Dynamic Optimization System • Region Selection • Whole Method • Trace • Orthogonal problem: trace separation & excessive code duplication

  4. NET trace • Select begin of trace • Backward branch • Exit from an existing trace • Start select trace when execution count threshold is reached • Trace continue • Backward branch • Branch taken to another trace • Size limit

  5. Three Shortcoming - Loops • Can’t span interprocedural cycle • Can’t extend trace to interprocedural backward path NET Ideal A A E A B F B B C D to A D to C E D E call to E F to C F return E is lower address than D

  6. Three Shortcomings – Nested Loops • Duplicate the beginning of an inner loop in a trace for an outer loop NET Ideal A B C A B C to C to A B to C A B to C to B C

  7. Three Shortcomings – Unbiased branch • Trace can contain only one of the branch target NET A A B 50% 50% C D B C D F F to E D to B to E 5% 95% E F

  8. Last-Executed Iteration • Select cyclic trace • Based on history buffer • Form from backward branch or exit from code cache • Trace end when cycle is completed or next instruction begin existing trace • Select frequently executed trace • Trace after the branch executes predefined number of time Tcyc

  9. LEI Algorithm

  10. Forming Trace

  11. Trace Combination • Simple extension of trace selection • Lower trace selection threshold • Observe the trace generated for the next several execution, and combine • Trace combination select • 1st step: include only those blocks that occur in frequently executed traces • 2nd step: include executed paths that rejoin those blocks

  12. Algorithm for Trace Combination

  13. Storing a Trace • Store each observed trace independently • Compact representation

  14. Constructing the CFG • Construct a control-flow graph for the observed traces • Incrementally adding each observed trace • Mark each block which appear in traces Tmin times

  15. Marking Paths that Rejoin • Mark if any successor of a unmarked basic block is marked

  16. Experiment • Create a Framework for simulating • Relies on the Pin • Unbounded code cache • SPECint2000 benchmark • Definition • Hit Rate: percentage of executed program instruction from code cache • Code Expansion: number of program instructions that are copied into the code cache • Region Transition: jump between regions in the code caches

  17. LEI Trace Result • Code Expansion and Region Transitions • 99% of execution occur natively from the code cache (difference between NET and LEI less than 0.2% in most benchmark)

  18. Region Combination Result • Region Transitions

  19. Conclusion • Identified NET trace-selection algorithm • Develop two new region-selection algorithm • Better select regions of frequently executing code and improve locality of execution

More Related