SWDEV-337331 - command queue logs for debugging option

Change-Id: I198aecc5fd12369d87d4acc9910acc9435c1967a
This commit is contained in:
Ajay
2022-06-22 19:39:43 +00:00
parent 4fe8038b7c
commit 236178d0d4
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -345,7 +345,7 @@ void Command::enqueue() {
Agent::postEventCreate(as_cl(static_cast<Event*>(this)), type_);
}
ClPrint(LOG_DEBUG, LOG_CMD, "Command enqueued: %p", this);
ClPrint(LOG_DEBUG, LOG_CMD, "Command (%s) enqueued: %p", getOclCommandKindString(this->type()), this);
// Direct dispatch logic below will submit the command immediately, but the command status
// update will occur later after flush() with a wait
+3 -1
View File
@@ -172,12 +172,14 @@ void HostQueue::loop(device::VirtualDevice* virtualDevice) {
// Process the command's event wait list.
const Command::EventWaitList& events = command->eventWaitList();
bool dependencyFailed = false;
ClPrint(LOG_DEBUG, LOG_CMD, "Command (%s) processing: %p ,events.size(): %d",
getOclCommandKindString(command->type()), command, events.size());
for (const auto& it : events) {
// Only wait if the command is enqueued into another queue.
if (it->command().queue() != this) {
// Runtime has to flush the current batch only if the dependent wait is blocking
if (it->command().status() != CL_COMPLETE) {
ClPrint(LOG_DEBUG, LOG_CMD, "Command (%s) %p awaiting event: %p", getOclCommandKindString(command->type()), command, it);
virtualDevice->flush(head, true);
tail = head = NULL;
dependencyFailed |= !it->awaitCompletion();