Revert "Added file logging for rocclr & HIP"

This reverts commit 5f055d227d.

This change broke the legacy-complib build in p4. It seems that we can't use any flags in debug.cpp.

Change-Id: I17bb83651b85d6f415d9074634b479658fd4c3f9
This commit is contained in:
Vlad Sytchenko
2020-06-23 13:16:25 -04:00
zatwierdzone przez Vladislav Sytchenko
rodzic 6f2dfea285
commit 20c24cae93
2 zmienionych plików z 1 dodań i 22 usunięć
+1 -20
Wyświetl plik
@@ -26,7 +26,6 @@
#include "utils/flags.hpp"
#endif
#include <mutex>
#include <cstdlib>
#include <cstdio>
#include <cstdarg>
@@ -81,15 +80,6 @@ void log_timestamped(LogLevel level, const char* file, int line, const char* mes
#endif
}
FILE* g_pLogFile = nullptr;
std::once_flag g_iLogFileInitialized;
void createLogFile() {
if (!flagIsDefault(AMD_LOG_FILE) && g_pLogFile == nullptr) {
g_pLogFile = fopen("rocclr-trace.log", "w");
}
}
void log_printf(LogLevel level, const char* file, int line, const char* format, ...) {
va_list ap;
@@ -98,16 +88,7 @@ void log_printf(LogLevel level, const char* file, int line, const char* format,
vsnprintf(message, sizeof(message), format, ap);
va_end(ap);
if (!flagIsDefault(AMD_LOG_FILE)) {
std::call_once(amd::g_iLogFileInitialized, amd::createLogFile);
if (g_pLogFile) {
fprintf(g_pLogFile, ":%d:%-25s:%-4d: %010lld: %s\n", level, file, line, Os::timeNanos() / 100ULL, message);
}
}
else {
fprintf(stderr, ":%d:%-25s:%-4d: %010lld: %s\n", level, file, line, Os::timeNanos() / 100ULL, message);
}
fprintf(stderr, ":%d:%-25s:%-4d: %010lld: %s\n", level, file, line, Os::timeNanos() / 100ULL, message);
}
} // namespace amd
-2
Wyświetl plik
@@ -26,8 +26,6 @@
\
release(int, AMD_LOG_LEVEL, 0, \
"The default log level") \
release(bool, AMD_LOG_FILE, false, \
"By default log file is disabled") \
release(uint, AMD_LOG_MASK, 0X7FFFFFFF, \
"The mask to enable specific kinds of logs") \
debug(uint, DEBUG_GPU_FLAGS, 0, \