Iceberg: A Tool for Static Analysis of Java Critical Sections Michael D. Shah, Samuel Z. Guyer Tufts University Soap Workshop Session II, 10:50-11:10am,

Slides:



Advertisements
Similar presentations
Network Resource Broker for IPTV in Cloud Computing Lei Liang, Dan He University of Surrey, UK OGF 27, G2C Workshop 15 Oct 2009 Banff,
Advertisements

Xianfeng Li Tulika Mitra Abhik Roychoudhury
CS492B Analysis of Concurrent Programs Lock Basics Jaehyuk Huh Computer Science, KAIST.
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.
Precept 3 COS 461. Concurrency is Useful Multi Processor/Core Multiple Inputs Don’t wait on slow devices.
Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex With code bases exceeding a million lines of code, a.
0wn3rship Types John Whaley CS343 Stanford University May 19, 2004.
Introduction & Overview CS4533 from Cooper & Torczon.
The shift from sequential to parallel and distributed computing is of fundamental importance for the advancement of computing practices. Unfortunately,
Discussion Week 3 TA: Kyle Dewey. Overview Concurrency overview Synchronization primitives Semaphores Locks Conditions Project #1.
1 Testing Concurrent Programs Why Test?  Eliminate bugs?  Software Engineering vs Computer Science perspectives What properties are we testing for? 
Budapest, November st ALADIN maintenance and phasing workshop Short introduction to OpenMP Jure Jerman, Environmental Agency of Slovenia.
Prospector : A Toolchain To Help Parallel Programming Minjang Kim, Hyesoon Kim, HPArch Lab, and Chi-Keung Luk Intel This work will be also supported by.
1 Scalable and transparent parallelization of multiplayer games Bogdan Simion MASc thesis Department of Electrical and Computer Engineering.
Department of Computer Science A Static Program Analyzer to increase software reuse Ramakrishnan Venkitaraman and Gopal Gupta.
J-OCM is a system for monitoring distributed Java applications conforming to OMIS specification with J-OMIS extensions. It is used to: gather information.
EMSOFT’02 Silicomp Research Institute JCOD 1 JCOD A Lightweight Modular Compilation Technology For Embedded Java Bertrand Delsart :
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Use of Coverity & Valgrind in Geant4 Gabriele Cosmo.
Widespread Integration of Parallelism Steven Bogaerts.
1 Programming Languages and the Software Production Process Informal Cardelli’s metrics of programming languages fitness to real-time applications: Economy.
COMP 111 Threads and concurrency Sept 28, Tufts University Computer Science2 Who is this guy? I am not Prof. Couch Obvious? Sam Guyer New assistant.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
CSC 7600 Lecture 28 : Final Exam Review Spring 2010 HIGH PERFORMANCE COMPUTING: MODELS, METHODS, & MEANS FINAL EXAM REVIEW Daniel Kogler, Chirag Dekate.
Real Time Programming Language. Intro A programming language represents the nexus of design and structure. But misuse of the programming language can.
Performance Analysis & Code Profiling It’s 2:00AM -- do you know where your program counter is?
The ATOMOS Transactional Programming Language Mehdi Amirijoo Linköpings universitet.
Discussion Week 2 TA: Kyle Dewey. Overview Concurrency Process level Thread level MIPS - switch.s Project #1.
Performance Testing Test Complete. Performance testing and its sub categories Performance testing is performed, to determine how fast some aspect of a.
Software Metric Tools Joel Keyser, Jacob Napp, Carey Norslien, Stephen Owings, Tristan Paynter.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
Dynamic Testing.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
Parallel Computing Presented by Justin Reschke
CS223: Software Engineering Lecture 21: Unit Testing Metric.
CSC Multiprocessor Programming, Spring, 2012 Chapter 12 – Testing Concurrent Programs Dr. Dale E. Parson, week 12.
Tuning Threaded Code with Intel® Parallel Amplifier.
Beyond Application Profiling to System Aware Analysis Elena Laskavaia, QNX Bill Graham, QNX.
Mergesort example: Merge as we return from recursive calls Merge Divide 1 element 829.
Embedded Systems MPSoC Architectures OpenMP: Exercises Alberto Bosio
Threads Some of these slides were originally made by Dr. Roger deBry. They include text, figures, and information from this class’s textbook, Operating.
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
John D. McGregor Session 9 Testing Vocabulary
CSE 451: Operating Systems Winter 2012 Deadlock
Processes and Threads Processes and their scheduling
Computer Engg, IIT(BHU)
Semester Review Chris Gill CSE 422S - Operating Systems Organization
Amir Kamil and Katherine Yelick
L21: Putting it together: Tree Search (Ch. 6)
Third Party Tools for SQL Server
CMSC 341 Prof. Michael Neary
Parallel Programming in Contemporary Programming Languages (Part 2)
Looping and Repetition
Google Crisis Response
Computer Organization & Compilation Process
Human Complexity of Software
CSCI1600: Embedded and Real Time Software
Yikes! Why is my SystemVerilog Testbench So Slooooow?
Shared Memory Programming
Parallelism and Concurrency
Design and Implementation Issues for Atomicity
Amir Kamil and Katherine Yelick
CSC 253 Lecture 2.
By: Diane Marie Lee Ma. Mercedes Rodrigo Ryan Baker Jessica Sugay
CSE 451: Operating Systems Spring 2008 Module 9 Deadlock
Interpreting Java Program Runtimes
Problems with Locks Andrew Whitaker CSE451.
From Single Test to Test Framework With Rapise
Presentation transcript:

