Fix event profiling for marker commands

Related-To: NEO-5799

Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
This commit is contained in:
Konstanty Misiak
2021-06-22 13:16:27 +00:00
committed by Compute-Runtime-Automation
parent 6fb1be80c8
commit 1df1094465
10 changed files with 136 additions and 40 deletions

View File

@@ -466,13 +466,12 @@ EngineControl &Device::getEngine(uint32_t index) {
}
bool Device::getDeviceAndHostTimer(uint64_t *deviceTimestamp, uint64_t *hostTimestamp) const {
TimeStampData queueTimeStamp;
bool retVal = getOSTime()->getCpuGpuTime(&queueTimeStamp);
TimeStampData timeStamp;
bool retVal = getOSTime()->getCpuGpuTime(&timeStamp);
if (retVal) {
uint64_t resolution = (uint64_t)getOSTime()->getDynamicDeviceTimerResolution(getHardwareInfo());
*deviceTimestamp = queueTimeStamp.GPUTimeStamp * resolution;
auto resolution = getOSTime()->getDynamicDeviceTimerResolution(getHardwareInfo());
*deviceTimestamp = static_cast<uint64_t>(timeStamp.GPUTimeStamp * resolution);
}
retVal = getOSTime()->getCpuTime(hostTimestamp);
return retVal;
}