skip to main content
10.1145/1806799.1806875acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Precise calling context encoding

Published:01 May 2010Publication History

ABSTRACT

Calling contexts are very important for a wide range of applications such as profiling, debugging, and event logging. Most applications perform expensive stack walking to recover contexts. The resulting contexts are often explicitly represented as a sequence of call sites and hence bulky. We propose a technique to encode the current calling context of any point during an execution. In particular, an acyclic call path is encoded into one number through only integer additions. Recursive call paths are divided into acyclic subsequences and encoded independently. We leverage stack depth in a safe way to optimize encoding: if a calling context can be safely and uniquely identified by its stack depth, we do not perform encoding. We propose an algorithm to seamlessly fuse encoding and stack depth based identification. The algorithm is safe because different contexts are guaranteed to have different IDs. It also ensures contexts can be faithfully decoded. Our experiments show that our technique incurs negligible overhead (1.89% on average). For most medium-sized programs, it can encode all contexts with just one number. For large programs, we are able to encode most calling contexts to a few numbers.

References

  1. http://www.cs.purdue.edu/~wsumner/research/cc.Google ScholarGoogle Scholar
  2. A. Aho, R. Sethi, and J. Ullman. Compilers: Princiles, Techniques, and Tools. Addison-Wesley, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. Ammons, T. Ball, and J. Larus. Exploiting hardware performance counters with flow and context sensitive profiling. In PLDI'97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Ball and J. Larus. Efficient path profiling. In MICRO-29, December 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. D. Bond and K. S. McKinley. Probabilistic calling context. In OOPSLA'07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. T. M. Chilimbi, B. Liblit, K. Mehra, A. V. Nori, and K. Vaswani. Holmes: Effective statistical debugging via efficient path profiling. In ICSE'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Jones and C. Ryder. A study of java object demographics. In ISMM'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Joshi, M. D. Bond, and C. Zilles. Targeted path profiling: Lower overhead path profiling for staged dynamic optimization systems. In CGO'04. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Z. Lai, S. C. Cheung, and W. K. Chan. Inter-context control-flow and data-flow test adequacy criteria for nesc applications. In FSE'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. James R. Larus. Whole program paths. In PLDI'99. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Z. Lin, X. Jiang, D. Xu, and X. Zhang. Automatic protocol format reverse engineering through context-aware monitored execution. In NDSS'08.Google ScholarGoogle Scholar
  12. D. Melski and T. Reps. Interprocedural path profiling. In CC'99. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Mytkowicz, D. Coughlin, and A. Diwan. Inferred call path profiling. In OOPSLA'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. G. C. Necula, S. McPeak, S. P. Rahul, and W. Weimer. Cil: Intermediate language and tools for analysis and transformation of c programs. In CC'02. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. N. Nethercote and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In PLDI'07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Reps, T. Ball, M. Das, and J. Larus. The use of program profiling for software maintenance with applications to the year 2000 problem. In FSE'97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. M. Spivey. Fast, accurate call graph profiling. Softw. Pract. Exper., 34(3):249--264, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K. Vaswani, A. V. Nori, and T. M. Chilimbi. Preferential path profiling: compactly numbering interesting paths. In POPL'07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Villazon, W. Binder, and P. Moret. Flexible calling context reification for aspect-oriented programming. In AOSD'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. B. Wiedermann. Know your place: Selectively executing statements based on context. Technical Report TR-07-38, University of Texas at Austin, 2007.Google ScholarGoogle Scholar
  21. X. Zhang, A. Navabi, and S. Jagannathan. Alchemist: A transparent dependence distance profiling infrastructure. In CGO'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. X. Zhang, S. Tallam, and R. Gupta. Dynamic slicing long running programs through execution fast forwarding. In FSE'06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. X. Zhuang, M. Serrano, H. Cain, and J. Choi. Accurate, efficient, and adaptive calling context profiling. In PLDI'06. Google ScholarGoogle ScholarDigital LibraryDigital Library

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
  • Published in

    cover image ACM Conferences
    ICSE '10: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1
    May 2010
    627 pages
    ISBN:9781605587196
    DOI:10.1145/1806799

    Copyright © 2010 ACM

    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: 1 May 2010

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article

    Acceptance Rates

    Overall Acceptance Rate276of1,856submissions,15%

    Upcoming Conference

    ICSE 2025

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader