performance: optimize copy in allocateDebugMetadata

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
Brandon Yates
2024-01-17 21:45:48 +00:00
committed by Compute-Runtime-Automation
parent 696be48cd4
commit 976d112188

View File

@@ -30,7 +30,7 @@ void *IoctlHelperXe::allocateDebugMetadata() {
drm_xe_ext_vm_set_debug_metadata *prev = nullptr;
drm_xe_ext_vm_set_debug_metadata *xeMetadataRoot = nullptr;
for (auto metadata : debugMetadata) {
for (auto &metadata : debugMetadata) {
auto *xeMetadata = new drm_xe_ext_vm_set_debug_metadata();
if (!xeMetadataRoot) {
xeMetadataRoot = xeMetadata;