Skip to main content

Informed Memory Access Monitoring

  • Chapter
  • First Online:
Performance Analysis of Parallel Applications for HPC
  • 218 Accesses

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).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 139.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 179.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Park, S., Lu, S., & Zhou, Y. (2009). CTrigger: Exposing atomicity violation bugs from their hiding places. In ASPLOS (pp. 25–36). ACM.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. Sherwood, T., et al. (2002). Automatically characterizing large scale program behavior. In ASPLOS: Architectural Support for Programming Languages and Operating Systems (pp. 45–57).

    Google Scholar 

  7. Snavely, A., et al. (2002). A framework for application performance modeling and prediction. In: Proceedings SC (pp. 1–17).

    Google Scholar 

  8. Wen, S., Chabbi, M., & Liu, X. . REDSPY: Exploring value locality in software. In ASPLOS (pp. 47–61). ACM.

    Google Scholar 

  9. 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).

    Google Scholar 

  10. 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.

    Google Scholar 

  11. 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.

    Google Scholar 

  12. Serebryany, K., et al. (2012). AddressSanitizer: A fast address sanity checker. In USENIX Annual Technical Conference (pp. 309–318).

    Google Scholar 

  13. 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).

    Google Scholar 

  14. 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.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. Bruening, D. L. (2004). Efficient, transparent, and comprehensive runtime code manipulation. PhD Thesis. Massachusetts Institute of Technology (2004).

    Google Scholar 

  17. Wang, H., et al. (2018). Spindle: Informed memory access monitoring. In 2018 Annual Technical Conference (pp. 561–574).

    Google Scholar 

  18. The LLVM Compiler Framework. url: http://llvm.org

  19. Fitzgerald, B., et al. (2011). Adopting open source software. MIT Press.

    Book  Google Scholar 

  20. Von Krogh, G., & Von Hippel, E. (2006). The promise of research on open source software. Management Science, 52(7), 975–983.

    Article  Google Scholar 

  21. The fcd tool. https://github.com/zneak/fcd/

  22. The McSema tool. https://github.com/trailofbits/mcsema/

  23. Bailey, D., et al. (1995). The NAS Parallel Benchmarks 2.0. Moffett Field, CA: NAS Systems Division, NASA Ames Research Center.

    Google Scholar 

  24. 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.

    Google Scholar 

  25. 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).

    Google Scholar 

  26. 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

  27. Uh, G.-R., et al. (2006). Analyzing dynamic binary instrumentation overhead. In WBIA workshop at ASPLOS. Citeseer.

    Google Scholar 

  28. SPEC CPU 2006. https://www.spec.org/cpu2006/

  29. Graph500. http://www.graph500.org/

  30. The CNN program. https://github.com/preimmortal/CNN.git

  31. The kissdb program. https://github.com/adamierymenko/kissdb.git

  32. The fido library. http://fidoproject.github.io/

  33. The PARSEC benchmark. http://parsec.cs.princeton.edu/

  34. The mapreduce program. https://github.com/sysprog21/mapreduce.git

  35. Nazaré, H., et al. (2014). Validation of memory accesses through symbolic analyses. In ACM SIGPLAN Notices (Vol. 49, No. 10, pp. 791–809). ACM.

    Google Scholar 

  36. Larus, J. R. (1990). Abstract execution: A technique for efficiently tracing programs. Software Practice Experience, 20(12), 1241–1258. ISSN: 0038-0644.

    Article  Google Scholar 

  37. 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.

    Google Scholar 

  38. 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.

    Google Scholar 

  39. 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).

    Google Scholar 

  40. Illous, H., Lemerre, M., & Rival, X. (2017). A relational shape abstract domain. In NASA Formal Methods Symposium (pp. 212–229). Springer.

    Google Scholar 

  41. Payer, M., Kravina, E., & Gross, T. R. (2013). Lightweight memory tracing. In USENIX Annual Technical Conference (pp. 115–126).

    Google Scholar 

  42. Vetter, J. (2002). Dynamic statistical profiling of communication activity in distributed applications. ACM SIGMETRICS Performance Evaluation Review, 30(1), 240–250.

    Article  Google Scholar 

  43. 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

  44. 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.

    Google Scholar 

  45. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics