Jipeng Huang, Michael D. Bond Ohio State University

Slides:



Advertisements
Similar presentations
An Implementation of Mostly- Copying GC on Ruby VM Tomoharu Ugawa The University of Electro-Communications, Japan.
Advertisements

1 Write Barrier Elision for Concurrent Garbage Collectors Martin T. Vechev Cambridge University David F. Bacon IBM T.J.Watson Research Center.
Efficient, Context-Sensitive Dynamic Analysis via Calling Context Uptrees Jipeng Huang, Michael D. Bond Ohio State University.
An On-the-Fly Mark and Sweep Garbage Collector Based on Sliding Views Hezi Azatchi - IBM Yossi Levanoni - Microsoft Harel Paz – Technion Erez Petrank –
Resurrector: A Tunable Object Lifetime Profiling Technique Guoqing Xu University of California, Irvine OOPSLA’13 Conference Talk 1.
Probabilistic Calling Context Michael D. Bond Kathryn S. McKinley University of Texas at Austin.
Asynchronous Assertions Eddie Aftandilian and Sam Guyer Tufts University Martin Vechev ETH Zurich and IBM Research Eran Yahav Technion.
Efficient Concurrent Mark-Sweep Cycle Collection Daniel Frampton, Stephen Blackburn, Luke Quinane and John Zigman (Pending submission) Presented by Jose.
SOS: Saving Time in Dynamic Race Detection with Stationary Analysis Du Li, Witawas Srisa-an, Matthew B. Dwyer.
380C Where are we & where we are going – Managed languages Dynamic compilation Inlining Garbage collection What else can you do when you examine the heap.
ParMarkSplit: A Parallel Mark- Split Garbage Collector Based on a Lock-Free Skip-List Nhan Nguyen Philippas Tsigas Håkan Sundell Distributed Computing.
Free-Me: A Static Analysis for Individual Object Reclamation Samuel Z. Guyer Tufts University Kathryn S. McKinley University of Texas at Austin Daniel.
1 The Compressor: Concurrent, Incremental and Parallel Compaction. Haim Kermany and Erez Petrank Technion – Israel Institute of Technology.
ADVERSARIAL MEMORY FOR DETECTING DESTRUCTIVE RACES Cormac Flanagan & Stephen Freund UC Santa Cruz Williams College PLDI 2010 Slides by Michelle Goodstein.
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.
1 Hash-Based Indexes Chapter Introduction  Hash-based indexes are best for equality selections. Cannot support range searches.  Static and dynamic.
An Adaptive, Region-based Allocator for Java Feng Qian & Laurie Hendren 2002.
Age-Oriented Concurrent Garbage Collection Harel Paz, Erez Petrank – Technion, Israel Steve Blackburn – ANU, Australia April 05 Compiler Construction Scotland.
Reference Counters Associate a counter with each heap item Whenever a heap item is created, such as by a new or malloc instruction, initialize the counter.
Quarantine: A Framework to Mitigate Memory Errors in JNI Applications Du Li , Witawas Srisa-an University of Nebraska-Lincoln.
Bell: Bit-Encoding Online Memory Leak Detection Michael D. Bond Kathryn S. McKinley University of Texas at Austin.
Cormac Flanagan UC Santa Cruz Velodrome: A Sound and Complete Dynamic Atomicity Checker for Multithreaded Programs Jaeheon Yi UC Santa Cruz Stephen Freund.
Tolerating Memory Leaks Michael D. Bond Kathryn S. McKinley.
Michael Bond Kathryn McKinley The University of Texas at Austin.
Taking Off The Gloves With Reference Counting Immix
Fast Conservative Garbage Collection Rifat Shahriyar Stephen M. Blackburn Australian National University Kathryn S. M cKinley Microsoft Research.
Eraser: A Dynamic Data Race Detector for Multithreaded Programs STEFAN SAVAGE, MICHAEL BURROWS, GREG NELSON, PATRICK SOBALVARRO, and THOMAS ANDERSON Ethan.
Dynamic Object Sampling for Pretenuring Maria Jump Department of Computer Sciences The University of Texas at Austin Stephen M. Blackburn.
Free-Me: A Static Analysis for Automatic Individual Object Reclamation Samuel Z. Guyer, Kathryn McKinley, Daniel Frampton Presented by: Dimitris Prountzos.
DoubleChecker: Efficient Sound and Precise Atomicity Checking Swarnendu Biswas, Jipeng Huang, Aritra Sengupta, and Michael D. Bond The Ohio State University.
Breadcrumbs: Efficient Context Sensitivity for Dynamic Bug Detection Analyses Michael D. Bond University of Texas at Austin Graham Z. Baker Tufts / MIT.
OOPLs /FEN March 2004 Object-Oriented Languages1 Object-Oriented Languages - Design and Implementation Java: Behind the Scenes Finn E. Nordbjerg,
Mark Marron 1, Deepak Kapur 2, Manuel Hermenegildo 1 1 Imdea-Software (Spain) 2 University of New Mexico 1.
Aritra Sengupta, Swarnendu Biswas, Minjia Zhang, Michael D. Bond and Milind Kulkarni ASPLOS 2015, ISTANBUL, TURKEY Hybrid Static-Dynamic Analysis for Statically.
Efficient Deterministic Replay of Multithreaded Executions in a Managed Language Virtual Machine Michael Bond Milind Kulkarni Man Cao Meisam Fathi Salmi.
A summary by Nick Rayner for PSU CS533, Spring 2006
Drinking from Both Glasses: Adaptively Combining Pessimistic and Optimistic Synchronization for Efficient Parallel Runtime Support Man Cao Minjia Zhang.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Michael Bond Katherine Coons Kathryn McKinley University of Texas at Austin.
1 Garbage Collection Advantage: Improving Program Locality Xianglong Huang (UT) Stephen M Blackburn (ANU), Kathryn S McKinley (UT) J Eliot B Moss (UMass),
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans, Lieven Eeckhout, Koen De Bosschere Department of Electronics.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Method Profiling John Cavazos University.
Aritra Sengupta, Man Cao, Michael D. Bond and Milind Kulkarni PPPJ 2015, Melbourne, Florida, USA Toward Efficient Strong Memory Model Support for the Java.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
Using Escape Analysis in Dynamic Data Race Detection Emma Harrington `15 Williams College
FastTrack: Efficient and Precise Dynamic Race Detection [FlFr09] Cormac Flanagan and Stephen N. Freund GNU OS Lab. 23-Jun-16 Ok-kyoon Ha.
Eliminating External Fragmentation in a Non-Moving Garbage Collector for Java Author: Fridtjof Siebert, CASES 2000 Michael Sallas Object-Oriented Languages.
Dynamic Bug Detection & Tolerance Kathryn S McKinley The University of Texas at Austin.
Prescient Memory: Exposing Weak Memory Model Behavior by Looking into the Future MAN CAO JAKE ROEMER ARITRA SENGUPTA MICHAEL D. BOND 1.
Optimistic Hybrid Analysis
Lightweight Data Race Detection for Production Runs
Non Contiguous Memory Allocation
Cork: Dynamic Memory Leak Detection with Garbage Collection
No Bit Left Behind: The Limits of Heap Data Compression
Aritra Sengupta Man Cao Michael D. Bond and Milind Kulkarni
Rifat Shahriyar Stephen M. Blackburn Australian National University
Points-to Analysis for Java Using Annotated Constraints
Hashing Exercises.
Ravi Mangal Mayur Naik Hongseok Yang
Man Cao Minjia Zhang Aritra Sengupta Michael D. Bond
Ulterior Reference Counting Fast GC Without The Wait
Inlining and Devirtualization Hal Perkins Autumn 2011
Closure Representations in Higher-Order Programming Languages
Inlining and Devirtualization Hal Perkins Autumn 2009
Virtual Memory Hardware
자바 언어를 위한 정적 분석 (Static Analyses for Java) ‘99 한국정보과학회 가을학술발표회 튜토리얼
No Bit Left Behind: The Limits of Heap Data Compression
Garbage Collection Advantage: Improving Program Locality
Procedure Linkages Standard procedure linkage Procedure has
Presentation transcript:

Jipeng Huang, Michael D. Bond Ohio State University Efficient Context Sensitivity for Dynamic Analyses via Calling Context Uptrees and Customized Memory Management Jipeng Huang, Michael D. Bond Ohio State University

Example: dynamic race detector Thread A Thread B write x race! write x

Example: dynamic race detector Thread A Thread B AbstractDataTreeNode. storeStrings():536 Explain method + line number here race! DataTreeNode.init():32

Full Stack Trace Thread A Thread B race! write x write x AbstractDataTreeNode. storeStrings():536 DeltaDataTree. storeStrings(): 343 AbstractDataTreeNode. storeStrings():541 … ElementTree.shareStrings():706 Worker.run():76 DataTreeNode.init():32 DeltaDataTree. createChild(): 330 ElementTree. createElement ():18 … EclipseStarter.run():50 write x race! write x

How hard? Thread A Thread B race! write x write x AbstractDataTreeNode. storeStrings():536 DeltaDataTree. storeStrings(): 343 AbstractDataTreeNode. storeStrings():541 … ElementTree.shareStrings():706 Worker.run():76 DataTreeNode.init():32 DeltaDataTree. createChild(): 330 ElementTree. createElement ():18 … EclipseStarter.run():50 Hard Mention which one is current write, which one is old write; Mention complex software or frequent accesses or class loading and dynamic dispatch write x race! Easy to dump stack write x Record previous stack information

Calling Context Tree (CCT) Ammons et. al (PLDI’1997) In this slide, talk about what a client site or call site is. And we are interested in client sites and call sites. And also mention that we store the context information as object’s metadata

Why not Calling Context Tree (CCT) main():16 13 main() { X arr [] = {new X(), new X()}, B b = new B(); 15 for (int i = 0; i < arr.length; i++) 16 b.m(new X(), arr[i]); //call site 17 }

Why not Calling Context Tree (CCT) main():16 8 class B extends A { 9 void m(X x, X y) { 10 if(!x.flag) // client site 11 m(y); 12 }} B.m():10 13 main() { X arr [] = {new X(), new X()}, B b = new B(); 15 for (int i = 0; i < arr.length; i++) 16 b.m(new X(), arr[i]); //call site 17 } x3 In this slide, talk about what a client site or call site is. And we are interested in client sites and call sites. And also mention that we store the context information as object’s metadata

Why not Calling Context Tree (CCT) main():16 node site : B.m():10 Pointers point “down” to child nodes CCT tries to reuse nodes - Expensive lookup because methods have many statically possible callee targets and client sites … If (node.childmap.get(site) == null) { node.childmap.put(site, new Node(site)); } B.m():10 x3 Mention child map here

Can we avoid the overhead due to lookup? Why not Calling Context Tree (CCT) 1. class X { boolean flag;} 2 class A { 3 void m(X x) { 4 if (!x.flag) { 5 globalSet.add(x); 6 } 7 }} 8 class B extends A { 9 void m(X x, X y) { 10 if(!x.flag) 11 m(y); 12 }} 13 main() { 14 X arr [] = {new X(), new X()}, B b = new B(); 15 for (int i = 0; i < arr.length; i++) 16 b.m(new X(), arr[i]); 17 } main():16 Can we avoid the overhead due to lookup? B.m():10 B.m():11 x4 x3 A.m():4 A.m():5 In this slide, talk about what a client site or call site is. And we are interested in client sites and call sites. And also mention that we store the context information as object’s metadata … x1 x2

Calling Context Uptree (CCU) Space & time tradeoff No lookup but instead frequent allocation Customized GC reduces space overhead GC naturally collects irrelevant nodes Merging piggybacks on GC and removes duplicate nodes

Calling Context Uptree (CCU) main():16 Pointers point “up” to parent nodes to let GC naturally collect irrelevant nodes Fast: No lookup anymore More space: allocate more nodes B.m():10 B.m():11 B.m():10 B.m():11 A.m():4 A.m():5 A.m():4 A.m():5 … x3 … x4 x1 x2

Calling Context Uptree (CCU) main():16 Duplicate context nodes  B.m():11 B.m():11 A.m():4 A.m():5 A.m():4 A.m():5 … … x1 x2

Calling Context Uptree (CCU) main():16 Node equivalence Two nodes share the same parent or their parents are equivalent They have the same site B.m():11 B.m():11 A.m():4 A.m():5 A.m():4 A.m():5 … … x1 x2

Merging main():16 B.m():11 A.m():4 A.m():5 x1 x2

Copy merging Copy Space Mark-Sweep Space main():16 main():16 B.m():11 A.m():5 A.m():5 Mention similarity with CCT and lookup here A.m():5 x1 x2

Evaluation Clients Implementation Benchmarks Leak detection Staleness-based leak detector (Bond and McKinley, ASPLOS’2009) Race detection Vector-clock based race detector (Flanagan and Freund, FastTrack, PLDI’2009 and Bond et al., Pacer, PLDI’2010) Implementation Publicly available on Jikes RVM Research Archive Benchmarks DaCapo 2006-10-MR2 and pseudojbb 2000

Stats Allocations (millions) Hash lookups CCU CCT antlr 329.8 3.4 0.2 329.0 chart 387.3 0.4 5.5 380.0 eclipse 4561.0 68.5 8.3 4546.0 fop 42.4 0.3 41.1 hsqldb 490.8 4.5 17.3 546.0 jython 3551.0 4.1 3535.6 luindex 1068.3 1066.4 lusearch 1331.8 0.8 1305.0 pmd 1645.1 12.8 6.3 1635.4 xalan 6242.2 24.2 8.6 6198.6 pseudojbb 995.8 15.7 996.3 CCU has about the same amount of allocations as the CCT lookups CCT incurs significant amount more expensive lookups than CCU

Leak detection space overhead Space overhead in MB Merging helps reduce CCU space overhead significantly With merging, CCU has less or same amount of space overhead as CCT

Leak detection performance Slowdown Leak detection only: 1.18X Leak detection + CCU: 1.48X Leak detection + CCT: 1.66X CCU incurs 37.5% less time overhead than CCT

Race detection performance Slowdown Race detection only: 7.82X Race detection + CCU: 8.31X Race detection + CCT: 8.55X CCU incurs 32.3% less time overhead than CCT

Race detection space overhead Space overhead in KB Space overhead in MB Fraction of exec time hsqldb Without merging, CCU has a lot more space overhead than CCT; with merging, CCU has less or same amount of space overhead as CCT

Related work Precise calling context PCCE (Sumner et al. ICSE’2010) Hard to be applied to dynamic analyses due to large number of encoded contexts needed Unable to handle dynamic class loading and virtual dispatch Inaccurate calling context Mytkowicz et al. OOPSLA’09, Inoue et. al OOPSLA’09 Low overhead but still not very safe enough to uniquely construct calling context Breadcrumbs (Bond et al. PLDI’2010) Tradeoff between accuracy and performance

Conclusion Time/Space Tradeoff Instead of reusing existing nodes, allocate new nodes —Lower time but higher space Customized garbage collection and merging help reduce space overhead