mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
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:
committed by
Compute-Runtime-Automation
parent
f76d480e8a
commit
45e78fea76
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/memory_manager/memory_pool.h"
|
||||
#include "shared/source/utilities/logger.h"
|
||||
#include "shared/source/utilities/logger_neo_only.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/utilities/base_object_utils.h"
|
||||
@@ -535,7 +536,7 @@ TEST(AllocationTypeLoggingSingle, givenDebugVariableToCaptureAllocationTypeWhenF
|
||||
GraphicsAllocation graphicsAllocation(0, 1u /*num gmms*/, AllocationType::commandBuffer, nullptr, 0, 0, MemoryPool::memoryNull, MemoryManager::maxOsContextCount, 0llu);
|
||||
|
||||
testing::internal::CaptureStdout();
|
||||
fileLogger.logAllocation(&graphicsAllocation, nullptr);
|
||||
logAllocation(fileLogger, &graphicsAllocation, nullptr);
|
||||
|
||||
std::string output = testing::internal::GetCapturedStdout();
|
||||
std::string expectedOutput = "Created Graphics Allocation of type COMMAND_BUFFER\n";
|
||||
@@ -557,7 +558,7 @@ TEST(AllocationTypeLoggingSingle, givenLogAllocationTypeWhenLoggingAllocationThe
|
||||
EXPECT_FALSE(logFileCreated);
|
||||
|
||||
testing::internal::CaptureStdout();
|
||||
fileLogger.logAllocation(&graphicsAllocation, nullptr);
|
||||
logAllocation(fileLogger, &graphicsAllocation, nullptr);
|
||||
|
||||
std::string output = testing::internal::GetCapturedStdout();
|
||||
std::string expectedOutput = "Created Graphics Allocation of type COMMAND_BUFFER\n";
|
||||
|
||||
Reference in New Issue
Block a user