Write out OpenCL events when tracing is enabled