DOC PREVIEW
UT CS 395T - Cork - Dynamic Memory Leak Detection with Garbage Collection

This preview shows page 1-2-23-24 out of 24 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Memory BugsMemory Leaks in Managed LanguagesRelated WorkCork1. Calculating Type Points-To2. Differencing GraphsFinding Growth (RRT)Reported CandidatesFinding Data StructureImplementation and MethodologyEfficiency and ScalabilitySpace OverheadTime OverheadTime OverheadDynamic Heap Analysis with CorkEclipse 115789Eclipse 115789: CPFGEclipse 115789: SliceEclipse 115789Eclipse 115789: SliceEclipse 115789Cork’s ContributionsWhat else can the GC tell us?Department of Computer SciencesCork: Dynamic Memory Leak Detection with Garbage CollectionMaria JumpKathryn S. McKinley{mjump,mckinley}@cs.utexas.eduDepartment of Computer SciencesMemory BugsWhat memory bugs do explicitly managed languages have?Does managed memory solve all our memory problems?Department of Computer SciencesMemory Leaks in Managed LanguagesResult from inadvertently maintaining references to “dead” objectsBest case: increases GC workloadWorst case: causes program crashDynamically analyze heap to detect systematic heap growthDepartment of Computer Sciences4Related WorkOffline Techniques:Static analysis [Heine et al. 03]Heap differencing [JProbe, DePauw et al. 98, 99, 00]Allocation and/or usage tracking [OptimizeIt, Rationale, Purify, HAT, HPROF, Shaham et al. 00]Online Techniques:Leakbot (partially online) [Mitchell et al. 03]Adaptive usage tracking [Chilimbi et al. 04, Bond et al. 06]Cork accurately pinpoints systematicheap growth completely onlineDepartment of Computer SciencesCorkOpportunity: tracing GC visits all the object in the heap!Build heap summarization graphClass points-from graph (CPFG)Summarizes volume of nodes and edgesIdentify growth by differencing CPFGs across collectionsIdentify candidates using node rankIdentify the data structure using edge rankDepartment of Computer Sciences31. Calculating Type Points-ToHeap342214111Type Points-To (TPT) =instance =typeDepartment of Computer Sciences122. Differencing Graphs12122321TPTi+1TPTi+21411212334TPTi1Cork’s optimizations:Keeps 3 graphsPrunes obviously non-growing partsVolume decay guards against premature pruningRanks nodes/edges11111111Department of Computer Sciences141141114Find nodes of types t that grow Vt(i) > (1 -f) * Vt(i-1)i is the phase & f is a decay factor e.g., .05Rank nodes and edgesri = ri-1 +/- pi * (Q - 1)P add to rank if type grows in phase p, subtract if it shrinksQ is a ratio > 1 of Vi to Vi-1 Designate node as a candidate if rt(i) > RthresholdFinding Growth (RRT)Department of Computer SciencesReported Candidates# of CandidatesSRTRRTjessSPECjbbfopDepartment of Computer SciencesFinding Data StructureType is not enoughGrowing edges identify the data structureRank edges Calculate a slice from each candidateSet of all paths (n0…nn) such that“Sees” beyond non-candidate nodes111114141401 kknnrDepartment of Computer SciencesImplementation and MethodologyJikes RVM with MMTkBenchmarks:SPECjvm98, DaCapo, SPECjbb2000Eclipse 3.1.2Garbage collectorGenerational with 4MB bounded nurseryFor performance, report application onlyReplay compilation2nd run methodologyDepartment of Computer SciencesEfficiency and ScalabilityNode/type data stored in type information block (TIB) adding 5 words1 word for type volume and edge list pointer for each of the previous 4 collections1 word for # of phases (p)Edge data stored in listsPrune parts of TPFG that are non-growingAre there ways to implement the type summary graph?Department of Computer SciencesSpace Overheadjess EclipseGeomean# of typesbm+VM 1744 3365 1747TPFG avg 318 667 334TPFG max 319 775 346# of edgesTPFG avg 844 4090 904TPFG max 861 7585 1142% pruned 66% 42% 60%Increased Alloc % 0.094% 0.167% 0.233%19%2.7X0.233%Department of Computer SciencesUMCPTime OverheadNormalized Total TimeHeap Size Relative to MinimumDepartment of Computer SciencesTime OverheadIs this good enough?Would you add it to your system?Department of Computer SciencesDynamic Heap Analysis with CorkCork identified:Systematic heap growthGrowing classesGrowing data structureBenchmarks:fop – application designjess – in inputSPECjbb2000 – memory leakEclipse 3.1.2 #115789 – repeatedly performing a structural (recursive) dif leaks memory012345compressjessraytracedbjavacmpegaudiomtrtjackpseudojbbSPECjbbantlrbloatfopjythonpmdpsxalanSPECjbbfopjessDepartment of Computer SciencesEclipse 115789Heap Occupancy (MB)Time (MB of allocation)Department of Computer SciencesEclipse 115789: CPFG3365 classes loaded (1773 in Eclipse)Average graph:667 nodes4090 edgesDepartment of Computer SciencesEclipse 115789: SliceString[]Object[]ArrayListResourceCompareInput$FilteredBufferedResourceNodeFolderFilePathIdentifies 7 candidates: rt > rthresCalculates slice from each candidate: set of all paths (n0…nn) s.t. rn(k+1)n(k)<0 ResourceCompareInputDepartment of Computer SciencesEclipse 115789Heap Occupancy (MB)Time (MB of allocation)Department of Computer SciencesEclipse 115789: SliceString[]Object[]ArrayListResourceCompareInput$FilteredBufferedResourceNodeFolderFilePathIdentifies 7 candidates: rt > rthresCalculates slice from each candidate: set of all paths (n0…nn) s.t. rn(k+1)n(k)<0 ResourceCompareInputHashMapDepartment of Computer SciencesEclipse 115789Heap Occupancy (MB)Time (MB of allocation)Department of Computer SciencesCork’s ContributionsPerforms dynamic heap analysis to detect systematic heap growthUses a class points-from graph to summarize volume relations<0.5% space overhead~2% time overheadAccurately identifiesUser-defined classes causing the growthData structure containing the growthDepartment of Computer SciencesWhat else can the GC tell us?Testing time?In


View Full Document

UT CS 395T - Cork - Dynamic Memory Leak Detection with Garbage Collection

Documents in this Course
TERRA

TERRA

23 pages

OpenCL

OpenCL

15 pages

Byzantine

Byzantine

32 pages

Load more
Download Cork - Dynamic Memory Leak Detection with Garbage Collection
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Cork - Dynamic Memory Leak Detection with Garbage Collection and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Cork - Dynamic Memory Leak Detection with Garbage Collection 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?