Michael Bond Kathryn McKinley The University of Texas at Austin.

Slides:



Advertisements
Similar presentations
1 Write Barrier Elision for Concurrent Garbage Collectors Martin T. Vechev Cambridge University David F. Bacon IBM T.J.Watson Research Center.
Advertisements

Automatic Memory Management Noam Rinetzky Schreiber 123A /seminar/seminar1415a.html.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 7: References and Assignment.
CMSC 330: Organization of Programming Languages Memory and Garbage Collection.
Lecture 10: Heap Management CS 540 GMU Spring 2009.
Michael Bond Kathryn McKinley The University of Texas at Austin Presented by Na Meng Most of the slides are from Mike’s original talk. Many thanks go to.
CSC 213 – Large Scale Programming. Today’s Goals  Consider what new does & how Java works  What are traditional means of managing memory?  Why did.
Bounding Space Usage of Conservative Garbage Collectors Ohad Shacham December 2002 Based on work by Hans-J. Boehm.
MC 2 : High Performance GC for Memory-Constrained Environments - Narendran Sachindran, J. Eliot B. Moss, Emery D. Berger Sowmiya Chocka Narayanan.
Various languages….  Could affect performance  Could affect reliability  Could affect language choice.
Probabilistic Calling Context Michael D. Bond Kathryn S. McKinley University of Texas at Austin.
Department of Computer Sciences Cork: Dynamic Memory Leak Detection with Garbage Collection Maria Jump Kathryn S. McKinley
Hastings Purify: Fast Detection of Memory Leaks and Access Errors.
LOW-OVERHEAD MEMORY LEAK DETECTION USING ADAPTIVE STATISTICAL PROFILING WHAT’S THE PROBLEM? CONTRIBUTIONS EVALUATION WEAKNESS AND FUTURE WORKS.
CORK: DYNAMIC MEMORY LEAK DETECTION FOR GARBAGE- COLLECTED LANGUAGES A TRADEOFF BETWEEN EFFICIENCY AND ACCURATE, USEFUL RESULTS.
MC 2 : High Performance GC for Memory-Constrained Environments N. Sachindran, E. Moss, E. Berger Ivan JibajaCS 395T *Some of the graphs are from presentation.
Increasing Memory Usage in Real-Time GC Tobias Ritzau and Peter Fritzson Department of Computer and Information Science Linköpings universitet
Free-Me: A Static Analysis for Individual Object Reclamation Samuel Z. Guyer Tufts University Kathryn S. McKinley University of Texas at Austin Daniel.
OOPSLA 2003 Mostly Concurrent Garbage Collection Revisited Katherine Barabash - IBM Haifa Research Lab. Israel Yoav Ossia - IBM Haifa Research Lab. Israel.
1 The Compressor: Concurrent, Incremental and Parallel Compaction. Haim Kermany and Erez Petrank Technion – Israel Institute of Technology.
Runtime The optimized program is ready to run … What sorts of facilities are available at runtime.
LeakChaser: Helping Programmers Narrow Down Causes of Memory Leaks Guoqing Xu, Michael D. Bond, Feng Qin, Atanas Rountev Ohio State University.
U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Automatic Heap Sizing Ting Yang, Matthew Hertz Emery Berger, Eliot Moss University of Massachusetts.
Memory Allocation and Garbage Collection. Why Dynamic Memory? We cannot know memory requirements in advance when the program is written. We cannot know.
Age-Oriented Concurrent Garbage Collection Harel Paz, Erez Petrank – Technion, Israel Steve Blackburn – ANU, Australia April 05 Compiler Construction Scotland.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Garbage Collection Without Paging Matthew Hertz, Yi Feng, Emery Berger University.
1 An Efficient On-the-Fly Cycle Collection Harel Paz, Erez Petrank - Technion, Israel David F. Bacon, V. T. Rajan - IBM T.J. Watson Research Center Elliot.
Reference Types. 2 Objectives Introduce reference types –class –array Discuss details of use –declaration –allocation –assignment –null –parameter –aggregation.
1 External Sorting for Query Processing Yanlei Diao UMass Amherst Feb 27, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
CprE 458/558: Real-Time Systems
Bell: Bit-Encoding Online Memory Leak Detection Michael D. Bond Kathryn S. McKinley University of Texas at Austin.
Garbage Collection Memory Management Garbage Collection –Language requirement –VM service –Performance issue in time and space.
SEG Advanced Software Design and Reengineering TOPIC L Garbage Collection Algorithms.
Fundamentals of Python: From First Programs Through Data Structures
Tolerating Memory Leaks Michael D. Bond Kathryn S. McKinley.
Flexible Reference-Counting-Based Hardware Acceleration for Garbage Collection José A. Joao * Onur Mutlu ‡ Yale N. Patt * * HPS Research Group University.
Taking Off The Gloves With Reference Counting Immix
1 Testing Concurrent Programs Why Test?  Eliminate bugs?  Software Engineering vs Computer Science perspectives What properties are we testing for? 
Fundamentals of Python: First Programs
Ulterior Reference Counting: Fast Garbage Collection without a Long Wait Author: Stephen M Blackburn Kathryn S McKinley Presenter: Jun Tao.
P ath & E dge P rofiling Michael Bond, UT Austin Kathryn McKinley, UT Austin Continuous Presented by: Yingyi Bu.
Dynamic Object Sampling for Pretenuring Maria Jump Department of Computer Sciences The University of Texas at Austin Stephen M. Blackburn.
CSC 213 – Large Scale Programming. Today’s Goals  Consider what new does & how Java works  What are traditional means of managing memory?  Why did.
Free-Me: A Static Analysis for Automatic Individual Object Reclamation Samuel Z. Guyer, Kathryn McKinley, Daniel Frampton Presented by: Dimitris Prountzos.
Chameleon Automatic Selection of Collections Ohad Shacham Martin VechevEran Yahav Tel Aviv University IBM T.J. Watson Research Center Presented by: Yingyi.
CSC 213 Lecture 10: BTrees. Announcements You should not need to do more than the lab exercise states  If only says add a CharRange, you should not need.
Breadcrumbs: Efficient Context Sensitivity for Dynamic Bug Detection Analyses Michael D. Bond University of Texas at Austin Graham Z. Baker Tufts / MIT.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science 1 Automatic Heap Sizing: Taking Real Memory into Account Ting Yang, Emery Berger,
C++ Memory Overview 4 major memory segments Key differences from Java
Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science.
CS536 Semantic Analysis Introduction with Emphasis on Name Analysis 1.
A REAL-TIME GARBAGE COLLECTOR WITH LOW OVERHEAD AND CONSISTENT UTILIZATION David F. Bacon, Perry Cheng, and V.T. Rajan IBM T.J. Watson Research Center.
CSC 213 – Large Scale Programming. Explicit Memory Management  Traditional form of memory management  Used a lot, but fallen out of favor  malloc /
Runtime The optimized program is ready to run … What sorts of facilities are available at runtime.
CS412/413 Introduction to Compilers and Translators April 21, 1999 Lecture 30: Garbage collection.
Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin Nicholas Nethercote National ICT Australia Stephen.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
Dynamic Bug Detection & Tolerance Kathryn S McKinley The University of Texas at Austin.
Object Lifetime and Pointers
Dynamic Compilation Vijay Janapa Reddi
Cork: Dynamic Memory Leak Detection with Garbage Collection
Memory Management 6/20/ :27 PM
Dynamically Sizing the TAGE Branch Predictor
David F. Bacon, Perry Cheng, and V.T. Rajan
Jipeng Huang, Michael D. Bond Ohio State University
Memory Management and Garbage Collection Hal Perkins Autumn 2011
Memory Management Kathryn McKinley.
Dongyun Jin, Patrick Meredith, Dennis Griffith, Grigore Rosu
José A. Joao* Onur Mutlu‡ Yale N. Patt*
Presentation transcript:

