skip to main content
article

Casper: an efficient approach to call trace collection

Authors Info & Claims
Published:11 January 2016Publication History
Skip Abstract Section

Abstract

Call traces, i.e., sequences of function calls and returns, are fundamental to a wide range of program analyses such as bug reproduction, fault diagnosis, performance analysis, and many others. The conventional approach to collect call traces that instruments each function call and return site incurs large space and time overhead. Our approach aims at reducing the recording overheads by instrumenting only a small amount of call sites while keeping the capability of recovering the full trace. We propose a call trace model and a logged call trace model based on an LL(1) grammar, which enables us to define the criteria of a feasible solution to call trace collection. Based on the two models, we prove that to collect call traces with minimal instrumentation is an NP-hard problem. We then propose an efficient approach to obtaining a suboptimal solution. We implemented our approach as a tool Casper and evaluated it using the DaCapo benchmark suite. The experiment results show that our approach causes significantly lower runtime (and space) overhead than two state-of-the-arts approaches.

References

  1. A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools (2Nd Edition). Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. G. Ammons, T. Ball, and J. R. Larus. Exploiting Hardware Performance Counters with Flow and Context Sensitive Profiling. In PLDI, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. Ammons, J.-D. Choi, M. Gupta, and N. Swamy. Finding and removing performance bottlenecks in large systems. In ECOOP, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  4. T. Ball and J. R. Larus. Optimally Profiling and Tracing Programs. TOPLAS, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. T. Ball and J. R. Larus. Efficient Path Profiling. In MICRO, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, et al. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. D. Bond and K. S. McKinley. Probabilistic calling context. In ACM SIGPLAN Notices, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. D. Bond, G. Z. Baker, and S. Z. Guyer. Breadcrumbs: Efficient Context Sensitivity for Dynamic Bug Detection Analyses. In PLDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Christodorescu, S. Jha, and C. Kruegel. Mining specifications of malicious behavior. In ESEC/FSE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. F. Cmelik, S. I. Kong, D. R. Ditzel, and E. J. Kelly. An analysis of MIPS and SPARC instruction set utilization on the SPEC benchmarks. Springer, 1991.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein, et al. Introduction to algorithms, volume 2. MIT press Cambridge, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Deutsch. Rfc1951, deflate compressed data format specification, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. A. Fisher, J. R. Ellis, J. C. Ruttenberg, and A. Nicolau. Parallel processing: A smart compiler and a dumb machine. In ACM SIGPLAN Notices, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Fowler. Refactoring: Improving the design of existing code, 1997.Google ScholarGoogle Scholar
  15. M. Gabel and Z. Su. Javert: Fully Automatic Mining of General Temporal Properties from Dynamic Traces. In FSE, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Ha, M. Arnold, S. M. Blackburn, and K. S. McKinley. A concurrent dynamic analysis framework for multicore hardware. In ACM SIGPLAN Notices, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Han, Y. Dang, S. Ge, D. Zhang, and T. Xie. Performance debugging in the large via mining millions of stack traces. In ICSE, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. A. Hofmeyr, S. Forrest, and A. Somayaji. Intrusion detection using sequences of system calls. Journal of computer security, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. F. Jerding, J. T. Stasko, and T. Ball. Visualizing interactions in program executions. In ICSE, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. L. Jiang and Z. Su. Context-aware statistical debugging: From bug predictors to faulty control flow paths. In ASE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. W. Jin and A. Orso. BugRedux: Reproducing field failures for in-house debugging. In ICSE, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. V. Krunic, E. Trumpler, and R. Han. Nodemd: Diagnosing node-level faults in remote wireless sensor systems. In MobiSys, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Lam, F. Qian, O. Lhotak, and E. Bodden. Soot: a java optimization framework. See http://www. sable. mcgill. ca/soot, 2002.Google ScholarGoogle Scholar
  24. J. R. Larus. Abstract execution: A technique for efficiently tracing programs. Software: Practice and Experience, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. R. Larus. Whole program paths. In PLDI, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. W. Lee and S. J. Stolfo. Data mining approaches for intrusion detection. In Usenix Security, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. B. Liblit, A. Aiken, A. X. Zheng, and M. I. Jordan. Bug isolation via remote program sampling. ACM SIGPLAN Notices, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. B. Liblit, M. Naik, A. X. Zheng, A. Aiken, and M. I. Jordan. Scalable statistical bug isolation. In ACM SIGPLAN Notices, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. H. B. Mann and D. R. Whitney. On a test of whether one of two random variables is stochastically larger than the other. The annals of mathematical statistics, 1947.Google ScholarGoogle Scholar
  30. D. Melski and T. Reps. Interprocedural path profiling. In CC, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. H. Mi, H. Wang, Y. Zhou, M. R.-T. Lyu, and H. Cai. Toward finegrained, unsupervised, scalable performance diagnosis for production cloud computing systems. IEEE Transactions on Parallel & Distributed Systems, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. B. P. Miller and J.-D. Choi. A mechanism for efficient debugging of parallel programs. ACM, 1988.Google ScholarGoogle Scholar
  33. T. Mytkowicz, D. Coughlin, and A. Diwan. Inferred call path profiling. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. A. Nistor and L. Ravindranath. Suncat: Helping developers understand and predict performance problems in smartphone applications. In ISSTA, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. P. Ohmann and B. Liblit. Lightweight control-flow instrumentation and postmortem analysis in support of debugging. In ASE, 2013.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Pathak, Y. C. Hu, and M. Zhang. Where is the energy spent inside my app?: fine grained energy accounting on smartphones with eprof. In EuroSys, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Pradel and T. R. Gross. Automatic generation of object usage specifications from large method traces. In ASE ’09, pages 371–382, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. M. Pradel and T. R. Gross. Leveraging test generation and specification mining for automated bug detection without false positives. In ICSE ’12, pages 288–298, Piscataway, NJ, USA, 2012. IEEE Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. R. Sekar, M. Bendre, D. Dhurjati, and P. Bollineni. A fast automatonbased method for detecting anomalous program behaviors. In S&P, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. M. Serrano and X. Zhuang. Building approximate calling context from partial call traces. In CGO, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. W. N. Sumner, Y. Zheng, D. Weeratunge, and X. Zhang. Precise calling context encoding. TSE, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. V. V. Vazirani. Approximation Algorithms. Springer-Verlag New York, Inc., New York, NY, USA, 2001. ISBN 3-540-65367-8. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. R. Wu, H. Zhang, S.-C. Cheung, and S. Kim. Crashlocator: locating crashing faults based on crash stacks. In ISSTA, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. X. Yu, S. Han, D. Zhang, and T. Xie. Comprehending performance from real-world execution traces: A device-driver case. In ASPLOS ’14, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. C. Yuan, N. Lao, J.-R. Wen, J. Li, Z. Zhang, Y.-M. Wang, and W.-Y. Ma. Automated known problem diagnosis with event traces. In ACM SIGOPS Operating Systems Review, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Q. Zeng, J. Rhee, H. Zhang, N. Arora, G. Jiang, and P. Liu. Deltapath: Precise and scalable calling context encoding. In CGO, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Q. Zhao, I. Cutcutache, and W.-F. Wong. Pipa: Pipelined profiling and analysis on multicore systems. TACO, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. X. Zhuang, M. J. Serrano, H. W. Cain, and J.-D. Choi. Accurate, efficient, and adaptive calling context profiling. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Casper: an efficient approach to call trace collection

      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 51, Issue 1
        POPL '16
        January 2016
        815 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2914770
        • Editor:
        • Andy Gill
        Issue’s Table of Contents
        • cover image ACM Conferences
          POPL '16: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
          January 2016
          815 pages
          ISBN:9781450335492
          DOI:10.1145/2837614

        Copyright © 2016 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 11 January 2016

        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!