Parallelizing calling context profiling in virtual machines on multicores

Walter Binder, Danilo Ansaloni, Alex Villazón, Philippe Moret
2009 Proceedings of the 7th International Conference on Principles and Practice of Programming in Java - PPPJ '09  
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.
more » ... h 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.
doi:10.1145/1596655.1596672 dblp:conf/pppj/BinderAVM09 fatcat:ugqispoz7zbyxo6hygdciaafd4