Initial implementation of performance instrumentation for both CPU and GPU versions