Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1806596.1806599acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Breadcrumbs: efficient context sensitivity for dynamic bug detection analyses

Published: 05 June 2010 Publication History

Abstract

Calling context--the set of active methods on the stack--is critical for understanding the dynamic behavior of large programs. Dynamic program analysis tools, however, are almost exclusively context insensitive because of the prohibitive cost of representing calling contexts at run time. Deployable dynamic analyses, in particular, have been limited to reporting only static program locations.
This paper presents Breadcrumbs, an efficient technique for recording and reporting dynamic calling contexts. It builds on an existing technique for computing a compact (one word) encoding of each calling context that client analyses can use in place of a program location. The key feature of our system is a search algorithm that can reconstruct a calling context from its encoding using only a static call graph and a small amount of dynamic information collected at cold (infrequently executed) callsites. Breadcrumbs requires no offline training or program modifications, and handles all language features, including dynamic class loading.
We use Breadcrumbs to add context sensitivity to two dynamic analyses: a data-race detector and an analysis for diagnosing null pointer exceptions. On average, it adds 10% to 20% runtime overhead, depending on a tunable parameter that controls how much dynamic information is collected. Collecting less information lowers the overhead, but can result in a search space explosion. In some cases this causes reconstruction to fail, but in most cases Breadcrumbs >produces non-trivial calling contexts that have the potential to significantly improve both the precision of the analyses and the quality of the bug reports.

References

[1]
B. Alpern, C. R. Attanasio, A. Cocchi, D. Lieber, S. Smith, T. Ngo, J. J. Barton, S. F. Hummel, J. C. Sheperd, and M. Mergen. Implementing Jalapeño in Java. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 314--324, 1999.
[2]
G. Ammons, T. Ball, and J. R. Larus. Exploiting Hardware Performance Counters with Flow and Context Sensitive Profiling. In ACM Conference on Programming Language Design and Implementation, pages 85--96, Las Vegas, NV, 1997.
[3]
T. Ball and J. R. Larus. Efficient Path Profiling. In IEEE/ACM International Symposium on Microarchitecture, pages 46--57, 1996.
[4]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović,T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 169--190, 2006.
[5]
M. D. Bond and K. S. McKinley. Probabilistic Calling Context. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 97--112, 2007.
[6]
M. D. Bond, N. Nethercote, S. W. Kent, S. Z. Guyer, and K. S. McKinley. Tracking Bad Apples: Reporting the Origin of Null and Undefined Value Errors. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 405--422, 2007.
[7]
M. D. Bond, V. Srivastava, K. S. McKinley, and V. Shmatikov. Efficient, Context-Sensitive Detection of Semantic Attacks. Technical Report TR-09-14, The University of Texas at Austin, 2009.
[8]
M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: Proportional Detection of Data Races. In ACM Conference on Programming Language Design and Implementation, 2010.
[9]
T. M. Chilimbi and M. Hauswirth. Low-Overhead Memory Leak Detection Using Adaptive Statistical Profiling. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 156--164, 2004.
[10]
C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In ACM Conference on Programming Language Design and Implementation, pages 121--133, 2009.
[11]
N. Froyd, J. Mellor-Crummey, and R. Fowler. Low-Overhead Call Path Profiling of Unmodified, Optimized Code. In ACM International Conference on Supercomputing, pages 81--90, 2005.
[12]
K. Hazelwood and D. Grove. Adaptive Online Context-Sensitive Inlining. In IEEE/ACM International Symposium on Code Generation and Optimization, pages 253--264, 2003.
[13]
H. Inoue and T. Nakatani. How a Java VM Can Get More from a Hardware Performance Monitor. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 137--154, 2009.
[14]
Lattner, A. Lenharth, and V. Adve. Making Context-Sensitive Points- To Analysis with Heap Cloning Practical for the Real World. In ACM Conference on Programming Language Design and Implementation, pages 278--289, 2007.
[15]
Lhoták and L. Hendren. Evaluating the Benefits of Context-Sensitive Points-to Analysis Using a BDD-Based Implementation. ACM Transactions on Software Engineering and Methodology, 18(1):1--53, 2008.
[16]
D. Marino, M. Musuvathi, and S. Narayanasamy.LiteRace: Effective Sampling for Lightweight Data-Race Detection. In ACM Conference on Programming Language Design and Implementation, pages 134--143, 2009.
[17]
D. Melski and T. Reps. Interprocedural Path Profiling. In International Conference on Compiler Construction, pages 47--62, 1999.
[18]
T. Mytkowicz, D. Coughlin, and A. Diwan. Inferred Call Path Profiling. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 175--190, 2009.
[19]
N. Nethercote and J. Seward. Valgrind: A Framework for Heavyweight Dynamic Binary Instrumentation. In ACM Conference on Programming Language Design and Implementation, pages 89--100, 2007.
[20]
J. Seward and N. Nethercote. Using Valgrind to Detect Undefined Value Errors with Bit-Precision. In USENIX Annual Technical Conference, pages 17--30, 2005.
[21]
J. M. Spivey. Fast, Accurate Call Graph Profiling. Softw. Pract. Exper., 34 (3):249--264, 2004.
[22]
M. Sridharan and R. Bodík. Refinement-Based Context-Sensitive Points- To Analysis for Java. In ACM Conference on Programming Language Design and Implementation, pages 387--400, 2006.
[23]
SPECjbb2000 Documentation. Standard Performance Evaluation Corporation, release 1.01 edition, 2001.
[24]
W. N. Sumner, Y. Zheng, D. Weeratunge, and X. Zhang. Precise Calling Context Encoding. In ACM International Conference on Software Engineering, 2010.
[25]
J. Whaley. A Portable Sampling-Based Profiler for Java Virtual Machines. In ACM Conference on Java Grande, pages 78--87, 2000.
[26]
J. Whaley and M. S. Lam. Cloning-Based Context-Sensitive Pointer Alias Analysis Using Binary Decision Diagrams. In ACM Conference on Programming Language Design and Implementation, pages 131--144, 2004.
[27]
X. Zhuang, M. J. Serrano, H. W. Cain, and J.-D. Choi. Accurate, Efficient, and Adaptive Calling Context Profiling. In ACM Conference on Programming Language Design and Implementation, pages 263--271, 2006.

