mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
fix: Replace printf with current logging practice
* add missing stdout flush Signed-off-by: Kozlowski, Marek <marek.kozlowski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9a6403f3bc
commit
bd8fc07bb7
@@ -88,9 +88,7 @@ inline void PageFaultManager::migrateStorageToGpuDomain(void *ptr, PageFaultData
|
||||
end = std::chrono::steady_clock::now();
|
||||
long long elapsedTime = std::chrono::duration_cast<std::chrono::nanoseconds>(end - start).count();
|
||||
|
||||
if (debugManager.flags.PrintUmdSharedMigration.get()) {
|
||||
printf("UMD transferred shared allocation 0x%llx (%zu B) from CPU to GPU (%f us)\n", reinterpret_cast<unsigned long long int>(ptr), pageFaultData.size, elapsedTime / 1e3);
|
||||
}
|
||||
PRINT_DEBUG_STRING(debugManager.flags.PrintUmdSharedMigration.get(), stdout, "UMD transferred shared allocation 0x%llx (%zu B) from CPU to GPU (%f us)\n", reinterpret_cast<unsigned long long int>(ptr), pageFaultData.size, elapsedTime / 1e3);
|
||||
|
||||
this->protectCPUMemoryAccess(ptr, pageFaultData.size);
|
||||
}
|
||||
@@ -137,9 +135,7 @@ inline void PageFaultManager::migrateStorageToCpuDomain(void *ptr, PageFaultData
|
||||
end = std::chrono::steady_clock::now();
|
||||
long long elapsedTime = std::chrono::duration_cast<std::chrono::nanoseconds>(end - start).count();
|
||||
|
||||
if (debugManager.flags.PrintUmdSharedMigration.get()) {
|
||||
printf("UMD transferred shared allocation 0x%llx (%zu B) from GPU to CPU (%f us)\n", reinterpret_cast<unsigned long long int>(ptr), pageFaultData.size, elapsedTime / 1e3);
|
||||
}
|
||||
PRINT_DEBUG_STRING(debugManager.flags.PrintUmdSharedMigration.get(), stdout, "UMD transferred shared allocation 0x%llx (%zu B) from GPU to CPU (%f us)\n", reinterpret_cast<unsigned long long int>(ptr), pageFaultData.size, elapsedTime / 1e3);
|
||||
pageFaultData.unifiedMemoryManager->nonGpuDomainAllocs.push_back(ptr);
|
||||
}
|
||||
pageFaultData.domain = AllocationDomain::cpu;
|
||||
|
||||
Reference in New Issue
Block a user