P4 to Git Change 1131897 by wchau@wchau_WINDOWS7_OCL on 2015/03/18 10:50:41

ECR #399840 - OpenCL Runtime HW Debug support development -  add support to the VI asics &  support the use case of debug registeration in a pre-dispatch callback function

	** Cross branch check-in with CL1131894

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_debugger_amd.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudebugmanager.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#501 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#139 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gputrap.hpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#355 edit
Este commit está contenido en:
foreman
2015-03-18 11:26:04 -04:00
padre 3da2bd1161
commit 95596795fc
Se han modificado 5 ficheros con 105 adiciones y 63 borrados
+9 -10
Ver fichero
@@ -418,6 +418,10 @@ Device::Device()
Device::~Device()
{
// remove the HW debug manager
delete hwDebugMgr_;
hwDebugMgr_ = NULL;
CondLog(vaCacheList_ == NULL ||
(vaCacheList_->size() != 0), "Application didn't unmap all host memory!");
@@ -969,6 +973,11 @@ Device::create(CALuint ordinal, CALuint numOfDevices)
return false;
}
// create the HW debug manager if needed
if (settings().enableHwDebug_) {
hwDebugMgr_ = new GpuDebugManager(this);
}
return true;
}
@@ -2669,7 +2678,6 @@ Device::SrdManager::fillResourceList(std::vector<const Resource*>& memList)
cl_int
Device::hwDebugManagerInit(amd::Context *context, uintptr_t messageStorage)
{
hwDebugMgr_ = new GpuDebugManager(this);
cl_int status = hwDebugMgr_->registerDebugger(context, messageStorage);
if (CL_SUCCESS != status) {
@@ -2680,13 +2688,4 @@ Device::hwDebugManagerInit(amd::Context *context, uintptr_t messageStorage)
return status;
}
void
Device::hwDebugManagerRemove()
{
hwDebugMgr_->unregisterDebugger();
delete hwDebugMgr_;
hwDebugMgr_ = NULL;
}
} // namespace gpu