150 likes | 294 Views
Phase-Based Program Sampling Using Phoenix. Chandra Krintz University of California, Santa Barbara Microsoft Faculty Summit July, 2005. Our Phoenix-Based Research. Efficient, flexible, and accurate profile collection Avoid computation/communication interruption
E N D
Phase-Based Program Sampling Using Phoenix Chandra Krintz University of California, Santa Barbara Microsoft Faculty Summit July, 2005
Our Phoenix-Based Research • Efficient, flexible, and accurate profile collection • Avoid computation/communication interruption • Gather important profile types (paths, data, methods…) Our extensions to Phoenix: • Turn profiling on and off dynamically • Program execution sampling • Trigger sampling to enable • Highly accurate profiles (similar to exhaustive profiles) • With very low overhead (sample very seldomly) Microsoft Faculty Summit, July 2005
Toggling Profile Collection • When to sample the executing program • Periodically • Randomly • According to program behavior Microsoft Faculty Summit, July 2005
Sample According to Program Behavior Method entry Method call Method call • Duplicate code • One copy is instrumented, one is not • Alternate execution between them [Arnold’01] Method entry Microsoft Faculty Summit, July 2005
Toggling Profile Collection Method entry Method call Method call • Duplicate code • One copy is instrumented, one is not • Alternate execution between them Threshold-based counters Method entry Microsoft Faculty Summit, July 2005
Toggling Profile Collection Method entry Method call Control transfers to uninstrumented code • Duplicate code • One copy is instrumented, one is not • Alternate execution between them Control transfers to instrumented code Method entry Method call Microsoft Faculty Summit, July 2005
Toggling Profile Collection Method entry Method call Control transfers to uninstrumented code • Duplicate code • One copy is instrumented, one is not • Alternate execution between them Control transfers to instrumented code Method entry Can also stay in instrumented code for longer periods of time (based on thresholds), i.e., bursts [Hirzel’01,Chilimbi’04] Method call Microsoft Faculty Summit, July 2005
Toggling Profile Collection • Phoenix implementation • Duplicate code within the same method [Arnold’01] • Insert instrumentation in one copy • Insert branches that jump between the two • Based on counters • Users can • Specify the type of profile to collect • Threshold values • Global or local • Control sampling frequency and burst length Microsoft Faculty Summit, July 2005
Toggle Triggers • Currently, based on counters • However, this may cause us to collect redundant information or miss important activities • Our second focus is an intelligent sampling trigger • Based on program phases [Sherwood’03] • Repeating patterns in program behavior Microsoft Faculty Summit, July 2005
Toggle Triggers • Currently, based on counters • However, this may cause us to collect redundant information or miss important activities • Extant approaches to sampling: Periodic sampling Microsoft Faculty Summit, July 2005
Toggle Triggers • Currently, based on counters • However, this may cause us to collect redundant information or miss important activities • Extant approaches to sampling: Random sampling Microsoft Faculty Summit, July 2005
Toggle Triggers • Currently, based on counters • However, this may cause us to collect redundant information or miss important activities • Extant approaches to sampling: Bursty sampling Microsoft Faculty Summit, July 2005
Toggle Triggers • Currently, based on counters • However, this may cause us to collect redundant information or miss important activities • Our second focus is an intelligent sampling trigger • Based on program phases [Nagpurkar’05] Phase-base sampling 5% Error = 55-80% impr. Microsoft Faculty Summit, July 2005
Conclusions • Phoenix provides a framework for program instrumentation, analysis, and optimization • Our work • Extends Phoenix to enable program sampling • That is parameterizable (frequency, burst length) • Parameters can be changed dynamically • Extends sampling to be aware of program behavior • Phase-aware • Enables collection of accurate profiles with very little overhead • 55-80% overhead reduction over periodic/random sampling • Provides a visualization tool (consumes phase profiles) • Enables users to visualize/reason about program phase behavior Microsoft Faculty Summit, July 2005
Acknowledgements • Students involved DirectlyIndirectly Lingli Zhang (prof-guided opt) Sunil Soman (garbage collection) Ricky Tiang (profiling) Hussam Mousa (profile toggling) Priya Nagpurkar (phase profiling) Selim Gurun (embedded systems) • Thanks! More Info: Microsoft UCSB RACELab John Lefor www.cs.ucsb.edu/~racelab Vinod Grover Phoenix Development Team Microsoft Faculty Summit, July 2005