210 likes | 747 Views
The PinPoints Toolkit for Finding Representative Regions of Large Programs Harish Patil Platform Technology & Architecture Development Enterprise Platform Group Intel Corporation Presented as part of the Pin tutorial at ASPLOS 2004, Boston, MA 10/09/2004 People
E N D
The PinPoints Toolkit for Finding Representative Regions of Large Programs Harish Patil Platform Technology & Architecture Development Enterprise Platform Group Intel Corporation Presented as part of the Pin tutorial at ASPLOS 2004, Boston, MA10/09/2004
People PinPoints: Harish Patil, Robert Cohn, Mark Charney, Andrew Sun, Rajiv Kapoor, Anand Karunanidhi Pin: Robert Cohn, Artur Klauser, Geoff Lowney, CK Luk, Robert Muth, Harish Patil,Vijay Janapa Reddi, Steven Wallace Acknowledgements: Brad Calder, Michael Greenfield, Geoff Lowney, Joel Emer, Chris Weaver, Michael Adler, Kim Hazelwood, James Vash, Ram Ramanujam, Roger Golliver, Timothy Prince, Allan Knies, Youngsoo Choi, Nechama Katan, Chris Gianos, Hideki Saito, Mahesh Madhav … PinPoints
PinPoints Representative Regions of Programs • Automatically chosen • Validated ( represent whole-program behavior) • For Trace-driven or Execution-driven Simulation • Pin (Intel) : http://rogue.colorado.edu/Pin + SimPoint (UCSD) http://www.cse.ucsd.edu/~calder/simpoint/ • Found/Validated PinPoints for long running (trillions of instructions) programs [IPF & x86] PinPoints
Outline Of the Talk • WhyPinPoints? • PinPoints methodology: How to find and validate representative regions for simulation Reference: Paper in MICRO-37: “Pinpointing Representative Portions of Large Intel® Itanium® Programs with Dynamic Instrumentation”, Patil et al. http://rogue.colorado.edu/Pin/links.php PinPoints [download] PinPoints
Motivation: Simulating Large Programs Problem: Whole-program simulation is very slow (can take months) Solution: Find representative simulation points • Programs have phases: random/blind selection may miss them • SimPoint approach: Find phases using basic block profile: one simulation point (PinPoint) per phase • PinPoints : < 1% of program execution • Capture whole-program behavior PinPoints
Motivation: Simulating Large Programs (continued) Problem: Porting programs to simulators is often not practical • license issues • extra resources (disks etc.) Solution: Drive simulation from native environment • Run under Pin • Pin runs programs “out-of-the-box” (no porting required) PinPoints
Sample Counters Weighted Sum for PinPoints Whole Program Match? The PinPoints Methodology isimpoint : Generate Dynamic Basic Block Profile Phase Detection + PinPoint Selection SimPoint Tools: Analyze Basic Block Profile to find phases Scripts: Generate PinPoints files H/W counters-based Validation PinPoints file Trace Generation/Simulation PinPoints
2nd level cache misses Energy used per interval Instruction cache misses Data cache misses Branch misprediction Performance (IPC) Phases in gzip’s Execution PinPoints Instructions
SimPoint: You are what you execute • Goal - track behavior of a program • Behavior caused by the path through code • How - Track the code that is executing • Detect changes and similarities in code • Basic Block Distribution Analysis • Generate and compare Code Signatures PinPoints
A B C D E A 3 < 3, 1, 2, 3, 1 > C B 1 2 D 3 E 1 Basic-Block Distribution Analysis PinPoints
3 2 1 A B C D E A 2 < 3, 1, 2, 3, 1 > 3 C B 0 2 1 • Capture using isimpoint • Compare vectors • Group similar vectors in clusters • Choose one PinPoint per cluster D 2 E 2 Basic-Block Distribution Analysis < 3, 2, 1, 3, 1 > < 2, 0, 2, 2, 2 > PinPoints
… 1 2 … 1022 4232 Profiles(vectors) for Program Slices (100 Million Instructions each) Phase Detection + PinPoint Selection Profile withisimpoint Analyze with SimPoint … … 1 2 350 4232 … … 350 3518 PinPoint 2: Weight 70% PinPoint 1: Weight 30% pinpoints.pp PinPoints
PinPoints Generated for Some Programs (Commercial and SPEC2000) PinPoints : < 1% of program execution PinPoints
PinPoints: Validation • Do PinPoints capture whole-program behavior? Whole-Program CPI: Actual-CPI Predict using CPI for PinPoints: Predicted-CPI Predicted-CPI = Weighti * CPIi % Delta= (Actual-CPI – Predicted-CPI)*100/ (Actual-CPI) • Do they work across micro-architectures? • Predict performance on different configurations with the same binary/PinPoints : Compare with actual performance PinPoints
Predicting Whole-program CPI with PinPoints (Itanium2: 1.3 GHz) PinPoints
Predicting Whole-program CPI with PinPoints (Pentium 4: 2.8 GHz) PinPoints
Predicting Whole-program L2 Misses with PinPoints(Itanium 2: 900 MHz) PinPoints
Speedup Prediction with PinPoints(Itanium 1, 2 varying Frequency) • Same binaries/ Same set of PinPoints : Different Microarchitectures PinPoints
Relevant Pin Tools • isimpoint : generates basic block vectors in a format suitable for SimPoint analysis • controller : allows fast-forwarding till a region of interest is reached Specifying a region of interest: • Skip N instructions • Specific code address + Count • PinPoints file + PinPoint number Available as “class CONTROL” in a Pin kit PinPoints
Summary Finding simulation points : The Pin Advantage • No special compiler/link flags or porting required • Allows analysis of programs as they run PinPoints : < 1% of program execution • Predict whole-program behavior • Work across microarchitectures PinPoints
Resources • Timothy Sherwood, Erez Perelman, Greg Hamerly and Brad Calder. “Automatically Characterizing Large Scale Program Behavior” ASPLOS’02 • SimPoint toolkithttp://www-cse.ucsd.edu/~calder/simpoint/ • Harish Patil, Robert Cohn, Mark Charney, Rajiv Kapoor, Andrew Sun, and Anand Karunanidhi. “Pinpointing Representative Portions of Large Intel Itanium Programs with Dynamic Instrumentation” MICRO-37(2004). • PinPoints toolkit: To be released soon (available upon request) PinPoints