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

@@ -16,12 +16,13 @@
#include "shared/source/memory_manager/memory_manager.h"
#include "shared/source/os_interface/os_context.h"
#include "shared/source/utilities/logger.h"
#include "shared/source/utilities/logger_neo_only.h"
namespace NEO {
void GraphicsAllocation::setAllocationType(AllocationType allocationType) {
if (this->allocationType != allocationType) {
this->allocationType = allocationType;
fileLoggerInstance().logAllocation(this, nullptr);
logAllocation(fileLoggerInstance(), this, nullptr);
}
}
@@ -70,7 +71,7 @@ std::string GraphicsAllocation::getAllocationInfoString() const {
return "";
}
std::string GraphicsAllocation::getPatIndexInfoString() const {
std::string GraphicsAllocation::getPatIndexInfoString(const ProductHelper &) const {
return "";
}