Iceberg: A Tool for Static Analysis of Java Critical Sections Michael D. Shah, Samuel Z. Guyer Tufts University Soap Workshop Session II, 10:50-11:10am, June 14, 2016

Categories of Concurrency Work Correctness o Race Conditions o Deadlock Performance o Scalability o Occasional problems

Categories of Concurrency Work Correctness o Race Conditions o Deadlock Performance o Scalability o Occasional problems

The Problem Real world coders may not always understand the performance of their code in critical sections.

Critical Section An area of code protected by a ‘lock’ o ad-hoc synchronization In Java, done with keyword ‘synchronized’ o We are focusing on finding methods that are synchronized

Critical Section An area of code protected by a ‘lock’ o ad-hoc synchronization In Java, done with keyword ‘synchronized’ o We are focusing on finding methods that are synchronized

What is in a Critical Section? High latency operations o I/O o Garbage Collection Amortized cost operations o Rehash, expand array-list Unexpected actions o Error handling or logging Over-synchronization o Irrelevant work

Our Soot based Tool: Iceberg Compile with Java compiler Transform Bytecode with Soot Build Call Graph Mark Critical Sections Gather Features of Critical Sections Output Summary and Graph

Code Metrics Collected on 24 Real World Programs Nested Methods Nested Loops Contains Allocations Large Line Count Branches Java Library Method

Sample Method

Synchronized Method

Visualization Aids Synchronized Method

Sample Method - Metrics # of methods in first level – 6 Total # of method calls – Total # of synchronized methods in first level – 3 Total # of synchronized method calls – 240 Total number of Java Library Calls – Number of allocations in first level – 0 Total number of allocations – 3030 Total number of lines of iR

Sample Method - Metrics # of methods in first level – 6 Total # of method calls – Total # of synchronized methods in first level – 3 Total # of synchronized method calls – 240 Total number of Java Library Calls – Number of allocations in first level – 0 Total number of allocations – 3030 Total number of lines of iR

Sample Method - Metrics # of methods in first level – 6 Total # of method calls – Total # of synchronized methods in first level – 3 Total # of synchronized method calls – 240 Total number of Java Library Calls – Number of allocations in first level – 0 Total number of allocations – 3030 Total number of lines of iR

Performance Pitfalls Over Synchronization o Too liberal use of ‘synchronized’ Large Critical Section o Lots of method calls Nested Critical Section o Many locks obtained

Are Developers Aware of Code Size? Our analysis is conservative, and static Does not handle reflection cases BUT, it appears call trees could possibly be very deep in worse case scenario o We compute maximum depth o (Other features like max children)

Results Critical sections can often be bigger than you think Libraries hide a lot of code o Including nested critical sections

Future Work – Static Analysis Integrate Static Analysis into IDE o Highlighting potential bad paths Collecting more code metrics

Future Work – Dynamic Analysis Dynamic analysis to measure actual time o Build actual call graph of program execution Latency variability analysis o Identify slow vs fast paths Concolic Testing o Force programs down “bad” paths

Thank You! Questions and Feedback? Contact: o o michaeldshah.net

Why Care About Performance Mobile Servers Games Image Sources: