performance: skip resource registration when debugging disabled

Related-to: NEO-15147

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
Brandon Yates
2025-06-16 15:54:00 +00:00
committed by Compute-Runtime-Automation
parent f574534602
commit 4f711cf5d8
2 changed files with 34 additions and 3 deletions

View File

@@ -1825,11 +1825,15 @@ void DrmMemoryManager::unregisterAllocation(GraphicsAllocation *allocation) {
}
void DrmMemoryManager::registerAllocationInOs(GraphicsAllocation *allocation) {
if (allocation) {
auto drmAllocation = static_cast<DrmAllocation *>(allocation);
drmAllocation->registerBOBindExtHandle(&getDrm(drmAllocation->getRootDeviceIndex()));
if (isAllocationTypeToCapture(drmAllocation->getAllocationType())) {
drmAllocation->markForCapture();
auto drm = &getDrm(drmAllocation->getRootDeviceIndex());
if (drm->getRootDeviceEnvironment().executionEnvironment.isDebuggingEnabled()) {
drmAllocation->registerBOBindExtHandle(drm);
if (isAllocationTypeToCapture(drmAllocation->getAllocationType())) {
drmAllocation->markForCapture();
}
}
}
}