Finding Low-Utility Data Structures Guoqing Xu 1, Nick Mitchell 2, Matthew Arnold 2, Atanas Rountev 1, Edith Schonberg 2, Gary Sevitsky 2 1 Ohio State.

Slides:



Advertisements
Similar presentations
Uncovering Performance Problems in Java Applications with Reference Propagation Profiling PRESTO: Program Analyses and Software Tools Research Group, Ohio.
Advertisements

Runtime Techniques for Efficient and Reliable Program Execution Harry Xu CS 295 Winter 2012.
ASSUMPTION HIERARCHY FOR A CHA CALL GRAPH CONSTRUCTION ALGORITHM JASON SAWIN & ATANAS ROUNTEV.
Object-Orientation Meets Big Data Language Techniques towards Highly- Efficient Data-Intensive Computing Harry Xu UC Irvine.
OOPSLA 2005 Workshop on Library-Centric Software Design The Diary of a Datum: An Approach to Modeling Runtime Complexity in Framework-Based Applications.
Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
Efficient, Context-Sensitive Dynamic Analysis via Calling Context Uptrees Jipeng Huang, Michael D. Bond Ohio State University.
Go with the Flow: Profiling Copies to Find Run-time Bloat Guoqing Xu, Matthew Arnold, Nick Mitchell, Atanas Rountev, Gary Sevitsky Ohio State University.
A Regression Test Selection Technique for Aspect- Oriented Programs Guoqing Xu The Ohio State University
Components of representation Control dependencies: sequencing of operations –evaluation of if & then –side-effects of statements occur in right order Data.
Program Representations. Representing programs Goals.
Program Slicing Mark Weiser and Precise Dynamic Slicing Algorithms Xiangyu Zhang, Rajiv Gupta & Youtao Zhang Presented by Harini Ramaprasad.
Resurrector: A Tunable Object Lifetime Profiling Technique Guoqing Xu University of California, Irvine OOPSLA’13 Conference Talk 1.
Parallel Inclusion-based Points-to Analysis Mario Méndez-Lojo Augustine Mathew Keshav Pingali The University of Texas at Austin (USA) 1.
JOLT: REDUCING OBJECT CHURN AJ Shankar, Matt Arnold, Ras Bodik UC Berkeley, IBM Research | OOPSLA
ABCD: Eliminating Array-Bounds Checks on Demand Rastislav Bodík Rajiv Gupta Vivek Sarkar U of Wisconsin U of Arizona IBM TJ Watson recent experiments.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Precise Memory Leak Detection for Java Software Using Container Profiling.
CORK: DYNAMIC MEMORY LEAK DETECTION FOR GARBAGE- COLLECTED LANGUAGES A TRADEOFF BETWEEN EFFICIENCY AND ACCURATE, USEFUL RESULTS.
Asynchronous Assertions Eddie Aftandilian and Sam Guyer Tufts University Martin Vechev ETH Zurich and IBM Research Eran Yahav Technion.
A Comparison of Online and Dynamic Impact Analysis Algorithms Ben Breech Mike Tegtmeyer Lori Pollock University of Delaware.
Common Sub-expression Elim Want to compute when an expression is available in a var Domain:
Pointer and Shape Analysis Seminar Context-sensitive points-to analysis: is it worth it? Article by Ondřej Lhoták & Laurie Hendren from McGill University.
Software Bloat Analysis: Detecting, Removing, and Preventing Performance Problems in Modern Large- Scale Object-Oriented Applications Guoqing Xu, Nick.
Scaling CFL-Reachability-Based Points- To Analysis Using Context-Sensitive Must-Not-Alias Analysis Guoqing Xu, Atanas Rountev, Manu Sridharan Ohio State.
LeakChaser: Helping Programmers Narrow Down Causes of Memory Leaks Guoqing Xu, Michael D. Bond, Feng Qin, Atanas Rountev Ohio State University.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Regression Test Selection for AspectJ Software Guoqing Xu and Atanas.
1 Java Grande Introduction  Grande Application: a GA is any application, scientific or industrial, that requires a large number of computing resources(CPUs,
Recap from last time: live variables x := 5 y := x + 2 x := x + 1 y := x y...
Detecting Inefficiently-Used Containers to Avoid Bloat Guoqing Xu and Atanas Rountev Department of Computer Science and Engineering Ohio State University.
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
CACHETOR Detecting Cacheable Data to Remove Bloat Khanh Nguyen Guoqing Xu UC Irvine USA.
Precise Memory Leak Detection for Java Software Using Container Profiling Guoqing Xu, Atanas Rountev Program analysis and software tools group Ohio State.
Precision Going back to constant prop, in what cases would we lose precision?
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
Microsoft Research Asia Ming Wu, Haoxiang Lin, Xuezheng Liu, Zhenyu Guo, Huayang Guo, Lidong Zhou, Zheng Zhang MIT Fan Long, Xi Wang, Zhilei Xu.
Understanding Parallelism-Inhibiting Dependences in Sequential Java Programs Atanas (Nasko) Rountev Kevin Van Valkenburgh Dacong Yan P. Sadayappan Ohio.
Chapters 7, 8, & 9 Quiz 3 Review 1. 2 Algorithms Algorithm A set of unambiguous instructions for solving a problem or subproblem in a finite amount of.
Speculative Software Management of Datapath-width for Energy Optimization G. Pokam, O. Rochecouste, A. Seznec, and F. Bodin IRISA, Campus de Beaulieu
Analyzing Large-Scale Object-Oriented Software to Find and Remove Runtime Bloat Guoqing Xu CSE Department Ohio State University Ph.D. Thesis Defense Aug.
Budget-based Control for Interactive Services with Partial Execution 1 Yuxiong He, Zihao Ye, Qiang Fu, Sameh Elnikety Microsoft Research.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Rethinking Soot for Summary-Based Whole- Program Analysis PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Dacong Yan.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Chameleon Automatic Selection of Collections Ohad Shacham Martin VechevEran Yahav Tel Aviv University IBM T.J. Watson Research Center Presented by: Yingyi.
SEMINAR WEI GUO. Software Visualization in the Large.
Mark Marron 1, Deepak Kapur 2, Manuel Hermenegildo 1 1 Imdea-Software (Spain) 2 University of New Mexico 1.
Speculative Region-based Memory Management for Big Data Systems Khanh Nguyen, Lu Fang, Harry Xu, Brian Demsky Donald Bren School of Information and Computer.
Static Detection of Loop-Invariant Data Structures Harry Xu, Tony Yan, and Nasko Rountev University of California, Irvine Ohio State University 1.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Efficient Checkpointing of Java Software using Context-Sensitive Capture.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Heap liveness and its usage in automatic memory management Ran Shaham Elliot Kolodner Mooly Sagiv ISMM’02 Unpublished TVLA.
CoCo: Sound and Adaptive Replacement of Java Collections Guoqing (Harry) Xu Department of Computer Science University of California, Irvine.
Detecting Inefficiently-Used Containers to Avoid Bloat Guoqing Xu and Atanas Rountev Department of Computer Science and Engineering Ohio State University.
Performance Problems You Can Fix: A Dynamic Analysis of Memoization Opportunities Luca Della Toffola – ETH Zurich Michael Pradel – TU Darmstadt Thomas.
Object Naming Analysis for Reverse- Engineered Sequence Diagrams Atanas (Nasko) Rountev Beth Harkness Connell Ohio State University.
ECE 750 Topic 8 Meta-programming languages, systems, and applications Automatic Program Specialization for J ava – U. P. Schultz, J. L. Lawall, C. Consel.
Beyond Application Profiling to System Aware Analysis Elena Laskavaia, QNX Bill Graham, QNX.
Resource Sharing in LegUp. Resource Sharing in High Level Synthesis Resource Sharing is a well-known technique in HLS to reduce circuit area by sharing.
Dynamic Bug Detection & Tolerance Kathryn S McKinley The University of Texas at Austin.
Introduction toData structures and Algorithms
Optimistic Hybrid Analysis
Avraham Leff James T. Rayfield IBM T.J. Watson Research Center
Cork: Dynamic Memory Leak Detection with Garbage Collection
No Bit Left Behind: The Limits of Heap Data Compression
CACHETOR Detecting Cacheable Data to Remove Bloat
Objective of This Course
Jipeng Huang, Michael D. Bond Ohio State University
Demand-Driven Context-Sensitive Alias Analysis for Java
Interactive Exploration of Reverse-Engineered UML Sequence Diagrams
No Bit Left Behind: The Limits of Heap Data Compression
Presentation transcript:

Finding Low-Utility Data Structures Guoqing Xu 1, Nick Mitchell 2, Matthew Arnold 2, Atanas Rountev 1, Edith Schonberg 2, Gary Sevitsky 2 1 Ohio State University 2 IBM T. J. Watson Research Center

The State-of-the-Art Bloat can manifest itself through many symptoms temporary objects [Dufour FSE’08, Shankar OOPSLA’08] excessive data copies [Xu PLDI’09] highly-stale objects [Bond ASPLOS’06, Novak PLDI’09] problematic container behaviors [Xu ICSE’08, Shaham PLDI’09, Xu PLDI’10] … 2 Is there a common way to characterize bloat? At the heart of all inefficiencies lie computations, with great expense, produce data values that have little impact on the forward progress

What’s Common About Bloat boolean isResourceDir(IResource s){ List dirs = computeAllDirs(); return dirs.contains(s); } List computeAllDirs(){ //find and return all directories under the working dir } --- from eclipse 3 Blame the List object !!

Cost And Benefit Absolute cost of a value: total number of instructions executed to produce it – a = b or a = b + c, each has unit cost Benefit of heap value v: v (output) : benefit is a very large number v (not used) : benefit is 0 v v’ : benefit is M (amount of work) 4 M

Cost Computation Appears to a problem that can be solved by taint-like flow tracking b = 10; a = b + 3; c = b * 5; d = a / c; It is a backward dynamic flow problem Requires dynamic slicing in general 5 t b = 1; t a = t b + 1; t c = t b + 1; t d = t a + t c + 1; t d is 5 ? Double counted The cost of d is 4

Abstract Dynamic Thin Slicing Trace required by dynamic (regular and thin) slicing is unbounded – The entire execution needs to be recorded – Many more details than a client would need For some problems, equivalence classes exist a = b.m 1 a = b.m 3 a = b.m 67 a = b.m 23 a = b.m 1235 … a = b.m 45 a = b.m 217 a = b.m 29 a = b.m 35 a = b.m 9 … 6 b = …; b.m = …; a = b.m; Regular slicingThin slicing [Sridharan-PLDI’07] E1 E2

Abstract Dynamic Thin Slicing Introduce analysis semantics into profiling Static instruction domain I ; Regular dep. graph Abstract dep. graph 7 Bounded abstract domain D Natural numbers domain N Node: I X N Node: I X D Abstraction function f instr (j) : N D 1, 3, 67, 23, 1235 f a = b.m (j) E1 E2 f a = b.m (j) 45, 217, 29, 35, 9 Bounded slicing

Cost Computation Absolute cost is expensive to compute It does not make sense to help problem diagnosis 8 Absolute costAbstract cost a = b + c 20 a = b + c E0 b=e/f 34 c=h/g 2135 … b=e/f E102 c=h/g E47 … #nodesΣ(n.size)

Cost Computation As Abstract Slicing D = the set of calling contexts – Object-sensitivity is used [Milanova-TOSEM’05] – Each element is a chain of receiver object alloc sites Further reduce D to a finite bounded domain D cost – A set {0, …, s – 1} with fixed size s f instr (j) is a three-step function – Details can be found in the paper 9

Relative Abstract Cost – Cumulative cost measures the effort made from the beginning of the execution to produce a value – It is certain that the later a value is produced, the higher cost it has 10 Cumulative cost Program input f … … … … … g … h j … Relative cost O3O3 O2O2 O1O1

Relative Abstract Benefit 11 – Abstract benefit: the effort made to transform a value read from a heap loc l to the value written into another heap loc l – The more heap values are produced, the higher the benefit of l – The more complex the transformation is, the higher the benefit of l 11 Relative benefit Program input f … … … … g … h j … k … l O3O3 O2O2 O1O1 O4O4 O5O5

Case Studies sunflow: 9-15% running time reduction bloat: 35% running time reduction eclipse: 14.5% running time reduction derby: 6% running time reduction tomcat: 2% running time reduction Trade: 2.5% running time reduction Summary – Computation of data not necessarily used – Choices of unnecessary (expensive) operations – Certain usage patterns for inner classes are harmful 12

Overhead Implemented in J9 - the IBM commercial JVM Space overhead – Shadow heap: has the same size as the Java heap – Less than 20Mb for the dependence graph Time overhead – 71  slowdown: track every instruction and perform synchronization when dependence graph is updated Reducing overhead – Selective profiling – Sampling – Various static pre-processing techniques 13

Conclusions A run-time analysis that detects bloat by looking for high-cost-low-benefit operations – As opposed to symptoms-based bloat detection Achieve scalability using abstract slicing – A general technique for a variety of backward dynamic flow problem Found many optimization opportunities in large real-world Java applications 14

Thank you 15