| 1 |
/* |
| 2 |
* Copyright (C) 2020-2023 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "level_zero/experimental/source/tracing/tracing_imp.h" |
| 9 |
|
| 10 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 11 |
zeCommandListAppendMemoryCopyTracing(ze_command_list_handle_t hCommandList, |
| 12 |
void *dstptr, |
| 13 |
const void *srcptr, |
| 14 |
size_t size, |
| 15 |
ze_event_handle_t hSignalEvent, |
| 16 |
uint32_t numWaitEvents, |
| 17 |
ze_event_handle_t *phWaitEvents) { |
| 18 |
|
| 19 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryCopy, |
| 20 |
hCommandList, |
| 21 |
dstptr, |
| 22 |
srcptr, |
| 23 |
size, |
| 24 |
hSignalEvent, |
| 25 |
numWaitEvents, |
| 26 |
phWaitEvents); |
| 27 |
|
| 28 |
ze_command_list_append_memory_copy_params_t tracerParams; |
| 29 |
tracerParams.phCommandList = &hCommandList; |
| 30 |
tracerParams.pdstptr = &dstptr; |
| 31 |
tracerParams.psrcptr = &srcptr; |
| 32 |
tracerParams.psize = &size; |
| 33 |
tracerParams.phSignalEvent = &hSignalEvent; |
| 34 |
tracerParams.pnumWaitEvents = &numWaitEvents; |
| 35 |
tracerParams.pphWaitEvents = &phWaitEvents; |
| 36 |
|
| 37 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendMemoryCopyCb_t> apiCallbackData; |
| 38 |
|
| 39 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryCopyCb_t, CommandList, pfnAppendMemoryCopyCb); |
| 40 |
|
| 41 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryCopy, |
| 42 |
&tracerParams, |
| 43 |
apiCallbackData.apiOrdinal, |
| 44 |
apiCallbackData.prologCallbacks, |
| 45 |
apiCallbackData.epilogCallbacks, |
| 46 |
*tracerParams.phCommandList, |
| 47 |
*tracerParams.pdstptr, |
| 48 |
*tracerParams.psrcptr, |
| 49 |
*tracerParams.psize, |
| 50 |
*tracerParams.phSignalEvent, |
| 51 |
*tracerParams.pnumWaitEvents, |
| 52 |
*tracerParams.pphWaitEvents); |
| 53 |
} |
| 54 |
|
| 55 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 56 |
zeCommandListAppendMemoryFillTracing(ze_command_list_handle_t hCommandList, |
| 57 |
void *ptr, |
| 58 |
const void *pattern, |
| 59 |
size_t patternSize, |
| 60 |
size_t size, |
| 61 |
ze_event_handle_t hSignalEvent, |
| 62 |
uint32_t numWaitEvents, |
| 63 |
ze_event_handle_t *phWaitEvents) { |
| 64 |
|
| 65 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryFill, |
| 66 |
hCommandList, |
| 67 |
ptr, |
| 68 |
pattern, |
| 69 |
patternSize, |
| 70 |
size, |
| 71 |
hSignalEvent, |
| 72 |
numWaitEvents, |
| 73 |
phWaitEvents); |
| 74 |
|
| 75 |
ze_command_list_append_memory_fill_params_t tracerParams; |
| 76 |
tracerParams.phCommandList = &hCommandList; |
| 77 |
tracerParams.pptr = &ptr; |
| 78 |
tracerParams.ppattern = &pattern; |
| 79 |
tracerParams.ppattern_size = &patternSize; |
| 80 |
tracerParams.psize = &size; |
| 81 |
tracerParams.phSignalEvent = &hSignalEvent; |
| 82 |
tracerParams.pnumWaitEvents = &numWaitEvents; |
| 83 |
tracerParams.pphWaitEvents = &phWaitEvents; |
| 84 |
|
| 85 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendMemoryFillCb_t> apiCallbackData; |
| 86 |
|
| 87 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryFillCb_t, CommandList, pfnAppendMemoryFillCb); |
| 88 |
|
| 89 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryFill, |
| 90 |
&tracerParams, |
| 91 |
apiCallbackData.apiOrdinal, |
| 92 |
apiCallbackData.prologCallbacks, |
| 93 |
apiCallbackData.epilogCallbacks, |
| 94 |
*tracerParams.phCommandList, |
| 95 |
*tracerParams.pptr, |
| 96 |
*tracerParams.ppattern, |
| 97 |
*tracerParams.ppattern_size, |
| 98 |
*tracerParams.psize, |
| 99 |
*tracerParams.phSignalEvent, |
| 100 |
*tracerParams.pnumWaitEvents, |
| 101 |
*tracerParams.pphWaitEvents); |
| 102 |
} |
| 103 |
|
| 104 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 105 |
zeCommandListAppendMemoryCopyRegionTracing(ze_command_list_handle_t hCommandList, |
| 106 |
void *dstptr, |
| 107 |
const ze_copy_region_t *dstRegion, |
| 108 |
uint32_t dstPitch, |
| 109 |
uint32_t dstSlicePitch, |
| 110 |
const void *srcptr, |
| 111 |
const ze_copy_region_t *srcRegion, |
| 112 |
uint32_t srcPitch, |
| 113 |
uint32_t srcSlicePitch, |
| 114 |
ze_event_handle_t hSignalEvent, |
| 115 |
uint32_t numWaitEvents, |
| 116 |
ze_event_handle_t *phWaitEvents) { |
| 117 |
|
| 118 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryCopyRegion, |
| 119 |
hCommandList, |
| 120 |
dstptr, |
| 121 |
dstRegion, |
| 122 |
dstPitch, |
| 123 |
dstSlicePitch, |
| 124 |
srcptr, |
| 125 |
srcRegion, |
| 126 |
srcPitch, |
| 127 |
srcSlicePitch, |
| 128 |
hSignalEvent, |
| 129 |
numWaitEvents, |
| 130 |
phWaitEvents); |
| 131 |
|
| 132 |
ze_command_list_append_memory_copy_region_params_t tracerParams; |
| 133 |
tracerParams.phCommandList = &hCommandList; |
| 134 |
tracerParams.pdstptr = &dstptr; |
| 135 |
tracerParams.pdstRegion = &dstRegion; |
| 136 |
tracerParams.pdstPitch = &dstPitch; |
| 137 |
tracerParams.pdstSlicePitch = &dstSlicePitch; |
| 138 |
tracerParams.psrcptr = &srcptr; |
| 139 |
tracerParams.psrcRegion = &srcRegion; |
| 140 |
tracerParams.psrcPitch = &srcPitch; |
| 141 |
tracerParams.psrcSlicePitch = &srcSlicePitch; |
| 142 |
tracerParams.phSignalEvent = &hSignalEvent; |
| 143 |
tracerParams.pnumWaitEvents = &numWaitEvents; |
| 144 |
tracerParams.pphWaitEvents = &phWaitEvents; |
| 145 |
|
| 146 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendMemoryCopyRegionCb_t> apiCallbackData; |
| 147 |
|
| 148 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryCopyRegionCb_t, CommandList, pfnAppendMemoryCopyRegionCb); |
| 149 |
|
| 150 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryCopyRegion, |
| 151 |
&tracerParams, |
| 152 |
apiCallbackData.apiOrdinal, |
| 153 |
apiCallbackData.prologCallbacks, |
| 154 |
apiCallbackData.epilogCallbacks, |
| 155 |
*tracerParams.phCommandList, |
| 156 |
*tracerParams.pdstptr, |
| 157 |
*tracerParams.pdstRegion, |
| 158 |
*tracerParams.pdstPitch, |
| 159 |
*tracerParams.pdstSlicePitch, |
| 160 |
*tracerParams.psrcptr, |
| 161 |
*tracerParams.psrcRegion, |
| 162 |
*tracerParams.psrcPitch, |
| 163 |
*tracerParams.psrcSlicePitch, |
| 164 |
*tracerParams.phSignalEvent, |
| 165 |
*tracerParams.pnumWaitEvents, |
| 166 |
*tracerParams.pphWaitEvents); |
| 167 |
} |
| 168 |
|
| 169 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 170 |
zeCommandListAppendMemoryCopyFromContextTracing(ze_command_list_handle_t hCommandList, |
| 171 |
void *dstptr, |
| 172 |
ze_context_handle_t hContextSrc, |
| 173 |
const void *srcptr, |
| 174 |
size_t size, |
| 175 |
ze_event_handle_t hSignalEvent, |
| 176 |
uint32_t numWaitEvents, |
| 177 |
ze_event_handle_t *phWaitEvents) { |
| 178 |
|
| 179 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryCopyFromContext, |
| 180 |
hCommandList, |
| 181 |
dstptr, |
| 182 |
hContextSrc, |
| 183 |
srcptr, |
| 184 |
size, |
| 185 |
hSignalEvent, |
| 186 |
numWaitEvents, |
| 187 |
phWaitEvents); |
| 188 |
|
| 189 |
ze_command_list_append_memory_copy_from_context_params_t tracerParams; |
| 190 |
tracerParams.phCommandList = &hCommandList; |
| 191 |
tracerParams.pdstptr = &dstptr; |
| 192 |
tracerParams.phContextSrc = &hContextSrc, |
| 193 |
tracerParams.psrcptr = &srcptr, |
| 194 |
tracerParams.psize = &size, |
| 195 |
tracerParams.phSignalEvent = &hSignalEvent; |
| 196 |
tracerParams.pnumWaitEvents = &numWaitEvents; |
| 197 |
tracerParams.pphWaitEvents = &phWaitEvents; |
| 198 |
|
| 199 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendMemoryCopyFromContextCb_t> apiCallbackData; |
| 200 |
|
| 201 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryCopyFromContextCb_t, CommandList, pfnAppendMemoryCopyFromContextCb); |
| 202 |
|
| 203 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryCopyFromContext, |
| 204 |
&tracerParams, |
| 205 |
apiCallbackData.apiOrdinal, |
| 206 |
apiCallbackData.prologCallbacks, |
| 207 |
apiCallbackData.epilogCallbacks, |
| 208 |
*tracerParams.phCommandList, |
| 209 |
*tracerParams.pdstptr, |
| 210 |
*tracerParams.phContextSrc, |
| 211 |
*tracerParams.psrcptr, |
| 212 |
*tracerParams.psize, |
| 213 |
*tracerParams.phSignalEvent, |
| 214 |
*tracerParams.pnumWaitEvents, |
| 215 |
*tracerParams.pphWaitEvents); |
| 216 |
} |
| 217 |
|
| 218 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 219 |
zeCommandListAppendImageCopyTracing(ze_command_list_handle_t hCommandList, |
| 220 |
ze_image_handle_t hDstImage, |
| 221 |
ze_image_handle_t hSrcImage, |
| 222 |
ze_event_handle_t hSignalEvent, |
| 223 |
uint32_t numWaitEvents, |
| 224 |
ze_event_handle_t *phWaitEvents) { |
| 225 |
|
| 226 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendImageCopy, |
| 227 |
hCommandList, |
| 228 |
hDstImage, |
| 229 |
hSrcImage, |
| 230 |
hSignalEvent, |
| 231 |
numWaitEvents, |
| 232 |
phWaitEvents); |
| 233 |
|
| 234 |
ze_command_list_append_image_copy_params_t tracerParams; |
| 235 |
tracerParams.phCommandList = &hCommandList; |
| 236 |
tracerParams.phDstImage = &hDstImage; |
| 237 |
tracerParams.phSrcImage = &hSrcImage; |
| 238 |
tracerParams.phSignalEvent = &hSignalEvent; |
| 239 |
tracerParams.pnumWaitEvents = &numWaitEvents; |
| 240 |
tracerParams.pphWaitEvents = &phWaitEvents; |
| 241 |
|
| 242 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendImageCopyCb_t> apiCallbackData; |
| 243 |
|
| 244 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendImageCopyCb_t, CommandList, pfnAppendImageCopyCb); |
| 245 |
|
| 246 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendImageCopy, |
| 247 |
&tracerParams, |
| 248 |
apiCallbackData.apiOrdinal, |
| 249 |
apiCallbackData.prologCallbacks, |
| 250 |
apiCallbackData.epilogCallbacks, |
| 251 |
*tracerParams.phCommandList, |
| 252 |
*tracerParams.phDstImage, |
| 253 |
*tracerParams.phSrcImage, |
| 254 |
*tracerParams.phSignalEvent, |
| 255 |
*tracerParams.pnumWaitEvents, |
| 256 |
*tracerParams.pphWaitEvents); |
| 257 |
} |
| 258 |
|
| 259 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 260 |
zeCommandListAppendImageCopyRegionTracing(ze_command_list_handle_t hCommandList, |
| 261 |
ze_image_handle_t hDstImage, |
| 262 |
ze_image_handle_t hSrcImage, |
| 263 |
const ze_image_region_t *pDstRegion, |
| 264 |
const ze_image_region_t *pSrcRegion, |
| 265 |
ze_event_handle_t hSignalEvent, |
| 266 |
uint32_t numWaitEvents, |
| 267 |
ze_event_handle_t *phWaitEvents) { |
| 268 |
|
| 269 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendImageCopyRegion, |
| 270 |
hCommandList, |
| 271 |
hDstImage, |
| 272 |
hSrcImage, |
| 273 |
pDstRegion, |
| 274 |
pSrcRegion, |
| 275 |
hSignalEvent, |
| 276 |
numWaitEvents, |
| 277 |
phWaitEvents); |
| 278 |
|
| 279 |
ze_command_list_append_image_copy_region_params_t tracerParams; |
| 280 |
tracerParams.phCommandList = &hCommandList; |
| 281 |
tracerParams.phDstImage = &hDstImage; |
| 282 |
tracerParams.phSrcImage = &hSrcImage; |
| 283 |
tracerParams.ppDstRegion = &pDstRegion; |
| 284 |
tracerParams.ppSrcRegion = &pSrcRegion; |
| 285 |
tracerParams.phSignalEvent = &hSignalEvent; |
| 286 |
tracerParams.pnumWaitEvents = &numWaitEvents; |
| 287 |
tracerParams.pphWaitEvents = &phWaitEvents; |
| 288 |
|
| 289 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendImageCopyRegionCb_t> apiCallbackData; |
| 290 |
|
| 291 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendImageCopyRegionCb_t, CommandList, pfnAppendImageCopyRegionCb); |
| 292 |
|
| 293 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendImageCopyRegion, |
| 294 |
&tracerParams, |
| 295 |
apiCallbackData.apiOrdinal, |
| 296 |
apiCallbackData.prologCallbacks, |
| 297 |
apiCallbackData.epilogCallbacks, |
| 298 |
*tracerParams.phCommandList, |
| 299 |
*tracerParams.phDstImage, |
| 300 |
*tracerParams.phSrcImage, |
| 301 |
*tracerParams.ppDstRegion, |
| 302 |
*tracerParams.ppSrcRegion, |
| 303 |
*tracerParams.phSignalEvent, |
| 304 |
*tracerParams.pnumWaitEvents, |
| 305 |
*tracerParams.pphWaitEvents); |
| 306 |
} |
| 307 |
|
| 308 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 309 |
zeCommandListAppendImageCopyToMemoryTracing(ze_command_list_handle_t hCommandList, |
| 310 |
void *dstptr, |
| 311 |
ze_image_handle_t hSrcImage, |
| 312 |
const ze_image_region_t *pSrcRegion, |
| 313 |
ze_event_handle_t hSignalEvent, |
| 314 |
uint32_t numWaitEvents, |
| 315 |
ze_event_handle_t *phWaitEvents) { |
| 316 |
|
| 317 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendImageCopyToMemory, |
| 318 |
hCommandList, |
| 319 |
dstptr, |
| 320 |
hSrcImage, |
| 321 |
pSrcRegion, |
| 322 |
hSignalEvent, |
| 323 |
numWaitEvents, |
| 324 |
phWaitEvents); |
| 325 |
|
| 326 |
ze_command_list_append_image_copy_to_memory_params_t tracerParams; |
| 327 |
tracerParams.phCommandList = &hCommandList; |
| 328 |
tracerParams.pdstptr = &dstptr; |
| 329 |
tracerParams.phSrcImage = &hSrcImage; |
| 330 |
tracerParams.ppSrcRegion = &pSrcRegion; |
| 331 |
tracerParams.phSignalEvent = &hSignalEvent; |
| 332 |
tracerParams.pnumWaitEvents = &numWaitEvents; |
| 333 |
tracerParams.pphWaitEvents = &phWaitEvents; |
| 334 |
|
| 335 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendImageCopyToMemoryCb_t> apiCallbackData; |
| 336 |
|
| 337 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendImageCopyToMemoryCb_t, CommandList, pfnAppendImageCopyToMemoryCb); |
| 338 |
|
| 339 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendImageCopyToMemory, |
| 340 |
&tracerParams, |
| 341 |
apiCallbackData.apiOrdinal, |
| 342 |
apiCallbackData.prologCallbacks, |
| 343 |
apiCallbackData.epilogCallbacks, |
| 344 |
*tracerParams.phCommandList, |
| 345 |
*tracerParams.pdstptr, |
| 346 |
*tracerParams.phSrcImage, |
| 347 |
*tracerParams.ppSrcRegion, |
| 348 |
*tracerParams.phSignalEvent, |
| 349 |
*tracerParams.pnumWaitEvents, |
| 350 |
*tracerParams.pphWaitEvents); |
| 351 |
} |
| 352 |
|
| 353 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 354 |
zeCommandListAppendImageCopyFromMemoryTracing(ze_command_list_handle_t hCommandList, |
| 355 |
ze_image_handle_t hDstImage, |
| 356 |
const void *srcptr, |
| 357 |
const ze_image_region_t *pDstRegion, |
| 358 |
ze_event_handle_t hSignalEvent, |
| 359 |
uint32_t numWaitEvents, |
| 360 |
ze_event_handle_t *phWaitEvents) { |
| 361 |
|
| 362 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendImageCopyFromMemory, |
| 363 |
hCommandList, |
| 364 |
hDstImage, |
| 365 |
srcptr, |
| 366 |
pDstRegion, |
| 367 |
hSignalEvent, |
| 368 |
numWaitEvents, |
| 369 |
phWaitEvents); |
| 370 |
|
| 371 |
ze_command_list_append_image_copy_from_memory_params_t tracerParams; |
| 372 |
tracerParams.phCommandList = &hCommandList; |
| 373 |
tracerParams.phDstImage = &hDstImage; |
| 374 |
tracerParams.psrcptr = &srcptr; |
| 375 |
tracerParams.ppDstRegion = &pDstRegion; |
| 376 |
tracerParams.phSignalEvent = &hSignalEvent; |
| 377 |
tracerParams.pnumWaitEvents = &numWaitEvents; |
| 378 |
tracerParams.pphWaitEvents = &phWaitEvents; |
| 379 |
|
| 380 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendImageCopyFromMemoryCb_t> apiCallbackData; |
| 381 |
|
| 382 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendImageCopyFromMemoryCb_t, CommandList, pfnAppendImageCopyFromMemoryCb); |
| 383 |
|
| 384 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendImageCopyFromMemory, |
| 385 |
&tracerParams, |
| 386 |
apiCallbackData.apiOrdinal, |
| 387 |
apiCallbackData.prologCallbacks, |
| 388 |
apiCallbackData.epilogCallbacks, |
| 389 |
*tracerParams.phCommandList, |
| 390 |
*tracerParams.phDstImage, |
| 391 |
*tracerParams.psrcptr, |
| 392 |
*tracerParams.ppDstRegion, |
| 393 |
*tracerParams.phSignalEvent, |
| 394 |
*tracerParams.pnumWaitEvents, |
| 395 |
*tracerParams.pphWaitEvents); |
| 396 |
} |
| 397 |
|
| 398 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 399 |
zeCommandListAppendMemoryPrefetchTracing(ze_command_list_handle_t hCommandList, |
| 400 |
const void *ptr, |
| 401 |
size_t size) { |
| 402 |
|
| 403 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryPrefetch, |
| 404 |
hCommandList, |
| 405 |
ptr, |
| 406 |
size); |
| 407 |
|
| 408 |
ze_command_list_append_memory_prefetch_params_t tracerParams; |
| 409 |
tracerParams.phCommandList = &hCommandList; |
| 410 |
tracerParams.pptr = &ptr; |
| 411 |
tracerParams.psize = &size; |
| 412 |
|
| 413 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendMemoryPrefetchCb_t> apiCallbackData; |
| 414 |
|
| 415 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryPrefetchCb_t, CommandList, pfnAppendMemoryPrefetchCb); |
| 416 |
|
| 417 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryPrefetch, |
| 418 |
&tracerParams, |
| 419 |
apiCallbackData.apiOrdinal, |
| 420 |
apiCallbackData.prologCallbacks, |
| 421 |
apiCallbackData.epilogCallbacks, |
| 422 |
*tracerParams.phCommandList, |
| 423 |
*tracerParams.pptr, |
| 424 |
*tracerParams.psize); |
| 425 |
} |
| 426 |
|
| 427 |
ZE_APIEXPORT ze_result_t ZE_APICALL |
| 428 |
zeCommandListAppendMemAdviseTracing(ze_command_list_handle_t hCommandList, |
| 429 |
ze_device_handle_t hDevice, |
| 430 |
const void *ptr, |
| 431 |
size_t size, |
| 432 |
ze_memory_advice_t advice) { |
| 433 |
|
| 434 |
ZE_HANDLE_TRACER_RECURSION(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemAdvise, |
| 435 |
hCommandList, |
| 436 |
hDevice, |
| 437 |
ptr, |
| 438 |
size, |
| 439 |
advice); |
| 440 |
|
| 441 |
ze_command_list_append_mem_advise_params_t tracerParams; |
| 442 |
tracerParams.phCommandList = &hCommandList; |
| 443 |
tracerParams.phDevice = &hDevice; |
| 444 |
tracerParams.pptr = &ptr; |
| 445 |
tracerParams.psize = &size; |
| 446 |
tracerParams.padvice = &advice; |
| 447 |
|
| 448 |
L0::APITracerCallbackDataImp<ze_pfnCommandListAppendMemAdviseCb_t> apiCallbackData; |
| 449 |
|
| 450 |
ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemAdviseCb_t, CommandList, pfnAppendMemAdviseCb); |
| 451 |
|
| 452 |
return L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemAdvise, |
| 453 |
&tracerParams, |
| 454 |
apiCallbackData.apiOrdinal, |
| 455 |
apiCallbackData.prologCallbacks, |
| 456 |
apiCallbackData.epilogCallbacks, |
| 457 |
*tracerParams.phCommandList, |
| 458 |
*tracerParams.phDevice, |
| 459 |
*tracerParams.pptr, |
| 460 |
*tracerParams.psize, |
| 461 |
*tracerParams.padvice); |
| 462 |
} |