Compile Time Extraction And Instrumentation Of Affine Program Kernels