Pin: building customized program analysis tools with dynamic instrumentation