Add support for periodic dumping of performance data.
Fix missing arguement in get_kernel in the OpenCL backend.