Optimize profiling calls.

- do not call KMD query for submitted timestamp, we only need CPU
timestamp here.

Change-Id: Id60c1e367d9430d893fb3a253ffc058f45fc9609
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2020-10-23 15:38:35 +02:00
committed by sys_ocldev
parent 39a930e122
commit b039f5cc76
3 changed files with 32 additions and 4 deletions

View File

@@ -698,9 +698,9 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
DEBUG_BREAK_IF(device->getDeviceInfo().preemptionSupported != false);
}
TimeStampData submitTimeStamp;
TimeStampData submitTimeStamp = {};
if (isProfilingEnabled() && eventBuilder.getEvent()) {
this->getDevice().getOSTime()->getCpuGpuTime(&submitTimeStamp);
this->getDevice().getOSTime()->getCpuTime(&submitTimeStamp.CPUTimeinNS);
eventBuilder.getEvent()->setSubmitTimeStamp(&submitTimeStamp);
getGpgpuCommandStreamReceiver().makeResident(*eventBuilder.getEvent()->getHwTimeStampNode()->getBaseGraphicsAllocation());
if (isPerfCountersEnabled()) {