Abstract
Memory monitoring is of critical use in understanding applications and evaluating systems. Due to the dynamic nature in programs’ memory accesses, common practice today leaves large amounts of address examination and data recording at runtime, at the cost of substantial performance overhead and large storage consumption for memory traces. Recognizing the memory access patterns available at compile time and redundancy in runtime checks, we propose a novel memory access monitoring and analysis framework, Spindle. Unlike methods delaying all checks to runtime or performing task-specific optimization at compile time, Spindle performs common static analysis to identify predictable memory access patterns into a compact program structure summary. Custom memory monitoring tools can then be developed on top of Spindle, leveraging the structural information extracted to dramatically reduce the amount of instrumentation that incurs heavy runtime memory address examination or recording. Our evaluation demonstrated the effectiveness of two Spindle-based tools, performing memory bug detection and trace collection, respectively, with a variety of programs. Results show that these tools can aggressively prune online memory monitoring processing, fulfilling desired tasks with performance overhead significantly reduced (\(2.54\times \) on average for memory bug detection and over \(200\times \) on average for access tracing, over state-of-the-art solutions).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Park, S., Lu, S., & Zhou, Y. (2009). CTrigger: Exposing atomicity violation bugs from their hiding places. In ASPLOS (pp. 25–36). ACM.
Ratanaworabhan, P., et al. (2009). Detecting and tolerating asymmetric races. In Proceedings of the 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. PPoPP ’09 (pp. 173–184). ACM.
Lu, S., et al. (2006). AVIO: Detecting atomicity violations via access interleaving invariants. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems. ASPLOS (pp. 37–48). ACM.
Kemerlis, V. P., et al. (2012). libdft: Practical dynamic data flow tracking for commodity systems. In ACM SIGPLAN Notices (Vol. 47, No. 7, pp. 121–132). ACM.
Qin, F., et al. (2009). Lift: A low-overhead practical information flow tracking system for detecting security attacks. In ACM Sigplan Notices (pp. 245–258). ACM.
Sherwood, T., et al. (2002). Automatically characterizing large scale program behavior. In ASPLOS: Architectural Support for Programming Languages and Operating Systems (pp. 45–57).
Snavely, A., et al. (2002). A framework for application performance modeling and prediction. In: Proceedings SC (pp. 1–17).
Wen, S., Chabbi, M., & Liu, X. . REDSPY: Exploring value locality in software. In ASPLOS (pp. 47–61). ACM.
Kim, Y., et al. (2010). Thread cluster memory scheduling: Exploiting differences in memory access behavior. In 2010 43rd Annual IEEE/ACM International Symposium on Microarchitecture (pp. 65–76).
Iyer, R., et al. (2007). QoS policies and architecture for cache/memory in CMP platforms. In SIGMETRICS Special Interest Group on Measurement and Evaluation (pp. 25–36). ACM.
Liu, L., et al. (2012). A software memory partition approach for eliminating bank-level interference in multicore systems. In Proceedings of the 21st International Conference on Parallel Architectures and Compilation Techniques (pp. 367–376). ACM.
Serebryany, K., et al. (2012). AddressSanitizer: A fast address sanity checker. In USENIX Annual Technical Conference (pp. 309–318).
Bruening, D., & Zhao, Q. (2011). Practical memory checking with Dr. Memory. In Proceedings of the IEEE/ACM International Symposium on Code Generation and Optimization. Los Alamitos, CA, USA, 2011 (pp. 213–223).
Luk, C.-K., et al. (2005). Pin: Building customized program analysis tools with dynamic instrumentation. In Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation. PLDI ’05 (pp. 190–200). ACM.
Nethercote, N., & Seward, J. (2007). Valgrind: A framework for heavyweight dynamic binary instrumentation. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation. PLDI ’07 (pp. 89–100). ACM.
Bruening, D. L. (2004). Efficient, transparent, and comprehensive runtime code manipulation. PhD Thesis. Massachusetts Institute of Technology (2004).
Wang, H., et al. (2018). Spindle: Informed memory access monitoring. In 2018 Annual Technical Conference (pp. 561–574).
The LLVM Compiler Framework. url: http://llvm.org
Fitzgerald, B., et al. (2011). Adopting open source software. MIT Press.
Von Krogh, G., & Von Hippel, E. (2006). The promise of research on open source software. Management Science, 52(7), 975–983.
The fcd tool. https://github.com/zneak/fcd/
The McSema tool. https://github.com/trailofbits/mcsema/
Bailey, D., et al. (1995). The NAS Parallel Benchmarks 2.0. Moffett Field, CA: NAS Systems Division, NASA Ames Research Center.
Venkataramani, G., et al. (2007). Memtracker: Efficient and programmable support for memory access monitoring and debugging. In IEEE 13th International Symposium on High Performance Computer Architecture, 2007. HPCA 2007 (pp. 273–284). IEEE.
Xie, Y., Chou, A., & Engler, D. (2003). Archer: Using symbolic, path-sensitive analysis to detect memory access errors. In ACM SIGSOFT Software Engineering Notes (Vol. 28, No. 5, pp. 327–336).
Nethercote, N., & Seward, J. (2007). How to shadow every byte of memory used by a program. In Proceedings of the 3rd International Conference on Virtual Execution Environments. VEE ’07 (pp. 65–74). San Diego, California, USA: ACM. ISBN: 978-1-59593-630-1. https://doi.org/10.1145/1254810.1254820. http://doi.acm.org/10.1145/1254810.1254820
Uh, G.-R., et al. (2006). Analyzing dynamic binary instrumentation overhead. In WBIA workshop at ASPLOS. Citeseer.
SPEC CPU 2006. https://www.spec.org/cpu2006/
Graph500. http://www.graph500.org/
The CNN program. https://github.com/preimmortal/CNN.git
The kissdb program. https://github.com/adamierymenko/kissdb.git
The fido library. http://fidoproject.github.io/
The PARSEC benchmark. http://parsec.cs.princeton.edu/
The mapreduce program. https://github.com/sysprog21/mapreduce.git
Nazaré, H., et al. (2014). Validation of memory accesses through symbolic analyses. In ACM SIGPLAN Notices (Vol. 49, No. 10, pp. 791–809). ACM.
Larus, J. R. (1990). Abstract execution: A technique for efficiently tracing programs. Software Practice Experience, 20(12), 1241–1258. ISSN: 0038-0644.
Zhai, J., et al. (2014). Cypress: Combining static and dynamic analysis for top-down communication trace compression. In SC’14: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (pp. 143–153). IEEE.
Roy, A., Hand, S., & Harris, T. (2011). Hybrid binary rewriting for memory access instrumentation. In Proceedings of the 7th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments. VEE ’11 (pp. 227–238). ACM.
Jeon, J., Shin, K., & Han, H. (2007). Layout transformations for heap objects using static access patterns. In Proceedings of the 16th International Conference on Compiler Construction. CC’07 (pp. 187–201).
Illous, H., Lemerre, M., & Rival, X. (2017). A relational shape abstract domain. In NASA Formal Methods Symposium (pp. 212–229). Springer.
Payer, M., Kravina, E., & Gross, T. R. (2013). Lightweight memory tracing. In USENIX Annual Technical Conference (pp. 115–126).
Vetter, J. (2002). Dynamic statistical profiling of communication activity in distributed applications. ACM SIGMETRICS Performance Evaluation Review, 30(1), 240–250.
Sheng, T., et al. (2011). RACEZ: A lightweight and non-invasive race detection tool for production applications. In Proceedings of the 33rd International Conference on Software Engineering (pp. 401–410). http://portal.acm.org/citation.cfm?doid=1985793.1985848
Bao, Y., et al. (2008). HMTT: A platform independent full-system memory trace monitoring system. In Proceedings of the 2008 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems. SIGMETRICS ’08 (pp. 229–240). ACM.
Huang, Y., et al. (2014). HMTT: A hybrid hardware/software tracing system for bridging the dram access trace’s semantic gap. ACM Transactions on Architecture and Code Optimization, 11(1), 7:1–7:25.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this chapter
Cite this chapter
Zhai, J., Jin, Y., Chen, W., Zheng, W. (2023). Informed Memory Access Monitoring. In: Performance Analysis of Parallel Applications for HPC. Springer, Singapore. https://doi.org/10.1007/978-981-99-4366-1_4
Download citation
DOI: https://doi.org/10.1007/978-981-99-4366-1_4
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-4365-4
Online ISBN: 978-981-99-4366-1
eBook Packages: Computer ScienceComputer Science (R0)