slide1
Download
Skip this Video
Download Presentation
Selecting Software Phase Markers with Code Structure Analysis

Loading in 2 Seconds...

play fullscreen
1 / 11

Selecting Software Phase Markers with Code Structure Analysis - PowerPoint PPT Presentation


  • 140 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Selecting Software Phase Markers with Code Structure Analysis' - joella


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction
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
time varying behavior gzip
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)

focus of research
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
software phase markers
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
an example
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
example continued
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
using phoenix
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
phase markers gcc 166
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
summary
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
ad