@@ -101,17 +101,17 @@ void GpgpuWalkerHelper<GfxFamily>::addAluReadModifyWriteRegister(
101101
102102template <typename GfxFamily>
103103void GpgpuWalkerHelper<GfxFamily>::dispatchProfilingCommandsStart(
104- HwTimeStamps &hwTimeStamps,
104+ TagNode< HwTimeStamps> &hwTimeStamps,
105105 OCLRT::LinearStream *commandStream) {
106106 using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM;
107107
108108 // PIPE_CONTROL for global timestamp
109- uint64_t TimeStampAddress = reinterpret_cast < uint64_t >(&( hwTimeStamps.GlobalStartTS ) );
109+ uint64_t TimeStampAddress = hwTimeStamps. getGraphicsAllocation ()-> getGpuAddress () + ptrDiff (& hwTimeStamps.tag -> GlobalStartTS , hwTimeStamps. tag );
110110
111111 PipeControlHelper<GfxFamily>::obtainPipeControlAndProgramPostSyncOperation (commandStream, PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP, TimeStampAddress, 0llu);
112112
113113 // MI_STORE_REGISTER_MEM for context local timestamp
114- TimeStampAddress = reinterpret_cast < uint64_t >(&( hwTimeStamps.ContextStartTS ) );
114+ TimeStampAddress = hwTimeStamps. getGraphicsAllocation ()-> getGpuAddress () + ptrDiff (& hwTimeStamps.tag -> ContextStartTS , hwTimeStamps. tag );
115115
116116 // low part
117117 auto pMICmdLow = (MI_STORE_REGISTER_MEM *)commandStream->getSpace (sizeof (MI_STORE_REGISTER_MEM));
@@ -122,7 +122,7 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchProfilingCommandsStart(
122122
123123template <typename GfxFamily>
124124void GpgpuWalkerHelper<GfxFamily>::dispatchProfilingCommandsEnd(
125- HwTimeStamps &hwTimeStamps,
125+ TagNode< HwTimeStamps> &hwTimeStamps,
126126 OCLRT::LinearStream *commandStream) {
127127
128128 using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM;
@@ -133,7 +133,7 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchProfilingCommandsEnd(
133133 pPipeControlCmd->setCommandStreamerStallEnable (true );
134134
135135 // MI_STORE_REGISTER_MEM for context local timestamp
136- uint64_t TimeStampAddress = reinterpret_cast < uint64_t >(&( hwTimeStamps.ContextEndTS ) );
136+ uint64_t TimeStampAddress = hwTimeStamps. getGraphicsAllocation ()-> getGpuAddress () + ptrDiff (& hwTimeStamps.tag -> ContextEndTS , hwTimeStamps. tag );
137137
138138 // low part
139139 auto pMICmdLow = (MI_STORE_REGISTER_MEM *)commandStream->getSpace (sizeof (MI_STORE_REGISTER_MEM));
0 commit comments