Mining hot calling contexts in small space |
| |
Authors: | Daniele Cono D'Elia Camil Demetrescu Irene Finocchi |
| |
Affiliation: | 1. Department of Computer, Control, and Management Engineering, Sapienza University of Rome, Italy;2. Department of Computer Science, Sapienza University of Rome, Italy |
| |
Abstract: | Calling context trees (CCTs) associate performance metrics with paths through a program's call graph, providing valuable information for program understanding and performance analysis. In real applications, however, CCTs might easily consist of tens of millions of nodes, making them difficult to analyze and also hurting execution times because of poor access locality. For performance analysis, accurately mining only hot calling contexts may be more useful than constructing an entire CCT with millions of uninteresting paths, because the distribution of context frequencies is typically very skewed. In this article, we show how to exploit this property to considerably reduce the CCT size, introducing a novel runtime data structure, called hot CCT (HCCT), in the spectrum of representations for interprocedural control flow. The HCCT includes only hot nodes and their ancestors in a CCT and can be constructed independently from it by using fast, space‐efficient algorithms for mining frequent items in data streams. With this approach, we can distinguish between hot and cold contexts on the fly while obtaining very accurate frequency counts. We show, both theoretically and experimentally, that the HCCT achieves a similar precision as the CCT in a space that is several orders of magnitude smaller and roughly proportional to the number of hot contexts. Our approach can be effectively combined with previous context‐sensitive profiling techniques, as we show for static bursting. We devise an implementation as a plug‐in for the gcc compiler that incurs a slowdown competitive with the gprof call‐graph profiler while collecting finer‐grained profiles. Copyright © 2015 John Wiley & Sons, Ltd. |
| |
Keywords: | performance profiling dynamic program analysis data streaming algorithms frequent items program instrumentation |
|
|