Michael Bond Kathryn McKinley The University of Texas at Austin

 Driverless truck  10,000 lines of C#  Leak: past obstacles remained reachable  No immediate symptoms “This problem was pernicious because it only showed up after 40 minutes to an hour of driving around and collecting obstacles.”  Quick “fix”: restart after 40 minutes  Environment sensitive  More obstacles in deployed setting  Unresponsive after 28 minutes

 Driverless truck  10,000 lines of C#  Leak: past obstacles remained reachable  No immediate symptoms “This problem was pernicious because it only showed up after 40 minutes to an hour of driving around and collecting obstacles.”  Quick “fix”: restart after 40 minutes  Environment sensitive  More obstacles in deployed setting  Unresponsive after 28 minutes Different environments & inputs  different behavior Uncertainty in deployed systems Hard to fix before deployment

 Deployed systems have leaks  Critical systems need immediate help  Leak pruning tolerates bad effects  Reclaims memory automatically  High precision & low overhead  Bounds resources  Preserves semantics

 Why tolerate leaks  Why leaks are so bad  How leak pruning works  How leak pruning predicts leaked objects  Evaluation

 Memory leaks are a real problem  Managed languages do not eliminate them

 Memory leaks are a real problem  Managed languages do not eliminate them Reachable Unreachable

 Memory leaks are a real problem  Managed languages do not eliminate them Live ReachableDead

 Memory leaks are a real problem  Managed languages do not eliminate them Live Reachable Dead

 Memory leaks are a real problem  Managed languages do not eliminate them Live Reachable Dead

 Memory leaks are a real problem  Managed languages do not eliminate them  Slow & crash real programs Live Dead

 Memory leaks are a real problem  Managed languages do not eliminate them  Slow & crash real programs  Unacceptable for some applications  Fixing leaks is hard  Leaks take time to materialize  Failure far from cause

 Is it a memory leak or a case of stale memory ?  Is it correct to always consider stale memory as equivalent to unreachable memory ?

 Why tolerate leaks  Why leaks are so bad  How leak pruning works  How leak pruning predicts leaked objects  Evaluation

 Garbage collection based on liveness Live Reachable Dead

 Garbage collection based on liveness  Take action when memory exhausted Live Reachable Dead

 Garbage collection based on liveness  Take action when memory exhausted Live Reachable Dead

 Garbage collection based on liveness  Take action when memory exhausted Live Dead Throw OOM error Out of memory!

 Garbage collection based on liveness  Take action when memory exhausted Live Dead Out of memory! Throw OOM error Reclaim some objects

 Garbage collection based on liveness  Reclaim predicted dead objects Reclaimed Live

 Garbage collection based on liveness  Reclaim predicted dead objects Reclaimed Live A A B B

 Garbage collection based on liveness  Reclaim predicted dead objects Live A A ?

 Garbage collection based on liveness  Reclaim predicted dead objects  Poison references to reclaimed objects Live A A X

 Garbage collection based on liveness  Reclaim predicted dead objects  Poison references to reclaimed objects Live A A X Throw InternalError with OOMError attached

 Garbage collection based on liveness  Reclaim predicted dead objects  Poison references to reclaimed objects Live A A X Throw InternalError with OOMError attached Worst case: defers fatal errors Best case: keeps leaky programs running much longer or indefinitely

 Instead of returning the error can we return some other object, to keep program going ? Eg DieHard  What about semantics in that case ?

