1 / 22

Whole Program Paths

Whole Program Paths. James R. Larus. Outline. Find acyclic path fragments Convert into whole-program path Determine hot subpaths. Acyclic Paths. As per Ball&Larus paper we implemented. Calculating Acyclic Paths. Instrument chords Sum along paths is unique Postprocess for functions

ruana
Download Presentation

Whole Program Paths

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. Whole Program Paths James R. Larus

  2. Outline • Find acyclic path fragments • Convert into whole-program path • Determine hot subpaths

  3. Acyclic Paths • As per Ball&Larus paper we implemented

  4. Calculating Acyclic Paths • Instrument chords • Sum along paths is unique • Postprocess for functions • Loop iter is new path • New: also function calls • Dump path ID to file

  5. Acyclic Paths Output

  6. Acyclic Paths Output

  7. Outline • Find acyclic path fragments • Convert into whole-program path • Compress output string • Coalesce common substrings • Store efficiently • Determine hot subpaths

  8. Compress and Coalesce

  9. Grammatical Benefits • Explain output string as context-free grammar: • Efficient compression (~20x) • Automatic subsequence grouping • Grammar creation • Append symbols to start rule • Digrams appear at most once • Rules must be used at least twice • Example: 121213121214

  10. SEQUITUR

  11. Execution Representation • Not a control-flow graph! • Execution sequence = post-order traversal of DAG

  12. Whole Paths • Efficient representation • Create grammar online • Execution context information • e.g., A runs after B • Frequency information • Simple path aggregation

  13. Outline • Find acyclic path fragments • Convert into whole-program path • Determine hot subpaths • Find short frequent subsequences • ??? • Profit!

  14. Outline • Find acyclic path fragments • Convert into whole-program path • Determine hot subpaths • Find short frequent subsequences • Heavily optimize that 1% • Applies to 75% of cache misses

  15. Hot Subpaths • Looking for minimal hot subpaths • L or fewer consecutive acyclic path fragments with cost of C or greater • Cost = execution frequency x costs of acyclic path fragments • Path fragment cost = number of instructions

  16. Finding Hot Subpaths • Recursively look for hot minimal subpaths • Split between children • Processed at lower recursive level

  17. Results • Typically: • 30MB/sec program trace (@200MHz) • 1 MB/sec program path • 30 grammar rules per path fragment • 100,000 rules in grammar • Number of hot paths grows slowly with maximum length • Space sublinear in input size, time supralinear

  18. Results

  19. Results • Typically: • 30MB/sec program trace (@200MHz) • 1 MB/sec program path • 30 grammar rules per path fragment • 100,000 rules in grammar • Number of hot paths grows slowly with maximum length • Space sublinear in input size, time supralinear

  20. Results

  21. Summary • Contributions • Stream out acyclic path fragments in order • Compress and structure with grammar • Find hot subpaths from whole program path • Limitations • 15x runtime slowdown • Space-based limits on runtime • High number of hot paths found

  22. Questions • What other potentially-useful information does this data structure give? • Order-dependent code errors • What potential for optimization does this open up? • Other applications? • Experimental hot-path results?

More Related