Obtain new TimestampPacket before releasing old node

Change-Id: I243d50e32967a0accea2d73fdd5ff4935bc03449
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2018-09-10 14:24:11 +02:00
committed by sys_ocldev
parent 049ba5c625
commit 7ec0989eea
3 changed files with 29 additions and 3 deletions

View File

@@ -599,9 +599,10 @@ void CommandQueue::dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo,
void CommandQueue::obtainNewTimestampPacketNode() {
auto allocator = device->getMemoryManager()->getTimestampPacketAllocator();
if (timestampPacketNode) {
allocator->returnTag(timestampPacketNode);
}
auto oldNode = timestampPacketNode;
timestampPacketNode = allocator->getTag();
if (oldNode) {
allocator->returnTag(oldNode);
}
}
} // namespace OCLRT