skip to main content
article
Open Access

Detailed heap profiling

Published:18 June 2018Publication History
Skip Abstract Section

Abstract

Modern software systems heavily use the memory heap. As systems grow more complex and compute with increasing amounts of data, it can be difficult for developers to understand how their programs actually use the bytes that they allocate on the heap and whether improvements are possible. To answer this question of heap usage efficiency, we have built a new, detailed heap profiler called Memoro. Memoro uses a combination of static instrumentation, subroutine interception, and runtime data collection to build a clear picture of exactly when and where a program performs heap allocation, and crucially how it actually uses that memory. Memoro also introduces a new visualization application that can distill collected data into scores and visual cues that allow developers to quickly pinpoint and eliminate inefficient heap usage in their software. Our evaluation and experience with several applications demonstrates that Memoro can reduce heap usage and produce runtime improvements of 10%.

References

  1. 2017. Google Perftools. https://github.com/gperftools/gperftoolsGoogle ScholarGoogle Scholar
  2. 2017. heaptrack: A heap memory profiler for Linux. https://github. com/KDE/heaptrackGoogle ScholarGoogle Scholar
  3. 2017. Massif. http://valgrind.org/docs/manual/ms-manual.htmlGoogle ScholarGoogle Scholar
  4. 2017. Memcached: A Distributed Memory Object Caching System. https://memcached.org . Accessed: 02-02-2018.Google ScholarGoogle Scholar
  5. Glenn Ammons and James R Larus. 1998. Improving Data-Flow Analysis with Path Profiles. In ACM SIGPLAN Notices, Vol. 33. ACM, 72–84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Derek W Barnett, Erik K Garrison, Aaron R Quinlan, Michael P Strömberg, and Gabor T Marth. 2011. BamTools: a C++ API and Toolkit for Analyzing and Managing BAM Files. Bioinformatics 27, 12 (2011), 1691–1692. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bruno Blanchet. 2003. Escape Analysis for JavaTM: Theory and Practice. ACM Transactions on Programming Languages and Systems 25, 6 (Nov. 2003), 713–775. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Stuart Byma. 2017. Memoro. https://github.com/epfl-vlsc/memoro . Accessed: 01-11-2017.Google ScholarGoogle Scholar
  9. Adriana Chis, Nick Mitchell, Edith Schonberg, Gary Sevitsky, Patrick O’Sullivan, Trevor Parsons, and John Murphy. 2011. Patterns of Memory Inefficiency. ECOOP Object-Oriented Programming (2011), 383–407. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Intel Corporation. 2017. Intel 64 and IA-32 Architectures Software Developer’s Manual. https://www.intel. com/content/dam/www/public/us/en/documents/manuals/ 64-ia-32-architectures-software-developer-vol-3b-part-2-manual. pdf . Accessed: 01-11-2017.Google ScholarGoogle Scholar
  11. Bruno Dufour, Barbara G. Ryder, and Gary Sevitsky. 2007. Blended Analysis for Performance Understanding of Framework-based Applications. In International Symposium on Software Testing and Analysis (ISSTA ’07). ACM, New York, NY, USA, 118–128. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Sanjay Ghemawat and Jeff Dean. 2017. LevelDB. https://github.com/ google/leveldb . Accessed: 02-02-2018.Google ScholarGoogle Scholar
  13. Brendan Gregg. 2017. Flame Graphs. http://www.brendangregg.com/ flamegraphs.html . Accessed: 01-11-2017.Google ScholarGoogle Scholar
  14. Brendan Gregg. 2017. Memory Flame Graphs. http://www. brendangregg.com/FlameGraphs/memoryflamegraphs.html . Accessed: 01-11-2017.Google ScholarGoogle Scholar
  15. Google Inc. 2017. Protocol Buffers. https://developers.google.com/ protocol-buffers/ . Accessed: 01-11-2017.Google ScholarGoogle Scholar
  16. Chris Lattner and Vikram Adve. 2004. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization. IEEE Computer Society, 75. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jacob Leverich. 2014. Mutilate: A High-Performance Memcached Load Generator.Google ScholarGoogle Scholar
  18. Heng Li, Bob Handsaker, Alec Wysoker, Tim Fennell, Jue Ruan, Nils Homer, Gabor Marth, Goncalo Abecasis, and Richard Durbin. 2009. The Sequence Alignment/Map Format and SAMtools. Bioinformatics 25, 16 (2009), 2078–2079. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. LLVM. 2017. Clang: A C Language Family Frontend for LLVM. https: //clang.llvm.org/ . Accessed: 01-11-2017.Google ScholarGoogle Scholar
  20. Svetozar Miucin, Conor Brady, and Alexandra Fedorova. 2016. DINA-MITE: A Modern Approach to Memory Performance Profiling. CoRR abs/1606.00396 (2016). arXiv: 1606.00396 http://arxiv.org/abs/1606. 00396Google ScholarGoogle Scholar
  21. Nicholas Nethercote and Julian Seward. {n. d.}. Valgrind: A Framework for Heavyweight Dynamic Binary Instrumentation. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’07). ACM, New York, NY, USA, 89–100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Tony Printezis and Richard Jones. 2002. GCspy: An Adaptable Heap Visualisation Framework. Vol. 37. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Konstantin Serebryany, Derek Bruening, Alexander Potapenko, and Dmitriy Vyukov. 2012. AddressSanitizer: A Fast Address Sanity Checker.. In USENIX Annual Technical Conference. 309–318. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Ran Shaham, Elliot K. Kolodner, and Mooly Sagiv. 2001. Heap Profiling for Space-efficient Java. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation (PLDI ’01). ACM, New York, NY, USA, 104–113. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Milos Tosic. 2017. MTuner: a C/C++ memory profiler and memory leak finder for Windows, PlayStation 4, PlayStation 3, etc. https: //github.com/milostosic/MTunerGoogle ScholarGoogle Scholar
  26. Valgrind. 2017. DHAT. http://valgrind.org/docs/manual/dh-manual. htmlGoogle ScholarGoogle Scholar

Index Terms

  1. Detailed heap profiling

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 53, Issue 5
      ISMM '18
      May 2018
      119 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3299706
      Issue’s Table of Contents
      • cover image ACM Conferences
        ISMM 2018: Proceedings of the 2018 ACM SIGPLAN International Symposium on Memory Management
        June 2018
        119 pages
        ISBN:9781450358019
        DOI:10.1145/3210563

      Copyright © 2018 Owner/Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 18 June 2018

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!