INACTI VE OBSER VE SELECTPRUNE Heap not full <50% Heap filled >50% Heap not full Heap full

 Why tolerate leaks  Why leaks are so bad  How leak pruning works  How leak pruning predicts leaked objects  Evaluation

 Predicting the future  Leaked objects  not used again  Highly stale objects  likely leaked  Alternative: offload to disk [Melt, Bond & McKinley ’08] [LeakSurvivor, Tang et al. ’08] [Panacea, Goldstein et al. ’07, Breitgand et al. ’07]  Tolerates mispredictions  Eventually exhausts disk (if disk at all)

 Predicting the future  Leaked objects  not used again  Highly stale objects  likely leaked  Alternative: offload to disk [Melt, Bond & McKinley ’08] [LeakSurvivor, Tang et al. ’08] [Panacea, Goldstein et al. ’07, Breitgand et al. ’07]  Tolerates mispredictions  Eventually exhausts disk (if disk at all) Need high precision One misprediction: program terminates Need high precision One misprediction: program terminates

 Identify references to prune  Roots of leaked data structures  Categorize by reference type ParserInfo PreparedStatement

 Identify references to prune  Roots of leaked data structures  Categorize by reference type  Criteria  Highly stale references ▪ More stale than most stale instance accessed previously ParserInfo PreparedStatement MaxS&U 2-4 GCs

 Identify references to prune  Roots of leaked data structures  Categorize by reference type  Criteria  Highly stale references ▪ More stale than most stale instance accessed previously  Reference type keeping most bytes reachable ParserInfo PreparedStatement MaxS&U 2-4 GCs Size 132MB

 Identify references to prune  Roots of leaked data structures  Categorize by reference type  Criteria  Highly stale references ▪ More stale than most stale instance accessed previously  Reference type keeping most bytes reachable Piggyback on GC: two-phase transitive closure ParserInfo PreparedStatement MaxS&U 2-4 GCs Size 132MB

 Based on colleague’s JDBC application  Leak: SQL statements remain in set

