targeted path profiling : lower overhead path profiling for staged dynamic optimization systems...
TRANSCRIPT
![Page 1: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/1.jpg)
Targeted Path Profiling: Lower Overhead Path Profiling for Staged Dynamic Optimization Systems
Rahul Joshi, UIUC
Michael Bond*, UT Austin
Craig Zilles, UIUC
![Page 2: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/2.jpg)
2
Path information is useful
Enlarges scope of optimizations– Superblock formation– Hyperblock formation
Improves other optimizations– Code scheduling and register allocation– Dataflow analysis– Software pipelining– Code layout– Static branch prediction
![Page 3: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/3.jpg)
3
Overhead vs. accuracy
0
10
20
30
40
50
75 80 85 90 95 100
Accuracy (%)
Ove
rhea
d (
%)
Edge profiling(SPEC 95 INT)
![Page 4: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/4.jpg)
4
Overhead vs. accuracy
0
10
20
30
40
50
75 80 85 90 95 100
Accuracy (%)
Ove
rhea
d (
%)
Edge profiling(SPEC 95 INT)
Ball-Laruspath profiling(SPEC 2000 INT)
![Page 5: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/5.jpg)
5
Overhead vs. accuracy
0
10
20
30
40
50
75 80 85 90 95 100
Accuracy (%)
Ove
rhea
d (
%)
Edge profiling(SPEC 95 INT)
Ball-Laruspath profiling(SPEC 2000 INT)
Targetedpath profiling(SPEC 2000 INT)
![Page 6: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/6.jpg)
6
Overhead vs. accuracy
0
10
20
30
40
50
75 80 85 90 95 100
Accuracy (%)
Ove
rhea
d (
%)
Edge profiling(SPEC 95 INT)
Ball-Laruspath profiling(SPEC 2000 INT)
Targetedpath profiling(SPEC 2000 INT)
Profile-guided profiling
![Page 7: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/7.jpg)
7
Outline
Background– Staged dynamic optimization and
profile-guided profiling– Ball-Larus path profiling– Opportunities for reducing overhead
Targeted path profiling Results
– Overhead and accuracy
![Page 8: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/8.jpg)
8
Staged dynamic optimization
Staticoptimizations
Stage 0
![Page 9: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/9.jpg)
9
Staged dynamic optimization
Staticoptimizations
Edgeprofile
Stage 0
Hardwareedge profiler
![Page 10: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/10.jpg)
10
Staged dynamic optimization
Staticoptimizations
Edgeprofile
Stage 0
LocalOptimizations(code layout)
Stage 1
Hardwareedge profiler
![Page 11: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/11.jpg)
11
Staged dynamic optimization
Staticoptimizations
Edgeprofile
Stage 0
LocalOptimizations(code layout)
Path profilinginstrumentation
Stage 1
Hardwareedge profiler
![Page 12: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/12.jpg)
12
Staged dynamic optimization
Staticoptimizations
Edgeprofile
Stage 0
LocalOptimizations(code layout)
Path profilinginstrumentation
Stage 1
Pathprofile
Hardwareedge profiler
![Page 13: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/13.jpg)
13
Staged dynamic optimization
Staticoptimizations
Edgeprofile
Stage 0
LocalOptimizations(code layout)
Path profilinginstrumentation
GlobalOptimizations(superblockformation)
Stage 2 Stage 1
Pathprofile
Hardwareedge profiler
![Page 14: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/14.jpg)
14
Profile-guided profiling
Staticoptimizations
Stage 0
LocalOptimizations(code layout)
Path profilinginstrumentation
GlobalOptimizations(superblockformation)
Stage 2 Stage 1
Pathprofile
Hardwareedge profiler
Edgeprofile
![Page 15: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/15.jpg)
15
Ball-Larus path profiling
Acyclic, intraprocedural paths Handles cyclic CFGs
– Paths end at loop back edges
Each path computes unique integer
![Page 16: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/16.jpg)
16
Ball-Larus path profiling
4 paths
CB
D
A
FE
G
![Page 17: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/17.jpg)
17
Ball-Larus path profiling
2
1
4 paths Each path computes
unique integerCB
D
A
FE
G
![Page 18: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/18.jpg)
18
Ball-Larus path profiling
2
1
4 paths Each path computes
unique integer
Path 0
CB
D
A
FE
G
![Page 19: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/19.jpg)
19
Ball-Larus path profiling
2
1
4 paths Each path computes
unique integer
Path 0 Path 1
CB
D
A
FE
G
![Page 20: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/20.jpg)
20
Ball-Larus path profiling
2
1
4 paths Each path computes
unique integer
Path 0 Path 1 Path 2
CB
D
A
FE
G
![Page 21: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/21.jpg)
21
Ball-Larus path profiling
2
1
4 paths Each path computes
unique integer
Path 0 Path 1 Path 2 Path 3
CB
D
A
FE
G
![Page 22: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/22.jpg)
22
Ball-Larus path profiling
r=r+2
r=0
r=r+1
count[r]++
r: path register
count: array of path frequencies CB
D
A
FE
G
![Page 23: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/23.jpg)
23
Overhead in Ball-Larus path profiling
SPEC 95 SPEC 2000
gcc 96% 87%
INT Avg 41% 43%
FP Avg 12% 22%
Overall Avg 28% 37%
![Page 24: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/24.jpg)
24
Overhead in Ball-Larus path profiling
SPEC 95 SPEC 2000
gcc 96% 87%
INT Avg 41% 43%
FP Avg 12% 22%
Overall Avg 28% 37%
Opportunities for reducing overhead?– When there are many paths– When edge profile gives perfect path profile
![Page 25: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/25.jpg)
25
Routines with many paths
Many possible paths– Exponential in number of edges– Can’t use array of counters
Number of taken paths small– Ball-Larus uses hash table– Hash function call expensive
Hashed path ~5 times overhead
![Page 26: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/26.jpg)
26
Edge profile gives perfect path profile
![Page 27: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/27.jpg)
27
Edge profile gives perfect path profile
![Page 28: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/28.jpg)
28
Edge profile gives perfect path profile
An obvious path contains an edge that is only on that path– Path uniquely identified
by edge– Path freq = edge freq
If all paths obvious, edge profile gives perfect path profile
![Page 29: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/29.jpg)
29
Outline
Background– Staged dynamic optimization and
profile-guided profiling– Ball-Larus path profiling– Opportunities for reducing overhead
Targeted path profiling Results
– Overhead and accuracy
![Page 30: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/30.jpg)
30
Targeted path profiling
Profile-guided profiling– Use existing edge profile
Exploits opportunities for reducing overhead– When there are many paths
Remove cold edges– When edge profile gives perfect path profile
Don’t instrument obvious routines and loops
![Page 31: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/31.jpg)
31
Removing cold edges
Examine relative execution frequency of each branch
if (relFreq < threshold)
edge is cold
3 97
![Page 32: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/32.jpg)
32
Removing cold edges
4060
397
1000
5050
Examine relative execution frequency of each branch
if (relFreq < threshold)
edge is cold
3 97
![Page 33: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/33.jpg)
33
Removing cold edges
4060
397
1000
5050
Examine relative execution frequency of each branch
if (relFreq < threshold)
edge is cold
3 97
![Page 34: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/34.jpg)
34
Removing cold edges
4060
397
1000
5050
A path that contains a cold edge is a cold path
Removing an edge may halve number of paths
![Page 35: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/35.jpg)
35
Removing cold edges
4060
97
100
5050
A path that contains a cold edge is a cold path
Removing an edge may halve number of paths
Number of paths: 16 4
![Page 36: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/36.jpg)
36
Removing cold edges
4060
97
100
5050
A path that contains a cold edge is a cold path
Removing an edge may halve number of paths
Number of paths: 16 4
Goal: hashed non-hashed
![Page 37: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/37.jpg)
37
Removing cold edges
Remaining paths potentially hot
4 paths [0, 3]
2
1
![Page 38: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/38.jpg)
38
Removing cold edges
r=r+2
r=0
r=r+1
count[r]++
Remaining paths potentially hot
4 paths [0, 3]
![Page 39: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/39.jpg)
39
Removing cold edges
What if cold edge taken? r=r+2
r=0
r=r+1
count[r]++
![Page 40: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/40.jpg)
40
Removing cold edges
What if cold edge taken?
Cold edges poison path
r=r+2
r=0
r=poison
r=poison
r=r+1
count[r]++
![Page 41: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/41.jpg)
41
Removing cold edges
What if cold edge taken?
Cold edges poison path
Instrumentation checks for poisoned path
r=r+2
r=0
r=poison
r=poison
r=r+1
if (r poisoned) cold_counter++else count[r]++
![Page 42: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/42.jpg)
42
Checking for poison
if (r poisoned) cold_counter++else count[r]++
![Page 43: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/43.jpg)
43
Obvious routines
All paths obvious We don’t instrument
obvious routines Edge profile gives
perfect path profile
![Page 44: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/44.jpg)
44
Obvious loops
Loop with obvious body Don’t instrument
obvious loops with high average trip counts
Edge profile yields high-accuracy path profile
…
…
![Page 45: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/45.jpg)
45
Obvious loops
Loop with obvious body Don’t instrument
obvious loops with high average trip counts
Edge profile yields high-accuracy path profile
…
…
![Page 46: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/46.jpg)
46
Summary of our techniques
Remove cold edges– Eliminates many cold paths– Count paths with array (instead of hash table)
Don’t instrument obvious routines and loops– Edge profile derives path profile
![Page 47: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/47.jpg)
47
Outline
Background– Staged dynamic optimization and
profile-guided profiling– Ball-Larus path profiling– Opportunities for reducing overhead
Targeted path profiling Results
– Overhead and accuracy
![Page 48: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/48.jpg)
48
Implementation
Static profiling PP: tool for path profiling TPP: tool for targeted path profiling Tools instrument native SPARC executables
– SPEC 95 ref– SPEC 2000 ref
![Page 49: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/49.jpg)
49
Results: SPEC 2000 INT
0
10
20
30
40
50
60
70
80
90
100
Ov
erh
ea
d/A
cc
ura
cy
Ball-Larus PP overhead TPP overhead Accuracy
![Page 50: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/50.jpg)
50
Where does benefit come from?
Cold path elimination alone: 60% Add obvious path elimination: + 40%
Little benefit from obvious path elimination alone
![Page 51: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/51.jpg)
51
Related work
Dynamo [Bala et al. ‘00]
– Successful online path-guided optimization– “Bails out” when no dominant path
Instrumentation sampling [Arnold & Ryder ‘01]
– Orthogonal to targeted path profiling
Selective path profiling [Apiwattanapong & Harrold ’02]
– Useful when only a few paths of interest
![Page 52: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/52.jpg)
52
Summary
Profile-guided profiling in a staged dynamic optimization system
Two synergistic techniques– Remove cold paths– Don’t instrument obvious routines and loops
Reduces overhead by half (SPEC 95) to two-thirds (SPEC 2000)
High accuracy: ~99%
![Page 53: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/53.jpg)
53
Remaining slides not part of talk
![Page 54: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/54.jpg)
54
Future work
Targeted path profiling in a staged dynamic optimization system– Jikes RVM
![Page 55: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/55.jpg)
55
Future work
Targeted path profiling in a staged dynamic optimization system– Jikes RVM
Pseudo-obvious subgraphs Maintaining path profiles across
program transformations
![Page 56: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/56.jpg)
56
Staged dynamic optimization
Edgeprofiler
Edgeprofile
Stage 0:Staticoptimizations
Path profilinginstrumentation
Pathprofile
Stage 2:Globaloptimizations
Stage 1:Localoptimizations
![Page 57: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/57.jpg)
57
Accuracy
Our techniques lose path information– For removed cold paths (cold counter)– For paths that enter or exit disconnected loops
Accuracy of targeted path profiling: ~99%
Accuracy of edge profiling: 80% SPEC 95 (76% INT, 84% FP)
![Page 58: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/58.jpg)
58
Why not edge profiling?
Edge profile is “point” profile
Correlation between edge frequencies ambiguous
CB
D
A
FE
G
50 50
50 50
![Page 59: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/59.jpg)
59
Edge profile limitations
Edge profile is “point” profile
Correlation between edge frequencies ambiguous
CB
D
A
FE
G
50 50
50 50
![Page 60: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/60.jpg)
60
Edge profiling limitations
Edge profile is “point” profile
Correlation between edge frequencies ambiguous
CB
D
A
FE
G
50 50
50 50
![Page 61: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/61.jpg)
61
Staged dynamic optimization
Dynamic optimization system decides if profiling likely to be beneficial
Staged dynamic optimization system applies more powerful and expensive optimizations at each stage
![Page 62: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/62.jpg)
62
Cyclic graphs
2 pathsA
C
E
F
B
D
![Page 63: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/63.jpg)
63
Cyclic graphs
2 paths 8 paths Acyclic paths
– Start at A or B– End at E or F
A
C
F
B
D
E
![Page 64: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/64.jpg)
64
Cyclic graphs
2 paths 8 paths Acyclic paths
– Start at A or B– End at E or F
A
C
F
B
D
count[r]++
r=0
E
![Page 65: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/65.jpg)
65
Cyclic graphs
2 paths 8 paths Acyclic paths
– Start at A or B– End at E or F
A
C
F
B
D
count[r]++r=0
count[r]++
r=0
E
![Page 66: Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2b5503460f94c46692/html5/thumbnails/66.jpg)
66
Cyclic graphs
2 paths 8 paths Acyclic paths
– Start at A or B– End at E or F
Paths enter and/or exit loop body
A
C
F
B
D
count[r]++r=0
count[r]++
r=0
E