SWDEV-237658 - Do not attach events to user invisible Marker.
Change-Id: I3a74fd2614d6e2e1d51543471bbd5ae51a713a47
[ROCm/clr commit: ea15c75c55]
This commit is contained in:
committed by
Karthik Jayaprakash
parent
f959aadea0
commit
cddec46bb7
Regular → Executable
+7
-1
@@ -143,7 +143,13 @@ void Event::addMarker(amd::HostQueue* queue, amd::Command* command, bool record)
|
|||||||
if (queue->properties().test(CL_QUEUE_PROFILING_ENABLE)) {
|
if (queue->properties().test(CL_QUEUE_PROFILING_ENABLE)) {
|
||||||
if (command == nullptr) {
|
if (command == nullptr) {
|
||||||
command = queue->getLastQueuedCommand(true);
|
command = queue->getLastQueuedCommand(true);
|
||||||
if (command == nullptr) {
|
if ((command == nullptr) || (command->type() == 0)) {
|
||||||
|
// if lastEnqueuedCommand is user invisible command(command->type() == 0),
|
||||||
|
// which is only used for sync, create a new amd:Marker
|
||||||
|
// and release() lastEnqueuedCommand
|
||||||
|
if (command != nullptr) {
|
||||||
|
command->release();
|
||||||
|
}
|
||||||
command = new amd::Marker(*queue, kMarkerDisableFlush);
|
command = new amd::Marker(*queue, kMarkerDisableFlush);
|
||||||
command->enqueue();
|
command->enqueue();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user