P4 to Git Change 1311278 by jatang@jatang-opencl-hsa-stg2 on 2016/09/06 14:13:56

SWDEV-101315 - Fix PerfCounter not working under CodeXL.

	1. Need to map ORCA PerfCounter block to PAL PerfCounter block/instance.
	2. CodeXL could try to create PerfCouters that don't exist in HW, so need to handle that and return 0 as result.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.hpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#21 edit
This commit is contained in:
foreman committed 2016-09-06 14:24:40 -04:00
1 parent 59ca1d70e6
commit 93e45cff4e
3 files changed
+253 -19

No files matched your search

+2 -5
View File
@@ -2344,19 +2344,16 @@ VirtualGPU::submitPerfCounter(amd::PerfCounterCommand& vcmd)
return;
}
else if (gpuCounter->create()) {
amdCounter->setDeviceCounter(gpuCounter);
newExperiment = true;
}
else {
LogPrintfError("We failed to allocate a perfcounter in CAL.\
LogPrintfError("We failed to allocate a perfcounter in PAL.\
Block: %d, counter: #d, event: %d",
gpuCounter->info()->blockIndex_,
gpuCounter->info()->counterIndex_,
gpuCounter->info()->eventIndex_);
delete gpuCounter;
vcmd.setStatus(CL_INVALID_OPERATION);
return;
}
amdCounter->setDeviceCounter(gpuCounter);
}
}