refactor: rename global debug manager to debugManager

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-11-30 08:32:25 +00:00
committed by Compute-Runtime-Automation
parent f2ede40d2e
commit c9664e6bad
849 changed files with 6194 additions and 6194 deletions

View File

@@ -53,7 +53,7 @@ bool CompilerCache::evictCache(uint64_t &bytesEvicted) {
int filesCount = NEO::SysCalls::scandir(config.cacheDir.c_str(), &files, filterFunction, NULL);
if (filesCount == -1) {
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Scandir failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Scandir failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
return false;
}
@@ -92,11 +92,11 @@ bool CompilerCache::evictCache(uint64_t &bytesEvicted) {
bool CompilerCache::createUniqueTempFileAndWriteData(char *tmpFilePathTemplate, const char *pBinary, size_t binarySize) {
int fd = NEO::SysCalls::mkstemp(tmpFilePathTemplate);
if (fd == -1) {
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Creating temporary file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Creating temporary file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
return false;
}
if (NEO::SysCalls::pwrite(fd, pBinary, binarySize, 0) == -1) {
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Writing to temporary file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Writing to temporary file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::SysCalls::close(fd);
NEO::SysCalls::unlink(tmpFilePathTemplate);
return false;
@@ -109,7 +109,7 @@ bool CompilerCache::renameTempFileBinaryToProperName(const std::string &oldName,
int err = NEO::SysCalls::rename(oldName.c_str(), kernelFileHash.c_str());
if (err < 0) {
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Rename temp file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Rename temp file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::SysCalls::unlink(oldName);
return false;
}
@@ -121,7 +121,7 @@ void unlockFileAndClose(int fd) {
int lockErr = NEO::SysCalls::flock(fd, LOCK_UN);
if (lockErr < 0) {
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: unlock file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: unlock file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
}
NEO::SysCalls::close(fd);
@@ -141,7 +141,7 @@ void CompilerCache::lockConfigFileAndReadSize(const std::string &configFilePath,
countDirectorySize = true;
}
} else {
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Open config file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Open config file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
return;
}
}
@@ -149,7 +149,7 @@ void CompilerCache::lockConfigFileAndReadSize(const std::string &configFilePath,
int lockErr = NEO::SysCalls::flock(std::get<int>(fd), LOCK_EX);
if (lockErr < 0) {
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Lock config file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Lock config file failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::SysCalls::close(std::get<int>(fd));
std::get<int>(fd) = -1;
@@ -163,7 +163,7 @@ void CompilerCache::lockConfigFileAndReadSize(const std::string &configFilePath,
if (filesCount == -1) {
unlockFileAndClose(std::get<int>(fd));
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Scandir failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Scandir failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
std::get<int>(fd) = -1;
return;
}
@@ -195,7 +195,7 @@ void CompilerCache::lockConfigFileAndReadSize(const std::string &configFilePath,
if (readErr < 0) {
directorySize = 0;
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Read config failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "PID %d [Cache failure]: Read config failed! errno: %d\n", NEO::SysCalls::getProcessId(), errno);
unlockFileAndClose(std::get<int>(fd));
std::get<int>(fd) = -1;
}