Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Inferred call path profiling

Published: 25 October 2009 Publication History

Abstract

Prior work has found call path profiles to be useful for optimizers and programmer-productivity tools. Unfortunately, previous approaches for collecting path profiles are expensive: they need to either execute additional instructions (to track calls and returns) or they need to walk the stack. The state-of-the-art techniques for call path profiling slow down the program by 7% (for C programs) and 20% (for Java programs). This paper describes an innovative technique that collects minimal information from the running program and later (offline) infers the full call paths from this information.
The key insight behind our approach is that readily available information during program execution - the height of the call stack and the identity of the current executing function - are good indicators of calling context. We call this pair a context identifier. Because more than one call path may have the same context identifier, we show how to disambiguate context identifiers by changing the sizes of function activation records. This disambiguation has no overhead in terms of executed instructions.
We evaluate our approach on the SPEC CPU 2006 C++ and C benchmarks. We show that collecting context identifiers slows down programs by 0.17% (geometric mean). We can map these context identifiers to the correct unique call path 80% of the time for C++ programs and 95% of the time for C programs.

References

[1]
Gerald Aigner and Urs H¨olzle. Eliminating virtual function calls in C++ programs. In ECOOP '96: Proceedings of the 10th European Conference on Object-Oriented Programming, pages 142--166, London, UK, 1996. Springer-Verlag.
[2]
Glenn Ammons, Thomas Ball, and James R. Larus. Exploiting hardware performance counters with flow and context sensitive profiling. SIGPLAN Not., 32(5):85--96, 1997.
[3]
M. Arnold and D. Grove. Collecting and exploiting highaccuracy call graph profiles in virtual machines. In Code Generation and Optimization, 2005. CGO 2005. International Symposium on, pages 51--62, March 2005.
[4]
Matthew Arnold and David Grove. Collecting and exploiting high-accuracy call graph profiles in virtual machines. In CGO '05: Proceedings of the international symposium on Code generation and optimization, pages 51--62, Washington, DC, USA, 2005. IEEE Computer Society.
[5]
Thomas Ball and James R. Larus. Optimally profiling and tracing programs. ACM Trans. Program. Lang. Syst., 16(4):1319--1360, 1994.
[6]
Andrew R. Bernat and Barton P. Miller. Incremental call-path profiling: Research articles. Concurr. Comput. : Pract. Exper., 19(11):1533--1547, 2007.
[7]
Michael D. Bond and Kathryn S. McKinley. Probabilistic Calling Context. SIGPLAN Not., 42(10):97--112, 2007.
[8]
Apple Computer. Shark. http://developer.apple.com/performance.
[9]
Jeffrey Dean, David Grove, and Craig Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In ECOOP '95: Proceedings of the 9th European Conference on Object-Oriented Programming, pages 77--101, London, UK, 1995. Springer-Verlag.
[10]
Saumya Debray and Robert Muth. Alias analysis of executable code. In In POPL, pages 12--24, 1998.
[11]
Henry Hanping Feng, Oleg M. Kolesnikov, Prahlad Fogla, Wenke Lee, and Weibo Gong. Anomaly detection using call stack information. In SP'03: Proceedings of the 2003 IEEE Symposium on Security and Privacy, page 62, Washington, DC, USA, 2003. IEEE Computer Society.
[12]
Nathan Froyd, John Mellor-Crummey, and Rob Fowler. Lowoverhead call path profiling of unmodified, optimized code. In Proceedings of the 19th annual international conference on Supercomputing, pages 81--90, Cambridge,Massachusetts, 2005. ACM.
[13]
Susan L. Graham, Peter B. Kessler, and Marshall K. Mckusick. gprof: A call graph execution profiler. In Proceedings of the 1982 SIGPLAN symposium on Compiler construction, pages 120--126, Boston, Massachusetts, United States, 1982. ACM.
[14]
Kim Hazelwood and David Grove. Adaptive online contextsensitive inlining. In Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, pages 253--264, San Francisco, California, 2003. IEEE Computer Society.
[15]
Allen D. Malony, Sameer Shende, Robert Bell, Kai Li, Li Li, and Nick Trebon. Advances in the TAU performance system. Performance analysis and grid computing, pages 129--144, 2004.
[16]
Todd Mytkowicz, Amer Diwan, Matthias Hauswirth, and Peter F. Sweeney. Producing wrong data without doing anything obviously wrong! In ASPLOS '09: Proceeding of the 14th international conference on Architectural support for programming languages and operating systems, pages 265--276, New York, NY, USA, 2009. ACM.
[17]
George C. Necula, Scott McPeak, Shree Prakash Rahul, and Westley Weimer. CIL: Intermediate language and tools for analysis and transformation of C programs. In CC '02: Proceedings of the 11th International Conference on Compiler Construction, pages 213--228, London, UK, 2002. Springer-Verlag.
[18]
Karl Pettis and Robert C. Hansen. Profile guided code positioning. SIGPLAN Not., 25(6):16--27, 1990.
[19]
J. M. Spivey. Fast, accurate call graph profiling. Softw. Pract. Exper., 34(3):249--264, 2004.
[20]
B. Sprunt. Pentium 4 performance-monitoring features. Micro, IEEE, 22(4):72--82, Jul/Aug 2002.
[21]
Standard Performance Evaluation Corporation. SPEC CPU2006 Benchmarks. http://www.spec.org/cpu2006/.
[22]
Toshio Suganuma, Toshiaki Yasue, Motohiro Kawahito, Hideaki Komatsu, and Toshio Nakatani. A dynamic optimization framework for a Java just-in-time compiler. SIGPLAN Not., 36(11):180--195, 2001.
[23]
Kapil Vaswani, Aditya V. Nori, and Trishul M. Chilimbi. Preferential path profiling: compactly numbering interesting paths. In Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 351--362, Nice, France, 2007. ACM.
[24]
Mark Weiser. Program slicing. In ICSE '81: Proceedings of the 5th international conference on Software engineering, pages 439--449, Piscataway, NJ, USA, 1981. IEEE Press.
[25]
Xiaotong Zhuang, Mauricio J. Serrano, Harold W. Cain, and Jong-Deok Choi. Accurate, efficient, and adaptive calling context profiling. SIGPLAN Not., 41(6):263--271, 2006.

