DocumentCode :
1284495
Title :
Precise Calling Context Encoding
Author :
Sumner, William N. ; Zheng, Yunhui ; Weeratunge, Dasarath ; Zhang, Xiangyu
Author_Institution :
Dept. of Comput. Sci., Purdue Univ., West Lafayette, IN, USA
Volume :
38
Issue :
5
fYear :
2012
Firstpage :
1160
Lastpage :
1177
Abstract :
Calling contexts (CCs) 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 are 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 (0-6.4 percent). 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. We also present our experience of applying context encoding to debugging crash-based failures.
Keywords :
optimisation; program compilers; program debugging; CC; ID; acyclic subsequences; call sites; context recovery; crash-based failure debugging; encoding optimization; event logging; medium-sized programs; precise calling context encoding; profiling; recursive call paths; stack depth-based identification; stack walking; Context; Decoding; Encoding; Image edge detection; Instruments; Runtime; Software algorithms; Calling context; call graph; calling context encoding; context sensitivity; path encoding; profiling;
fLanguage :
English
Journal_Title :
Software Engineering, IEEE Transactions on
Publisher :
ieee
ISSN :
0098-5589
Type :
jour
DOI :
10.1109/TSE.2011.70
Filename :
5963696
Link To Document :
بازگشت