1 / 11

Selecting Software Phase Markers with Code Structure Analysis

Selecting Software Phase Markers with Code Structure Analysis. Brad Calder UC San Diego. Introduction. Program behavior changes over time Current behavior often very different from average behavior Program’s have repetitive behavior based on how code is written Many potential uses

joella
Download Presentation

Selecting Software Phase Markers with Code Structure Analysis

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. Selecting Software Phase Markers with Code Structure Analysis Brad Calder UC San Diego

  2. Introduction • Program behavior changes over time • Current behavior often very different from average behavior • Program’s have repetitive behavior based on how code is written • Many potential uses • Accelerated architecture simulation • Just simulate a single sampleof each program behavior • Dynamic reconfiguration • Target program’s currentbehavior instead of average behavior

  3. Time Varying Behavior: gzip • Examine program behavior over entire program run • Discover periodic/repetitive behavior • Goal: Find stable (consistent) region of execution • Phases: periods of stable behavior • Phase Change: transition into stable behavior Time (Instructions Executed x 107)

  4. Focus of Research • Identify phase change boundaries at procedure calls, returns and loops • Find transitions into stable regions • These locations identify “Software Phase Markers” • Insert the marker into the binary • Identifies the start of a phase when executed (what phase is coming next) • Perform the above analysis using Phoenix as a binary instrumentation profiling tool • Profile program to collect a hierarchicalcall-loop graph

  5. Software Phase Markers • A Call-loop graph is just a hierarchical call graph with: • Extra nodes for loops • Extra nodes to represent recursion (loops and procedural) • Loops represented with loop head and loop body nodes. This identifies: • Loop Head - loops that are stable on each entry • Loop Body - loops that are stable on each iteration • Evaluate hierarchical stability of edges to identify stable regions of execution • Examine variance in hierarchical instruction for edges in Call-loop graph • We look at coefficient of variation: CoV = stddev / avg

  6. An Example Proc foo() loop if (cond) call X; else call Y; end loop call X; end proc Proc X() call Z; end proc • Code segment on left, call-loop graph on right

  7. Example Continued • Each edge is annotated with: • C = number of times each edge is traversed (call count) • A = average number of hierarchical instructions executed each time the edge is traversed • CoV = hierarchical instruction count coefficient of variation

  8. Using Phoenix • Instrumentation Code • Uniquely identify each Call and Loop branch location • Profiler just has to perform an array index • Instrument each basic block to associate BB’s executed instructions with the current context • Instrument each Call/Ret and Loop branch edge • Also record line number information • Analysis Code • Keep track of a call-loop stack • Where to assign local and the hierarchical time

  9. Phase Markers – gcc-166 • Map phase markets back to source code using Phoenix symbol information • Each phase marker is represented with a unique symbol • Most stable (repetitive) behaviors are uniquely marked • gcc-166 exhibits the same behavior pattern twice, and we see the same marker pattern twice

  10. Summary • Use Phoenix to profile programs to find points in program that exhibit consistent regions (phases) of execution • These are software phase markers: • A lightweight way to indicate a change into a consisten region is about to occur • To find software phase markers: build a call-loop graph using Phoenix to find hierarchically stable edges • Currently • Applying to SimPoint to pick source code simulation points • Inserting into binary and examining its use to guide hardware (cache) reconfiguration

More Related