fix: use productHelper in getPatIndexInfoString() on Windows

Fix the PAT-index reporting in logger as currently on Windows reported
values are simply wrong.

The changed logic dependends on `RootDeviceEnvironment` and in order to
avoid introducing such dependencies into logger.[ch] the
`logAllocation()` is no longer a member of `FileLogger` but
a free-function instead (and a separate .cpp file). This is important
because the source files `logger.[ch]` are also used by ocloc library
and there is no point to contaminate ocloc code structure with
unnecessary dependencies.

Related-To: NEO-9421
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
Maciej Bielski
2024-10-22 17:22:46 +00:00
committed by Compute-Runtime-Automation
parent f76d480e8a
commit 45e78fea76
16 changed files with 107 additions and 69 deletions

View File

@@ -42,6 +42,7 @@
#include "shared/source/os_interface/os_interface.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/page_fault_manager/cpu_page_fault_manager.h"
#include "shared/source/utilities/logger_neo_only.h"
#include <algorithm>
#include <iostream>
@@ -671,7 +672,7 @@ GraphicsAllocation *MemoryManager::allocatePhysicalGraphicsMemory(const Allocati
return nullptr;
}
fileLoggerInstance().logAllocation(allocation, this);
logAllocation(fileLoggerInstance(), allocation, this);
registerAllocationInOs(allocation);
return allocation;
}
@@ -709,7 +710,7 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemoryInPreferredPool(const A
allocation->setAsReadOnly();
}
fileLoggerInstance().logAllocation(allocation, this);
logAllocation(fileLoggerInstance(), allocation, this);
registerAllocationInOs(allocation);
return allocation;
}