HashSet Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[]

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[]

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[]

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] enqueued HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] enqueued HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U enqueued

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] enqueued HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes enqueued

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] enqueued HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes enqueued

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] enqueued HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 60 enqueued 0 0

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] enqueued HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 572 enqueued 0 0

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 572 enqueued 0 0

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 572 enqueued 244 0

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 420M 180M 0

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 420M 180M 0

HashSet … …… Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] Parser Info Parser Info Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] byte[][] byte[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 420M 180M 0

HashSet … …… Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 420M 180M 0

HashSet … …… Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 0 0 0

HashSet … …… Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes enqueued

HashSet … …… Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 50M 220M 0

HashSet … …… Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 50M 220M 0

HashSet … …… Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] Result Set Result Set Hash Entry Hash Entry Prepared Statement Prepared Statement Field[] HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 50M 220M 0

HashSet … … Hash Entry Hash Entry Prepared Statement Prepared Statement Hash Entry Hash Entry Prepared Statement Prepared Statement Hash Entry Hash Entry Prepared Statement Prepared Statement HashEntry PreparedStatement ParserInfo PreparedStatement ResultSet MaxS&U Bytes 50M 220M 0

HashSet … … Hash Entry Hash Entry Prepared Statement Prepared Statement Hash Entry Hash Entry Prepared Statement Prepared Statement Hash Entry Hash Entry Prepared Statement Prepared Statement Algorithm efficiently selects references to consistently unused data structures based on type

 Why tolerate leaks  Why leaks are so bad  How leak pruning works  How leak pruning predicts leaked objects  Evaluation

 Leak pruning added to Jikes RVM  Performance stress test  Non-leaking programs: DaCapo & SPEC benchmarks  Low overhead ▪ 3% (Core 2) or 5% (Pentium 4) ▪ Primarily read barriers

Low footprint & often helps a lot  all-the-time deployed use Low footprint & often helps a lot  all-the-time deployed use

INACTI VE OBSER VE SELECTPRUNE Heap not full <50% Heap filled >50% Heap not full Heap full

 What about bursty leaks ?  Can we have dynamically adjustable limit for switching on Leak Pruning ?  Can we dynamically switch off Leak Pruning ?

 What if stale objects interleaved with active objects ?  Is it useful to find source of these leaks ? If yes then how ?