P4 to Git Change 1123271 by wchau@wchau_WINDOWS7_OCL on 2015/02/18 16:59:12

ECR #399840 - OpenCL Runtime HW Debug support development - add install_trap API to avoid the expose of runtime trap handler to the DBE.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_context.cpp#41 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_debugger_amd.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_debugger_amd.h#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudebugmanager.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hwdebug.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hwdebug.hpp#5 edit


[ROCm/clr commit: 7431a16712]
This commit is contained in:
foreman
2015-02-18 17:22:47 -05:00
parent cdac75c0b6
commit 18eb37fc01
3 changed files with 23 additions and 13 deletions
+13 -1
View File
@@ -45,7 +45,9 @@ HwDebugManager::HwDebugManager(amd::Device* device)
{
memset(&debugInfo_, 0, sizeof(debugInfo_));
memset(deviceTrapInfo_, 0, sizeof(uint64_t) * kDebugTrapLocationMax);
for (int i = 0; i < kDebugTrapLocationMax; i++) {
rtTrapInfo_[i] = NULL;
}
}
HwDebugManager::~HwDebugManager()
@@ -172,4 +174,14 @@ HwDebugManager::assignKernelParamMem(uint32_t paramIdx, amd::Memory* mem)
paramMemory_[paramIdx] = mem;
}
void
HwDebugManager::installTrap(cl_dbg_trap_type_amd trapType,
amd::Memory* trapHandler,
amd::Memory* trapBuffer)
{
rtTrapInfo_[trapType<<2] = trapHandler;
rtTrapInfo_[(trapType<<2)+1] = trapBuffer;
}
} // namespace amd