Cited By

View all
  • (2023)A Dynamic Approach to Defuse Logic Bombs in Android ApplicationsData and Applications Security and Privacy XXXVII10.1007/978-3-031-37586-6_21(358-365)Online publication date: 12-Jul-2023
  • (2021)Profiling dataflow systems on multiple abstraction levelsProceedings of the Sixteenth European Conference on Computer Systems10.1145/3447786.3456254(474-489)Online publication date: 21-Apr-2021
  • (2019)Valence: variable length calling context encodingProceedings of the 28th International Conference on Compiler Construction10.1145/3302516.3307351(147-158)Online publication date: 16-Feb-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2010
514 pages
ISBN:9781450300193
DOI:10.1145/1806596
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 45, Issue 6
    PLDI '10
    June 2010
    496 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1809028
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 June 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. bug detection
  2. context sensitivity
  3. dynamic analysis

Qualifiers

  • Research-article

Conference

PLDI '10
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)14
  • Downloads (Last 6 weeks)5
Reflects downloads up to 25 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2023)A Dynamic Approach to Defuse Logic Bombs in Android ApplicationsData and Applications Security and Privacy XXXVII10.1007/978-3-031-37586-6_21(358-365)Online publication date: 12-Jul-2023
  • (2021)Profiling dataflow systems on multiple abstraction levelsProceedings of the Sixteenth European Conference on Computer Systems10.1145/3447786.3456254(474-489)Online publication date: 21-Apr-2021
  • (2019)Valence: variable length calling context encodingProceedings of the 28th International Conference on Compiler Construction10.1145/3302516.3307351(147-158)Online publication date: 16-Feb-2019
  • (2018)Calling-to-reference context translation via constraint-guided CFL-reachabilityACM SIGPLAN Notices10.1145/3296979.319237853:4(196-210)Online publication date: 11-Jun-2018
  • (2018)Calling-to-reference context translation via constraint-guided CFL-reachabilityProceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3192366.3192378(196-210)Online publication date: 11-Jun-2018
  • (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)Comparative performance analysis of calling context profiling data structuresInternational Journal of System Assurance Engineering and Management10.1007/s13198-016-0447-x8:1(135-150)Online publication date: 30-Mar-2016
  • (2016)Mining hot calling contexts in small spaceSoftware—Practice & Experience10.1002/spe.234846:8(1131-1152)Online publication date: 1-Aug-2016
  • (2014)IntroPerfACM SIGMETRICS Performance Evaluation Review10.1145/2637364.259200842:1(235-247)Online publication date: 16-Jun-2014
  • 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