refactor: Remove SourceLevelDebugger

Removed:
- SourceLevelDebugger (with tests)
- DebuggerLibrary
- DebuggerLibraryRestore
- debuggerSupported field from hwInfo.capabilityTable
- HasSourceLevelDebuggerSupport matcher
- ExperimentalEnableSourceLevelDebugger debug var
- EnableMockSourceLevelDebugger debug var
- DebuggerOptDisable debug var
- lib_names.h.in file
- third_party/source_level_debugger/igfx_debug_interchange_types.h

Related-To: NEO-7213
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2023-08-04 09:19:46 +00:00
committed by Compute-Runtime-Automation
parent 7330974116
commit 6fca8ee195
171 changed files with 203 additions and 4933 deletions

View File

@@ -12,7 +12,6 @@
#include "shared/source/program/program_info.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/mocks/mock_modules_zebin.h"
#include "shared/test/common/mocks/mock_source_level_debugger.h"
#include "gtest/gtest.h"
@@ -64,50 +63,21 @@ TEST(RequiresLocalMemoryWindowVA, GivenProgramWithKernelsWhenSomeOfKernelRequire
EXPECT_TRUE(NEO::requiresLocalMemoryWindowVA(programInfo));
}
TEST(RequiresRebuildWithPatchtokens, givenLegacyDebuggerAttachedAndZebinaryFormatNonBuiltinBinaryWhenCheckingForRebuildRequirementThenReturnTrueAndFallbackToPatchtokens) {
TEST(RequiresRebuildWithPatchtokens, givenNoLegacyDebuggerAttachedWhenCheckingForRebuildRequirementThenReturnFalseAndDoNotFallback) {
ZebinTestData::ValidEmptyProgram<> zebin;
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
auto device = std::unique_ptr<NEO::MockDevice>(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(nullptr));
device->getRootDeviceEnvironmentRef().debugger.reset(new MockActiveSourceLevelDebugger);
std::string options{NEO::CompilerOptions::enableZebin};
bool isBuiltIn{false};
bool rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef<const uint8_t>::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false);
EXPECT_TRUE(rebuildRequired);
EXPECT_FALSE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin));
EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::disableZebin));
}
TEST(RequiresRebuildWithPatchtokens, givenNoLegacyDebuggerAttachedOrNonZebinaryFormatOrBuiltinBinaryWhenCheckingForRebuildRequirementThenReturnFalseAndDoNotFallback) {
ZebinTestData::ValidEmptyProgram<> zebin;
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->getRootDeviceEnvironmentRef().debugger.reset(new MockActiveSourceLevelDebugger);
std::string options{NEO::CompilerOptions::enableZebin};
bool isBuiltIn{true};
bool rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef<const uint8_t>::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false);
EXPECT_FALSE(rebuildRequired);
EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin));
isBuiltIn = false;
bool isBuiltIn = false;
device->getRootDeviceEnvironmentRef().debugger.reset(nullptr);
rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef<const uint8_t>::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false);
EXPECT_FALSE(rebuildRequired);
EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin));
device->getRootDeviceEnvironmentRef().debugger.reset(new MockActiveSourceLevelDebugger);
for (auto idx = 0; idx < 4; idx++) {
zebin.elfHeader->identity.magic[idx] = 0;
} // broken header - zebinary format will not be detected
rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef<const uint8_t>::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false);
bool rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef<const uint8_t>::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false);
EXPECT_FALSE(rebuildRequired);
EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin));
}
TEST(RequiresRebuildWithPatchtokens, givenVmeUsedWhenIsRebuiltToPatchtokensRequiredThenReturnFalse) {
ZebinTestData::ValidEmptyProgram<> zebin;
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
auto device = std::unique_ptr<NEO::MockDevice>(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(nullptr));
device->getRootDeviceEnvironmentRef().debugger.reset(nullptr);
std::string options{NEO::CompilerOptions::enableZebin};
bool isBuiltIn = false;