Dynamic Instrumentation of Loops in Paradyn & Dyninst Eli Collins Computer Sciences Department University of Wisconsin-Madison Madison,

Slides:



Advertisements
Similar presentations
ANALYSIS OF PROG. LANG. PROGRAM ANALYSIS Instructors: Crista Lopes Copyright © Instructors. 1.
Advertisements

1 ILP (Recap). 2 Basic Block (BB) ILP is quite small –BB: a straight-line code sequence with no branches in except to the entry and no branches out except.
Control Flow Analysis (Chapter 7) Mooly Sagiv (with Contributions by Hanne Riis Nielson)
EECC551 - Shaaban #1 Fall 2005 lec# Static Compiler Optimization Techniques We examined the following static ISA/compiler techniques aimed.
University of Maryland Locality Optimizations in cc-NUMA Architectures Using Hardware Counters and Dyninst Mustafa M. Tikir Jeffrey K. Hollingsworth.
Advanced microprocessor optimization Kampala August, 2007 Agner Fog
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
Paradyn. Paradyn Goals Performance measurement tool that –scales to long-running programs on large parallel and distributed systems –automates much of.
Paradyn Project Paradyn / Dyninst Week College Park, Maryland March 26-28, 2012 Self-propelled Instrumentation Wenbin Fang.
Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin May 2-3, 2011 Introduction to the PatchAPI Wenbin Fang, Drew Bernat.
The Path to Multi-core Tools Paul Petersen. Multi-coreToolsThePathTo 2 Outline Motivation Where are we now What is easy to do next What is missing.
University of Houston Extending Global Optimizations in the OpenUH Compiler for OpenMP Open64 Workshop, CGO ‘08.
March 18, 2008SSE Meeting 1 Mary Hall Dept. of Computer Science and Information Sciences Institute Multicore Chips and Parallel Programming.
Introduction to Computers and Programming Midterm Review Sana Odeh.
Compiler Challenges, Introduction to Data Dependences Allen and Kennedy, Chapter 1, 2.
Cpeg421-08S/final-review1 Course Review Tom St. John.
EECC551 - Shaaban #1 Spring 2004 lec# Static Compiler Optimization Techniques We already examined the following static compiler techniques aimed.
2/15/2006"Software-Hardware Cooperative Memory Disambiguation", Alok Garg, HPCA Software-Hardware Cooperative Memory Disambiguation Ruke Huang, Alok.
Parallel Programming Models and Paradigms
A Data Locality Optimizing Algorithm based on A Data Locality Optimizing Algorithm by Michael E. Wolf and Monica S. Lam.
Data Dependences CS 524 – High-Performance Computing.
Instrumentation and Measurement CSci 599 Class Presentation Shreyans Mehta.
Cache-Conscious Runtime Optimization for Ranking Ensembles Xun Tang, Xin Jin, Tao Yang Department of Computer Science University of California at Santa.
Automated Tracing and Visualization of Software Security Structure and Properties Symposium on Visualization for Cyber Security 2012 (VizSec’12) Seattle,
5.3 Machine-Independent Compiler Features
Paradyn Week – April 14, 2004 – Madison, WI DPOMP: A DPCL Based Infrastructure for Performance Monitoring of OpenMP Applications Bernd Mohr Forschungszentrum.
Paradyn Project Dyninst/MRNet Users’ Meeting Madison, Wisconsin August 7, 2014 The Evolution of Dyninst in Support of Cyber Security Emily Gember-Jacobson.
PMaC Performance Modeling and Characterization Performance Modeling and Analysis with PEBIL Michael Laurenzano, Ananta Tiwari, Laura Carrington Performance.
Oct Using Platform-Specific Performance Counters for Dynamic Compilation Florian Schneider and Thomas Gross ETH Zurich.
1 Malware Analysis and Instrumentation Andrew Bernat and Kevin Roundy Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin May 2-4, 2011.
The Deconstruction of Dyninst: Experiences and Future Directions Drew Bernat, Madhavi Krishnan, Bill Williams, Bart Miller Paradyn Project 1.
Guiding Principles. Goals First we must agree on the goals. Several (non-exclusive) choices – Want every CS major to be educated in performance including.
Master Program (Laurea Magistrale) in Computer Science and Networking High Performance Computing Systems and Enabling Platforms Marco Vanneschi 1. Prerequisites.
1 Data-state Diversity for Test Data Search Mohammad Alshraideh and Leonardo Bottaci Department of Computer Science University of Hull, Hull, UK.
Research Topics CSC Parallel Computing & Compilers CSC 3990.
1 Optimizing compiler tools and building blocks project Alexander Drozdov, PhD Sergey Novikov, PhD.
1 Code optimization “Code optimization refers to the techniques used by the compiler to improve the execution efficiency of the generated object code”
© 2004 Andrew R. BernatApril 14, 2004Dynamic Call-Path Profiling Incremental Call-Path Profiling Andrew Bernat Computer Sciences Department.
© 2001 Barton P. MillerParadyn/Condor Week (12 March 2001, Madison/WI) The Paradyn Port Report Barton P. Miller Computer Sciences Department.
April 14, 2004 The Distributed Performance Consultant: Automated Performance Diagnosis on 1000s of Processors Philip C. Roth Computer.
Compiler Optimizations ECE 454 Computer Systems Programming Topics: The Role of the Compiler Common Compiler (Automatic) Code Optimizations Cristiana Amza.
Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin April 12-14, 2010 Binary Concolic Execution for Automatic Exploit Generation Todd Frederick.
© 2001 B. P. Miller & M. Livny (12-14 March 2001)Paradyn/Condor Week Agenda Paradyn/Condor Week 2001 Barton P. Miller Miron Livny
Code Motion for MPI Performance Optimization The most common optimization in MPI applications is to post MPI communication earlier so that the communication.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Extracting Sequence.
CS412/413 Introduction to Compilers Radu Rugina Lecture 18: Control Flow Graphs 29 Feb 02.
1 Control Flow Graphs. 2 Optimizations Code transformations to improve program –Mainly: improve execution time –Also: reduce program size Can be done.
Integrated Performance Views in Charm++: Projections meets TAU Scott Biersdorff Allen D. Malony Department Computer and Information Science University.
© 2001 Week (14 March 2001)Paradyn & Dyninst Demonstrations Paradyn & Dyninst Demos Barton P. Miller Computer.
Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin April 29-May 1, 2013 Detecting Code Reuse Attacks Using Dyninst Components Emily Jacobson, Drew.
A Dynamic Tracing Mechanism For Performance Analysis of OpenMP Applications - Caubet, Gimenez, Labarta, DeRose, Vetter (WOMPAT 2001) - Presented by Anita.
Dynamic Tuning of Parallel Programs with DynInst Anna Morajko, Tomàs Margalef, Emilio Luque Universitat Autònoma de Barcelona Paradyn/Condor Week, March.
1 ROGUE Dynamic Optimization Framework Using Pin Vijay Janapa Reddi PhD. Candidate - Electrical And Computer Engineering University of Colorado at Boulder.
Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin April 12-14, 2004 Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin April 12-14, 2004.
Tuning Threaded Code with Intel® Parallel Amplifier.
Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin April 12-14, 2010 Paradyn Project Safe and Efficient Instrumentation Andrew Bernat.
Introduction to Performance Tuning Chia-heng Tu PAS Lab Summer Workshop 2009 June 30,
©SoftMoore ConsultingSlide 1 Code Optimization. ©SoftMoore ConsultingSlide 2 Code Optimization Code generation techniques and transformations that result.
PINTOS: An Execution Phase Based Optimization and Simulation Tool) PINTOS: An Execution Phase Based Optimization and Simulation Tool) Wei Hsu, Jinpyo Kim,
Kernel Code Coverage Nilofer Motiwala Computer Sciences Department
Code Optimization Overview and Examples
Dependence Analysis Important and difficult
Optimization Code Optimization ©SoftMoore Consulting.
Getting Started with Automatic Compiler Vectorization
A configurable binary instrumenter
Code Optimization Overview and Examples Control Flow Graph
Calpa: A Tool for Automating Dynamic Compilation
Efficient x86 Instrumentation:
Allen D. Malony Computer & Information Science Department
Introduction to Optimization
Presentation transcript:

