作者: Matthias Hauswirth , Trishul M. Chilimbi
关键词:
摘要: 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%).