cs8803SC_lecture17

cs8803SC_lecture17 - CS8803SC Software and Hardware...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS8803SC Software and Hardware Cooperative Computing Profile/Pin Prof. Hyesoon Kim School of Computer Science Georgia Institute of Technology Review • Instrumentation method – Compiler inserts code to collect profile information – Edge profiling, Path profiling • Sampling method – Use hardware performance counters – Works without modifying the code • Event-based profiling • Time-based profiling • Static Heuristics
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Limitations of Profiling Profile-guided code optimization has become essential for achieving good performance. Run-time behavior profile-time behavior: Good! Run-time behavior profile-time behavior: Bad! Representative Profile • “Predicting program behavior using real or estimated profiles” wall ’91 • Defined the metrics to measure the representativeness of the profile data across different input sets. • Metrics: Similarities, Differences • Profiling attributes: – Basic blocks, procedure calls, referenced global variables (to promote registers)
Background image of page 2
3 Matching Methods • Key matching – Take top n entries of the profiled data and see how many of them are matching – e.g.) n=8, 5 match value = 5/8 • Weight matching – Weights of top n entries in profile data A vs. profile data B = weight (A)/weight (B) – Asymmetric metric • No information about stability of profile data 2D-Profiling [Kim et al. ’06] • Detecting profiling input dependency • Developed specifically for branch behavior • Reference: Hyesoon Kim, M. Aater Suleman, Onur Mutlu, and Yale N. Patt, "2D-Profiling: Detecting Input-Dependent Branches with a Single Input Data Set," (CGO’06) ,
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Traditional Profiling brA time brB time MEAN pr.Acc(brA) MEAN pr.Acc(brB) behavior of brA behavior of brB MEAN pr.Acc(brA) MEAN pr.Acc(brB) pr. Acc 2D-profiling brA time brB time MEAN pr.Acc(brA) MEAN pr.Acc(brB) STD pr.Acc(brA) STD pr.Acc(brB) behavior of brA behavior of brB A: input-dependent br, B: input-independent br MEAN pr.Acc(brA) STD pr.Acc(brA) MEAN pr.Acc(brB) STD pr.Acc(brB)
Background image of page 4
5 Let’s start Pin! • Easy instrumentation tool • Beyond instrumentation (later lecture) • Introduction to Pin • Slides are from Intel Pin Tutorial (2006 ISCA) 10 What is Instrumentation? • A technique that inserts extra code into a program to collect runtime information • Instrumentation approaches: – Source instrumentation: • Instrument source programs Binary instrumentation : • Instrument executables directly Pin
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 11 Example: Instruction Count sub $0xff, %edx cmp %esi, %edx jle <L1> mov $0x1, %edi add $0x10, %eax counter++; counter++; counter++; counter++; counter++; 12 Example: Instruction Trace sub $0xff, %edx cmp %esi, %edx jle <L1> mov $0x1, %edi add $0x10, %eax Print(ip); Print(ip); Print(ip); Print(ip); Print(ip);
Background image of page 6
7 What is Pin? • Easy-to-use Instrumentation
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 28

cs8803SC_lecture17 - CS8803SC Software and Hardware...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online