Advertisement

Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

A new method to encode calling contexts with recursions

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

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 to check access.

References

  1. 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

  2. 2

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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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

  14. 14

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

  15. 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

  16. 16

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

  17. 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

  18. 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

  19. 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

  20. 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

Download references

Author information

Correspondence to Bixin Li.

Rights and permissions

Reprints and Permissions

About this article

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

Keywords

  • calling context encoding
  • recursive calls
  • dynamic analysis
  • profiling
  • call graph

关键词

  • 调用语境编码
  • 递归
  • 动态分析
  • 剖析
  • 方法调用图