Dont allocate HwTimeStamp when TimestampPacket is used

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-02-25 14:50:02 +00:00
committed by Compute-Runtime-Automation
parent 700fad64ff
commit 184ec7d07d
4 changed files with 57 additions and 11 deletions

View File

@@ -729,7 +729,12 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
if (isProfilingEnabled() && eventBuilder.getEvent()) {
this->getDevice().getOSTime()->getCpuTime(&submitTimeStamp.CPUTimeinNS);
eventBuilder.getEvent()->setSubmitTimeStamp(&submitTimeStamp);
getGpgpuCommandStreamReceiver().makeResident(*eventBuilder.getEvent()->getHwTimeStampNode()->getBaseGraphicsAllocation());
auto hwTimestampNode = eventBuilder.getEvent()->getHwTimeStampNode();
if (hwTimestampNode) {
getGpgpuCommandStreamReceiver().makeResident(*hwTimestampNode->getBaseGraphicsAllocation());
}
if (isPerfCountersEnabled()) {
getGpgpuCommandStreamReceiver().makeResident(*eventBuilder.getEvent()->getHwPerfCounterNode()->getBaseGraphicsAllocation());
}