Data Flow in Static Profiling Cathal Boogerd, Delft University, The Netherlands Leon Moonen, Simula Research Lab, Norway ?

Slides:



Advertisements
Similar presentations
Dataflow Analysis for Datarace-Free Programs (ESOP 11) Arnab De Joint work with Deepak DSouza and Rupesh Nasre Indian Institute of Science, Bangalore.
Advertisements

Pointers.
Automatic Test Data Generation of Character String Zhao Ruilian.
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
4.
MATH 224 – Discrete Mathematics
SPEED: Precise & Efficient Static Estimation of Symbolic Computational Complexity Sumit Gulwani MSR Redmond TexPoint fonts used in EMF. Read the TexPoint.
CML Efficient & Effective Code Management for Software Managed Multicores CODES+ISSS 2013, Montreal, Canada Ke Bai, Jing Lu, Aviral Shrivastava, and Bryce.
Static Single Assignment CS 540. Spring Efficient Representations for Reachability Efficiency is measured in terms of the size of the representation.
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
CS412/413 Introduction to Compilers Radu Rugina Lecture 37: DU Chains and SSA Form 29 Apr 02.
Register Allocation CS 671 March 27, CS 671 – Spring Register Allocation - Motivation Consider adding two numbers together: Advantages: Fewer.
Procedural programming in Java
1/20 Generalized Symbolic Execution for Model Checking and Testing Charngki PSWLAB Generalized Symbolic Execution for Model Checking and Testing.
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
Limits on ILP. Achieving Parallelism Techniques – Scoreboarding / Tomasulo’s Algorithm – Pipelining – Speculation – Branch Prediction But how much more.
CPE 731 Advanced Computer Architecture ILP: Part II – Branch Prediction Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University.
Scott Grissom, copyright 2004 Chapter 5 Slide 1 Analysis of Algorithms (Ch 5) Chapter 5 focuses on: algorithm analysis searching algorithms sorting algorithms.
Feedback: Keep, Quit, Start
Interprocedural analyses and optimizations. Costs of procedure calls Up until now, we treated calls conservatively: –make the flow function for call nodes.
CS 536 Spring Global Optimizations Lecture 23.
EENG449b/Savvides Lec /17/04 February 17, 2004 Prof. Andreas Savvides Spring EENG 449bG/CPSC 439bG.
Previous finals up on the web page use them as practice problems look at them early.
Run-Time Storage Organization
San Diego Supercomputer Center Performance Modeling and Characterization Lab PMaC Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation.
Computer Architecture Instruction Level Parallelism Dr. Esam Al-Qaralleh.
From last time: Inlining pros and cons Pros –eliminate overhead of call/return sequence –eliminate overhead of passing args & returning results –can optimize.
Schedule Midterm out tomorrow, due by next Monday Final during finals week Project updates next week.
Prof. S.M. Lee Department of Computer Science. Answer:
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
Reduced Instruction Set Computers (RISC) Computer Organization and Architecture.
CS212: DATASTRUCTURES Lecture 3: Recursion 1. Lecture Contents 2  The Concept of Recursion  Why recursion?  Factorial – A case study  Content of a.
Procedure Optimizations and Interprocedural Analysis Chapter 15, 19 Mooly Sagiv.
Proceso kintamybių modeliavimas Modelling process variabilities Donatas Čiukšys.
Reverse Engineering State Machines by Interactive Grammar Inference Neil Walkinshaw, Kirill Bogdanov, Mike Holcombe, Sarah Salahuddin.
Topic #10: Optimization EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
Design Space Exploration
Presented By Dr. Shazzad Hosain Asst. Prof., EECS, NSU
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
CS212: DATASTRUCTURES Lecture 3: Recursion 1. Lecture Contents 2  The Concept of Recursion  Why recursion?  Factorial – A case study  Content of a.
Type Systems CS Definitions Program analysis Discovering facts about programs. Dynamic analysis Program analysis by using program executions.
Procedural programming in Java Methods, parameters and return values.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,
Detecting Equality of Variables in Programs Bowen Alpern, Mark N. Wegman, F. Kenneth Zadeck Presented by: Abdulrahman Mahmoud.
Reduced Instruction Set Computers. Major Advances in Computers(1) The family concept —IBM System/ —DEC PDP-8 —Separates architecture from implementation.
Recursion Unit 15. Recursion: Recursion is defined as the process of a subprogram calling itself as part of the solution to a problem. It is a problem.
Lecture 2COMPSCI AP G Gimel'farb1 Estimated Time to Sum Subarrays Ignore data initialisation “Brute-force” summing with two nested loops: T(n) 
Targeted Path Profiling : Lower Overhead Path Profiling for Staged Dynamic Optimization Systems Rahul Joshi, UIUC Michael Bond*, UT Austin Craig Zilles,
© 2004 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Minimally Conservative Garbage Collection.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
CSCI1600: Embedded and Real Time Software Lecture 33: Worst Case Execution Time Steven Reiss, Fall 2015.
Chapter 6: Repetition Continued. 2 Validity Checks What’s weak about the following code ? do { s1 = JOptionPane.showInputDialog (“Enter a number: ”);
 Control Flow statements ◦ Selection statements ◦ Iteration statements ◦ Jump statements.
Register Allocation CS 471 November 12, CS 471 – Fall 2007 Register Allocation - Motivation Consider adding two numbers together: Advantages: Fewer.
D A C U C P Speculative Alias Analysis for Executable Code Manel Fernández and Roger Espasa Computer Architecture Department Universitat Politècnica de.
Single Static Assignment Intermediate Representation (or SSA IR) Many examples and pictures taken from Wikipedia.
Topics to be covered Instruction Execution Characteristics
Software Testing.
CSCI1600: Embedded and Real Time Software
Coding Concepts (Basics)
Effective and Efficient memory Protection Using Dynamic Tainting
Semantic Analysis Semantic analysis includes
Adapted from the slides of Prof
Introduction to Programming
Loop-Level Parallelism
Controlling Program Flow
CSCI1600: Embedded and Real Time Software
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Presentation transcript:

Data Flow in Static Profiling Cathal Boogerd, Delft University, The Netherlands Leon Moonen, Simula Research Lab, Norway ?

Why Static Profiling? Static Profiling: estimate a program’s execution profile by static program analysis – Frequency or likelihood? Applications include compiler optimization or WCET analysis – Previous work: prioritizing code inspection results Application domain: embedded systems – No hardware available for test during early development – Lack of complete test profile and infrastructure for dynamic measurements

Execution Likelihood and Frequency Both concepts are relevant for our application Consider difference between v1, guaranteed to be executed.... And v2, typically executed many times int main (int argc, char argv) { /* v1 */ int a = 1 ; foo(a) ; for (a = 0; a < argc; a++) { /* v2 */ } return 0; }

Data Flow in Static Profiling Previously: 65% of locations in test set predicted accurately with 5 percent point error margin – But: many locations had likelihood of either 1 or 0 – Improve others by improving branch prediction Estimating frequencies requires techniques to estimate loop frequencies – Use operations on loop variable to derive estimate  Use data flow information!

General Idea Use simplified version of existing branch prediction technique – Numeric range propagation, Patterson’s study indicated this leads to small but noticeable improvement – Computationally cheap variant: scalability is an issue, algorithms must cope with large software stacks (up to 5MLoC)

General Idea: More Specific Track potential value ranges of all integer variables – Value range propagation as generalization of constant propagation Use known ranges to improve estimates for conditions in which the corresponding variables occur Use ranges and operations on loop variables to estimate loop frequency

Application Loop variable a has ranges [6[0:5]] Variable b has ranges [3[1],3[3:5]] Point of interest has frequency 3 Of all conditions in the test set, 8% had complete variable value info a = 5 ; whi l e (a >= 0) { i f (a < 3) { b = 1 ; } else { b = a ; } i f (b > 2) { / * point of interest */ } a−−; }

Findings Simple data flow propagation algorithm only adds linear time overhead to previous solution However, simple data flow does not add significant information over type-based heuristics – Notably, the number of branches benefiting is limited Most likely culprits for differences with earlier study: – Numeric ranges instead of (simple) symbolic ones – Context-insensitivity instead of procedure cloning

Summary Does data flow analysis for profiling work? – Previous control flow based solution works just as well – It is scalable, but it does not add value  Can data flow analyses increase accuracy of static profiling and remain scalable?