Architectural Support for Online Program Instrumentation
Kapil Vaswani, Y N Srikant and T Matthew Jacob
IISc-CSA-TR-2003-2
(February 2003) Available formats: [ps] [ps.gz]
Filed on May 4, 2004
Updated on May 4, 2004
For advanced profile-guided optimizations to be effective in online
environments, fine-grained and accurate profile information must be available
at low cost. In this paper, we propose a generic framework that makes it
possible for instrumentation based profilers to collect profile data
efficiently, a task that has traditionally been associated with high
overheads. The essence of the scheme is to make the underlying hardware aware
of instrumentation using a special set of profile instructions and tuned
micro-architecture. This not only allows the hardware to provide the runtime
with mechanisms to control the profiling activity, but also makes it possible
for the hardware itself to optimize the process of profiling in a manner
transparent to the runtime.
We propose selective instruction dispatch as one possible controlling
mechanism that can be used by the runtime to manage the execution of profile
instructions and keep profiling overheads under check. We propose profile
flag prediction, a hardware optimization that complements the selective
dispatch mechanism by not fetching profile instructions when the runtime has
turned profiling off. The framework is light-weight and flexible. It
eliminates the need for expensive book-keeping, additional recompilation or
code duplication. Our simulations with benchmarks from the SPEC CPU2000 suite
show that overheads for call-graph and basic block profiling can be reduced by
72.7% and 52.4% respectively with a negligible loss in accuracy.
Please bookmark this technical report as http://aditya.csa.iisc.ernet.in/TR/2003/2/.Problems ? Contact techrep@csa.iisc.ernet.in
[Updated at 2009-10-22T06:42Z]