Improving Region Selection in Dynamic Optimization Systems - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Improving Region Selection in Dynamic Optimization Systems

Description:

Trace end when cycle is completed or next instruction begin ... Construct a control-flow graph for the observed traces. Incrementally adding each observed trace ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 20
Provided by: ohhyeo
Category:

less

Transcript and Presenter's Notes

Title: Improving Region Selection in Dynamic Optimization Systems


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
  • Cant span interprocedural cycle
  • Cant 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
C
A
B
B
C
to A
to C
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
C
B
D
F
F
to E
D
to B
to E
95
5
F
E
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
Write a Comment
User Comments (0)
About PowerShow.com