Inferred call path profiling

  • Authors:
  • Todd Mytkowicz;Devin Coughlin;Amer Diwan

  • Affiliations:
  • University of Colorado, Boulder, CO, USA;University of Colorado, Boulder, CO, USA;University of Colorado, Boulder, CO, USA

  • Venue:
  • Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Prior work has found call path profiles to be useful for optimizers and programmer-productivity tools. Unfortunately, previous approaches for collecting path profiles are expensive: they need to either execute additional instructions (to track calls and returns) or they need to walk the stack. The state-of-the-art techniques for call path profiling slow down the program by 7% (for C programs) and 20% (for Java programs). This paper describes an innovative technique that collects minimal information from the running program and later (offline) infers the full call paths from this information. The key insight behind our approach is that readily available information during program execution - the height of the call stack and the identity of the current executing function - are good indicators of calling context. We call this pair a context identifier. Because more than one call path may have the same context identifier, we show how to disambiguate context identifiers by changing the sizes of function activation records. This disambiguation has no overhead in terms of executed instructions. We evaluate our approach on the SPEC CPU 2006 C++ and C benchmarks. We show that collecting context identifiers slows down programs by 0.17% (geometric mean). We can map these context identifiers to the correct unique call path 80% of the time for C++ programs and 95% of the time for C programs.