Download presentation
Presentation is loading. Please wait.
Published bySarah Garrett Modified over 9 years ago
1
Whole Program Paths James R. Larus
2
Outline 1. Find acyclic path fragments 2. Convert into whole-program path 3. 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
7
Outline 1. Find acyclic path fragments 2. Convert into whole-program path 1.Compress output string 2.Coalesce common substrings 3.Store efficiently 3. 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 1. Find acyclic path fragments 2. Convert into whole-program path 3. Determine hot subpaths 1.Find short frequent subsequences 2.??? 3.Profit!
14
Outline 1. Find acyclic path fragments 2. Convert into whole-program path 3. Determine hot subpaths 1.Find short frequent subsequences 2.Heavily optimize that 1% 3.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 1.Split between children 2.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?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.