ABSTRACT
Memory monitoring is crucial for understanding the memory access behavior of applications. Especially in multithreaded programs, dealing with concurrency bugs relies on tracking and analyzing accesses to shared memory. Instrumentation is widely used to obtain diagnostic information for runtime checks. However, instrumenting all memory accesses incurs a high performance overhead, slowing down a program's execution by an order of magnitude. In this paper, a simple but novel method is proposed to address performance degradation problem caused by instrumentation. It is based on the following key insight: there is no need to track those thread-local stack accesses. Recognizing such redundancy in memory access instrumentation and runtime checks, the paper presents the IIMA (Is Interesting Memory Access) algorithm to conduct instrumentation pruning. The algorithm is implemented based on LLVM infrastructure and evaluated across a range of well-designed test cases and open source benchmarks. The results show that the method is able to aggressively reduce the amount of instrumented memory accesses especially at low compilation optimization level and further reduce the runtime overhead.
- Wang, Haojie, et al. (2018). Spindle: informed memory access monitoring. 2018 {USENIX} Annual Technical Conference ({USENIX}{ATC} 18).Google Scholar
- Liu, Lei, et al. (2012). A software memory partition approach for eliminating bank-level interference in multicore systems. Proceedings of the 21st international conference on Parallel architectures and compilation techniques. ACM.Google ScholarDigital Library
- Wen, Shasha, Milind Chabbi, and Xu Liu (2017). REDSPY: exploring value locality in software. ACM SIGARCH Computer Architecture News. Vol. 45. No. 1. ACM.Google Scholar
- Voung, Jan Wen, Ranjit Jhala, and Sorin Lerner (2007). RELAY: static race detection on millions of lines of code. Proceedings of the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering. ACM.Google ScholarDigital Library
- Xie, Xinwei, Jingling Xue, and Jie Zhang (2013). Acculock: Accurate and efficient detection of data races. Software: Practice and Experience 43.5:543--576.Google ScholarCross Ref
- Bruening, Derek, and Qin Zhao (2011). Practical memory checking with Dr. Memory. Proceedings of the 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization. IEEE Computer Society.Google ScholarDigital Library
- Serebryany, Konstantin, et al. (2012). AddressSanitizer: A fast address sanity checker. Presented as part of the 2012 {USENIX} Annual Technical Conference ({USENIX}{ATC} 12).Google Scholar
- Arnold, Matthew, and Barbara G. Ryder (2001). A framework for reducing the cost of instrumented code. Acm Sigplan Notices36.5:168--179.Google Scholar
- Marino, Daniel, Madanlal Musuvathi and Satish Narayanasamy (2009). LiteRace: effective sampling for lightweight data-race detection. ACM Sigplan notices. Vol. 44. No. 6. ACM.Google Scholar
- Serebryany, Konstantin, et al. (2011). Dynamic race detection with LLVM compiler. International Conference on Runtime Verification. Springer, Berlin, Heidelberg.Google Scholar
- Hauswirth, Matthias, and Trishul M. Chilimbi (2004). Low-overhead memory leak detection using adaptive statistical profiling. Acm SIGPLAN notices. Vol. 39. No. 11. ACM.Google Scholar
- Erickson, John, et al. (2010). Effective Data-Race Detection for the Kernel. OSDI. Vol. 10. No. 10.Google Scholar
- Lattner, Chris, and Vikram Adve (2004). LLVM: A compilation framework for lifelong program analysis & transformation. Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization. IEEE Computer Society.Google ScholarDigital Library
- Xavier-Baudry (2015). Parallelism-Benchmark. https://github.com/Xavier-Baudry/Parallelism-Benchmark.Google Scholar
- NPB3.0-omp-C (2014). https://github.com/benchmark-subsetting/NPB3.0-omp-C.Google Scholar
- The Fcd tool. (2017). https://github.com/zneak/fcd.Google Scholar
- The Dagger tool. (2017). https://github.com/repzret/dagger.Google Scholar
- Hardekopf, Ben, and Calvin Lin (2011). Flow-sensitive pointer analysis for millions of lines of code. Proceedings of the 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization. IEEE Computer Society.Google ScholarDigital Library
Index Terms
- Method for Reducing Overhead of Shared Memory Access Instrumentation
Recommendations
Hybrid binary rewriting for memory access instrumentation
VEE '11: Proceedings of the 7th ACM SIGPLAN/SIGOPS international conference on Virtual execution environmentsMemory access instrumentation is fundamental to many applications such as software transactional memory systems, profiling tools and race detectors. We examine the problem of efficiently instrumenting memory accesses in x86 machine code to support ...
Hybrid binary rewriting for memory access instrumentation
VEE '11Memory access instrumentation is fundamental to many applications such as software transactional memory systems, profiling tools and race detectors. We examine the problem of efficiently instrumenting memory accesses in x86 machine code to support ...
Residual Runtime Verification via Reachability Analysis
Verified Software. Theories, Tools and Experiments.AbstractWe leverage static verification to reduce monitoring overhead when runtime verifying a property. We present a sound and efficient analysis to statically find safe execution paths in the control flow at the intra-procedural level of programs. Such ...
Comments