DocumentCode :
2073768
Title :
Precise calling context encoding
Author :
Sumner, William N. ; Zheng, Yunhui ; Weeratunge, Dasarath ; Zhang, Xiangyu
Volume :
1
fYear :
2010
fDate :
2-8 May 2010
Firstpage :
525
Lastpage :
534
Abstract :
Calling contexts 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 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 (1.89% on average). 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.
Keywords :
program debugging; program testing; acyclic call path; acyclic subsequence; debugging; event logging; expensive stack walking; integer addition; medium-sized program; precise calling context encoding; profiling; recursive call path; stack depth based identification; Context; Decoding; Encoding; Instruments; Legged locomotion; Runtime; Testing; calling context; dynamic context sensitivity; profiling;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Engineering, 2010 ACM/IEEE 32nd International Conference on
Conference_Location :
Cape Town
ISSN :
0270-5257
Print_ISBN :
978-1-60558-719-6
Type :
conf
DOI :
10.1145/1806799.1806875
Filename :
6062056
Link To Document :
بازگشت