diff --git a/rocclr/runtime/device/gpu/gputhreadtrace.cpp b/rocclr/runtime/device/gpu/gputhreadtrace.cpp index 9e108f04da..13dae52cf8 100644 --- a/rocclr/runtime/device/gpu/gputhreadtrace.cpp +++ b/rocclr/runtime/device/gpu/gputhreadtrace.cpp @@ -43,7 +43,7 @@ ThreadTrace::create(CalThreadTraceReference* calRef) } bool -ThreadTrace::info(uint infoType, uint* info,uint infoSize) const +ThreadTrace::info(uint infoType, uint* info, uint infoSize) const { switch (infoType) { case CL_THREAD_TRACE_BUFFERS_SIZE: { @@ -52,7 +52,7 @@ ThreadTrace::info(uint infoType, uint* info,uint infoSize) const return false; } else { - *info = gpu().getThreadTraceQueryRes(gslThreadTrace()); + gpu().getThreadTraceQueryRes(gslThreadTrace(), info); } break; } diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp index e4e282ca26..550fd6e69a 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp +++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp @@ -958,14 +958,10 @@ CALGSLContext::resumeThreadTrace(uint32 seNum) const } } -uint32 -CALGSLContext::getThreadTraceQueryRes(gslQueryObject threadTrace) const +void +CALGSLContext::getThreadTraceQueryRes(gslQueryObject threadTrace, uint32* info) const { - CALuint64 tempResult; - threadTrace->GetResult(m_cs, &tempResult); - // Make sure that we aren't losing any data from the cast - assert(tempResult < UINT_MAX); - return (uint32)tempResult; + threadTrace->GetResultAll(m_cs, info); } void diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h index 052a520520..40868d5cb2 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h +++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h @@ -107,7 +107,7 @@ public: void destroyThreadTrace(gslQueryObject) const; gslShaderTraceBufferObject CreateThreadTraceBuffer(void) const; void DestroyThreadTraceBuffer(gslShaderTraceBufferObject,uint32) const; - uint32 getThreadTraceQueryRes(gslQueryObject) const; + void getThreadTraceQueryRes(gslQueryObject, uint32* info) const; void configMemThreadTrace(gslShaderTraceBufferObject,gslMemObject,uint32,uint32) const; void beginThreadTrace(gslQueryObject,gslQueryObject, gslQueryTarget,uint32,CALthreadTraceConfig&) const; void endThreadTrace(gslQueryObject,uint32) const;