Skip to main content
Log in

A new method to encode calling contexts with recursions

一种针对递归的调用语境编码技术

  • Research Paper
  • Published:
Science China Information Sciences Aims and scope Submit manuscript

Abstract

Calling context encoding (CCE) uses some integers to represent the current context of any execution point, and is valuable in a wide range of applications. Existing studies already ensure accurate results of CCE, but they use stack to store the encoding when recursive calls happen. This may cost much for cyclic call graphs with deep recursive calls. This paper presents a novel approach (called RCCE) to address this problem. With a modified strategy for encoding, it requires less frequent access of the stack and gives more succinct representation of contexts on deep recursion. Experimental results show that compared to Precise Calling Context Encoding, RCCE is more practical and efficient on calling contexts with recursions.

摘要

创新点

调用语境编码 (Calling context encoding) 使用一个整数或一个整数序列来唯一性地标识目标程序运行中的每个调用语境。 本文针对面向对象程序中普遍存在的递归调用情况, 在已有的调用语境编码方法的基础上, 结合路径剖析领域中针对循环的编码思想, 设计了新的编码方案, 不必在所有递归调用处均需访问编码栈, 减少了编码的长度。 实验结果表明这种编码方式能够改善编码的耗费, 提升编码的效用。

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Sumner WN, Zheng Y, Weeratunge D, et al. Precise calling context encoding. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering (ICSE), Cape Town, 2010. 525–534

    Google Scholar 

  2. Sumner W N, Zheng Y, Weeratunge D, et al. Precise calling context encoding. IEEE Trans Softw Eng, 2012, 38: 1160–1177

    Article  Google Scholar 

  3. Ball T, Larus J R. Efficient path profiling. In: Proceedings of the 29th annual ACM/IEEE international symposium on Microarchitecture (MICRO), Paris, 1996. 46–57

    Google Scholar 

  4. Li B, Wang L, Leung H, et al. Profiling all paths: a new profiling technique for both cyclic and acyclic paths. J Syst Softw, 2012, 85: 1558–1576

    Article  Google Scholar 

  5. Vaswani K, Nori A V, Chilimbi T M. Preferential path profiling: compactly numbering interesting paths. In: Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Nice, 2007. 351–362

    Chapter  Google Scholar 

  6. Apiwattanapong T, Harrold M J. Selective path profiling. In: Proceedings of the 2002 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis For Software Tools and Engineering (PASTE), Charleston, 2002. 35–42

    Chapter  Google Scholar 

  7. Bond M D, McKinley K S. Practical path profiling for dynamic optimizers. In: Proceedings of the 3rd IEEE/ACM International Symposium on Code Generation and Optimization (CGO), San Jose, 2005. 205–216

    Chapter  Google Scholar 

  8. Tallam S, Zhang X, Gupta R. Extending path profiling across loop backedges and procedure boundaries. In: Proceedings of the 2nd IEEE/ACM International Symposium on Code Generation and Optimization (CGO), San Jose, 2004. 251–264

    Google Scholar 

  9. Roy S, Srikant Y N. Profiling k-iteration paths: a generalization of the Ball-Larus profiling algorithm. In: Proceedings of the 7th International Symposium on Code Generation and Optimization (CGO), Seattle, 2009. 70–80

    Google Scholar 

  10. Joshi R, Bond M D, Zilles C. Targeted path profiling: lower overhead path profiling for staged dynamic optimization systems. In: Proceedings of the 2nd IEEE/ACM International Symposium on Code Generation and Optimization (CGO), San Jose, 2004. 239–250

    Google Scholar 

  11. Zhuang X, Serrano M J, Cain H W. Accurate, efficient, and adaptive calling context profiling. In: Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Ottawa, 2006. 263–271

    Chapter  Google Scholar 

  12. Ammons G, Ball T, Larus J R. Exploiting hardware performance counters with flow and context sensitive profiling. In: Proceedings of the ACM SIGPLAN’97 Conference on Programming Language Design and Implementation (PLDI), Las Vegas, 1997. 85–96

    Google Scholar 

  13. Nethercote N, Seward J. Valgrind: a framework for heavyweight dynamic binary instrumentation. In: Proceedings of the ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation, San Diego, 2007. 89–100

    Chapter  Google Scholar 

  14. Spivey J M. Fast, accurate call graph profiling. Softw Pract Exper, 2004, 34: 249–264

    Article  Google Scholar 

  15. Villazon A, Binder W, Moret P. Flexible calling context reification for aspect-oriented programming. In: Proceedings of the 8th International Conference on Aspect-Oriented Software Development (AOSD), Charlottesville, 2009. 63–74

    Google Scholar 

  16. Bernat A R, Miller B P. Incremental call-path profiling. Concurr Comput Pract Exper, 2007, 19: 1533–1547

    Article  Google Scholar 

  17. Bond M D, McKinley K S. Probabilistic calling context. In: Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Montreal, 2007. 97–111

    Chapter  Google Scholar 

  18. Mytkowicz T, Coughlin D, Diwan A. Inferred call path profiling. In: Proceedings of the 24th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Orlando, 2009. 175–189

    Chapter  Google Scholar 

  19. Zeng Q, Rhee J, Zhang H, et al. DeltaPath: precise and scalable calling context encoding. In: Proceedings of the 12th IEEE/ACM International Symposium on Code Generation and Optimization (CGO), Orlando, 2014. 109–119

    Google Scholar 

  20. Li J J, Wang Z J, Wu C G, et al. Dynamic and adaptive calling context encoding. In: Proceedings of the 12th IEEE/ACM International Symposium on Code Generation and Optimization (CGO), Orlando, 2014. 120–131

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bixin Li.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wang, L., Li, B. & Leung, H. A new method to encode calling contexts with recursions. Sci. China Inf. Sci. 59, 052104 (2016). https://doi.org/10.1007/s11432-015-5418-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11432-015-5418-3

Keywords

关键词

Navigation