Low-overhead memory leak detection using adaptive statistical profiling

作者: Matthias Hauswirth , Trishul M. Chilimbi

DOI: 10.1145/1024393.1024412

关键词:

摘要: Sampling has been successfully used to identify performance optimization opportunities. We would like apply similar techniques check program correctness. Unfortunately, sampling provides poor coverage of infrequently executed code, where bugs often lurk. describe an adaptive profiling scheme that addresses this by executions code segments at a rate inversely proportional their execution frequency. To validate our ideas, we have implemented SWAT, novel memory leak detection tool. SWAT traces allocations/ frees construct heap model and uses infrastructure monitor loads/stores these objects with low overhead. reports 'stale' not accessed for 'long' time as leaks. This allows it find all leaks manifest during the current execution. Since runtime overhead (‹5%), space (‹10% in most cases less than 5%), can be track production take days manifest. In addition identifying allocations memory, exposes last leaked data, which facilitates debugging fixing leak. several product groups Microsoft past 18 months proved effective detecting false positive (‹10%).

参考文章(11)
Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, Thomas Anderson, Eraser: a dynamic data race detector for multithreaded programs ACM Transactions on Computer Systems. ,vol. 15, pp. 391- 411 ,(1997) , 10.1145/265924.265927
Paul N. Hilfinger, Benjamin G. Zorn, A Memory Allocation Profiler for C and Lisp Programs University of California at Berkeley. ,(1988)
Matthew Arnold, Barbara G. Ryder, A framework for reducing the cost of instrumented code Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation - PLDI '01. ,vol. 36, pp. 168- 179 ,(2001) , 10.1145/378795.378832
William R. Bush, Jonathan D. Pincus, David J. Sielaff, A static analyzer for finding dynamic programming errors Software - Practice and Experience. ,vol. 30, pp. 775- 802 ,(2000) , 10.1002/(SICI)1097-024X(200006)30:7<775::AID-SPE309>3.0.CO;2-H
Trishul M. Chilimbi, Martin Hirzel, Dynamic hot data stream prefetching for general-purpose programs Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation - PLDI '02. ,vol. 37, pp. 199- 209 ,(2002) , 10.1145/512529.512554
Martin Hirzel, Amer Diwan, On the type accuracy of garbage collection Proceedings of the second international symposium on Memory management - ISMM '00. ,vol. 36, pp. 1- 11 ,(2000) , 10.1145/362422.362428
Martin Hirzel, Amer Diwan, Antony Hosking, On the Usefulness of Liveness for Garbage Collection and Leak Detection ECOOP 2001 — Object-Oriented Programming. pp. 181- 206 ,(2001) , 10.1007/3-540-45337-7_11
David L. Heine, Monica S. Lam, A practical flow-sensitive and context-sensitive C and C++ memory leak detector programming language design and implementation. ,vol. 38, pp. 168- 181 ,(2003) , 10.1145/780822.781150
Amitabh Srivastava, Andrew Edwards, Hoi Vo, Vulcan Binary transformation in a distributed environment Microsoft Research. pp. 12- ,(2001)