Cited By

View all
  • (2023)Predicting Dynamic Properties of Heap Allocations using Neural Networks Trained on Static Code: An Intellectual AbstractProceedings of the 2023 ACM SIGPLAN International Symposium on Memory Management10.1145/3591195.3595275(43-57)Online publication date: 6-Jun-2023
  • (2022)Low overhead and context sensitive profiling of GPU-accelerated applicationsProceedings of the 36th ACM International Conference on Supercomputing10.1145/3524059.3532388(1-13)Online publication date: 28-Jun-2022
  • (2024)Combining Machine Learning and Lifetime-Based Resource Management for Memory Allocation and BeyondCommunications of the ACM10.1145/361101867:4(87-96)Online publication date: 25-Mar-2024
  • Show More Cited By

Index Terms

  1. Inferred call path profiling

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 44, Issue 10
    OOPSLA '09
    October 2009
    554 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1639949
    Issue’s Table of Contents
    • cover image ACM Conferences
      OOPSLA '09: Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
      October 2009
      590 pages
      ISBN:9781605587660
      DOI:10.1145/1640089
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 25 October 2009
    Published in SIGPLAN Volume 44, Issue 10

    Check for updates

    Author Tags

    1. call path
    2. calling context
    3. calling context tree
    4. profiling
    5. stack

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)10
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 01 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Predicting Dynamic Properties of Heap Allocations using Neural Networks Trained on Static Code: An Intellectual AbstractProceedings of the 2023 ACM SIGPLAN International Symposium on Memory Management10.1145/3591195.3595275(43-57)Online publication date: 6-Jun-2023
    • (2022)Low overhead and context sensitive profiling of GPU-accelerated applicationsProceedings of the 36th ACM International Conference on Supercomputing10.1145/3524059.3532388(1-13)Online publication date: 28-Jun-2022
    • (2024)Combining Machine Learning and Lifetime-Based Resource Management for Memory Allocation and BeyondCommunications of the ACM10.1145/361101867:4(87-96)Online publication date: 25-Mar-2024
    • (2020)Fuzzing error handling code using context-sensitive software fault injectionProceedings of the 29th USENIX Conference on Security Symposium10.5555/3489212.3489358(2595-2612)Online publication date: 12-Aug-2020
    • (2020)Learning-based Memory Allocation for C++ Server WorkloadsProceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3373376.3378525(541-556)Online publication date: 9-Mar-2020
    • (2019)HeapTherapy+: Efficient Handling of (Almost) All Heap Vulnerabilities Using Targeted Calling-Context Encoding2019 49th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN)10.1109/DSN.2019.00060(530-542)Online publication date: Jun-2019
    • (2016)Casper: an efficient approach to call trace collectionACM SIGPLAN Notices10.1145/2914770.283761951:1(678-690)Online publication date: 11-Jan-2016
    • (2016)Casper: an efficient approach to call trace collectionProceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2837614.2837619(678-690)Online publication date: 11-Jan-2016
    • (2016)Bio-Inspired Call-Stack Reconstruction for Performance Analysis2016 24th Euromicro International Conference on Parallel, Distributed, and Network-Based Processing (PDP)10.1109/PDP.2016.62(82-90)Online publication date: Feb-2016
    • (2016)A new method to encode calling contexts with recursions一种针对递归的调用语境编码技术Science China Information Sciences10.1007/s11432-015-5418-359:5Online publication date: 12-Apr-2016
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media