| 69 | |
| 70 | #ifdef ARM_COMPUTE_CL |
| 71 | void PerfettoProfiler::openclTraceBegin() |
| 72 | { |
| 73 | // Lock the process to ensure that the tracing session is created only once |
| 74 | if (!opencl_tracing_enabled && ACL_PROFILE_LEVEL > 0) |
| 75 | { |
| 76 | #ifdef ARM_COMPUTE_CL |
| 77 | opencl_clock = std::make_unique<OpenCLClock<true>>(ScaleFactor::NONE); |
| 78 | if (!opencl_clock) |
| 79 | { |
| 80 | std::cerr << "Failed to create OpenCLClock instance." << std::endl; |
| 81 | } |
| 82 | #endif |
| 83 | opencl_clock->test_start(); |
| 84 | opencl_clock->start(); |
| 85 | opencl_tracing_enabled = true; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | void PerfettoProfiler::openclTraceEnd() |
| 90 | { |
nothing calls this directly
no test coverage detected