Valence: variable length calling context encoding
Autor: | Prasad A. Kulkarni, Tong Zhou, Kshitij A. Doshi, Michael R. Jantz, Vivek Sarkar |
---|---|
Rok vydání: | 2019 |
Předmět: |
Profiling (computer programming)
050101 languages & linguistics Theoretical computer science Computer science Subroutine media_common.quotation_subject 05 social sciences Byte Spec# 02 engineering and technology Static analysis computer.software_genre ENCODE Debugging 0202 electrical engineering electronic engineering information engineering 020201 artificial intelligence & image processing 0501 psychology and cognitive sciences Compiler computer computer.programming_language media_common |
Zdroj: | CC |
Popis: | Many applications, including program optimizations, debugging tools, and event loggers, rely on calling context to gain additional insight about how a program behaves during execution. One common strategy for determining calling contexts is to use compiler instrumentation at each function call site and return sites to encode the call paths and store them in a designated area of memory. While recent works have shown that this approach can generate precise calling context encodings with low overhead, the encodings can grow to hundreds or even thousands of bytes to encode a long call path, for some applications. Such lengthy encodings increase the costs associated with storing, detecting, and decoding call path contexts, and can limit the effectiveness of this approach for many usage scenarios. This work introduces a new compiler-based strategy that significantly reduces the length of calling context encoding with little or no impact on instrumentation costs for many applications. Rather than update or store an entire word at each function call and return, our approach leverages static analysis and variable length instrumentation to record each piece of the calling context using only a small number of bits, in most cases. We implemented our approach as an LLVM compiler pass, and compared it directly to the state-of-the-art calling context encoding strategy (PCCE) using a standard set of C/C++ applications from SPEC CPU 2017. Overall, our approach reduces the length of calling context encoding from 4.3 words to 1.6 words on average (> 60% reduction), thereby improving the efficiency of applications that frequently store or query calling contexts. |
Databáze: | OpenAIRE |
Externí odkaz: |