Dynamic Instrumentation of Loops in Paradyn & Dyninst Eli Collins Computer Sciences Department University of Wisconsin-Madison Madison, WI USA

Loop Instrumentation -2- Motivation Function-level analysis common, insufficient Where in func is the bottleneck?

Loop Instrumentation -3- Motivation (cont.) Loops fundamental to program semantics –Sources of parallelism (OpenMP, unrolling) –Collect/associate perf. data at loop granularity Loop bodies often dominate prog. runtime –Especially true for scientific apps Exploit runtime knowledge of loops

Loop Instrumentation -4- How We Do It Compiling vs. Program Instrumentation for (… int i; source code CFG binary CFG (instrumented)

Loop Instrumentation -5- Starting w/ the Binary Compilers transform (optimize) loops Some loops disappear –Short loops unrolled –Similar loops fused together We analyze & operate on the binary –Binary determines program behavior: performance

Loop Instrumentation -6- Analysis CFG creation (Laune Harris) Detect loops in CFG (Mustafa Tikir) Identify & instrument CFG points that map to loop execution semantics

Loop Instrumentation -7- Instrumenting Control Flow for (i = 0; i < N; i++) c[i] = a[i] + b[i]; xor %ebx,%ebx lea 0x0(%esi),%esi lea 0x0(%edi),%edi L1 flds 0x98(%ebp,%ebx,4) fadds 0xc8(%ebp,%ebx,4) fstps 0x68(%ebp,%ebx,4) inc %ebx cmp $0x9,%ebx jle L1 xor %ebx,%ebx for (i = 0; i < N; i++) c[i] = a[i] + b[i]; control flow graph entry exit start end

Loop Instrumentation -8- Abstractions New instrumentation points (DyninstAPI) BPatch_point *pt; pt = func-> findPoint ( BPatch_loopEntry, iloops[0] ); thread->insertSnippet(snip, pt); Vector oloops, iloops; func->getOuterLoops(oloops); loops[0]->getOuterLoops(iloops);

Loop Instrumentation -9- Loops in Paradyn “Where” axis displays program resources

Loop Instrumentation -10- Loops in Paradyn Focus on resource, select program metric for visualization Loop-granularity for metrics

Loop Instrumentation -11- Loops in Paradyn CPU time metric with loop foci Which part of the function is CPU intensive?

Loop Instrumentation -12- Loops in Paradyn PC “walks” CGFunction-loop nesting

Loop Instrumentation -13- In Progress Loop-aware Performance Consultant –What is an effective search policy? –How can we take advantage of control flow structure? Loops in the Metric Description Language Visualizations –Incorporate program structure –Correlate performance data with original program source

Loop Instrumentation -14- Loop-aware Visualization func loop 1 time void func() { int i, j; for (i=0; i < N; i++) { calc(i,j); for(j=0; j < M; j++) A[i] = B[i]*C[j]; } loop 1.1

Loop Instrumentation -15- Summary Function-level granularity insufficient Identify & instrument loop points DyninstAPI: abstractions for tool builders Paradyn –Fine-grain metrics, bottleneck location –Visualization

Loop Instrumentation -16- Dynamic Instrumentation of Loops in Paradyn & Dyninst