Parallelizing calling context profiling in virtual machines on multicores

  • Authors:
  • Walter Binder;Danilo Ansaloni;Alex Villazón;Philippe Moret

  • Affiliations:
  • University of Lugano, Switzerland;University of Lugano, Switzerland;University of Lugano, Switzerland;University of Lugano, Switzerland

  • Venue:
  • PPPJ '09 Proceedings of the 7th International Conference on Principles and Practice of Programming in Java
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Calling Context Tree (CCT) is a prevailing datastructure for calling context profiling. As generating a complete CCT reflecting every method call is expensive, recent research has focused on efficiently approximating the CCT with sampling techniques. However, for tasks such as debugging, testing, and reverse engineering, complete and accurate CCTs are often needed. In this paper, we introduce the ParCCT, a novel approach to parallelizing application code and CCT generation on multicores. Each thread maintains a shadow stack and generates "packets" of method calls and returns that correspond to partial CCTs. Each packet includes a copy of the shadow stack, indicating the calling context of the first method call in the packet. Hence, packets are independent of each other and can be processed out-of-order and in parallel in order to update the CCT. Our portable and extensible implementation targets standard Java Virtual Machines, thanks to instrumentation techniques that ensure complete bytecode coverage and efficiently support custom calling context representations. The ParCCT is more than 110% faster than a primitive, non-parallel approach to CCT construction, when more than two cores are available. This speedup stems both from reduced contention and from parallelization.