From 0a7708f982c383ea02f84c5107a5460c0352ebc8 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Thu, 4 May 2023 11:24:25 -0700 Subject: [PATCH] SWDEV-301667 - Better log Change-Id: I7399de7fe7a8840568d02362d2d936173583030c --- rocclr/utils/debug.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rocclr/utils/debug.cpp b/rocclr/utils/debug.cpp index cdda2516b8..1c1dfd355b 100644 --- a/rocclr/utils/debug.cpp +++ b/rocclr/utils/debug.cpp @@ -94,7 +94,7 @@ void log_printf(LogLevel level, const char* file, int line, const char* format, vsnprintf(message, sizeof(message), format, ap); va_end(ap); uint64_t timeUs = Os::timeNanos() / 1000ULL; - fprintf(outFile, ":%d:%-25s:%-4d: %010lld us: %-5d: [tid:0x%s] %s\n", level, file, line, + fprintf(outFile, ":%d:%-25s:%-4d: %010lld us: [pid:%-5d tid:0x%s] %s\n", level, file, line, timeUs/1ULL, Os::getProcessId(), str_thrd_id.str().c_str(), message); fflush(outFile); } @@ -111,10 +111,10 @@ void log_printf(LogLevel level, const char* file, int line, uint64_t* start, va_end(ap); uint64_t timeUs = Os::timeNanos() / 1000ULL; if (start == 0 || *start == 0) { - fprintf(outFile, ":%d:%-25s:%-4d: %010lld us: %-5d: [tid:0x%s] %s\n", level, file, line, + fprintf(outFile, ":%d:%-25s:%-4d: %010lld us: [pid:%-5d tid:0x%s] %s\n", level, file, line, timeUs/1ULL, Os::getProcessId(), str_thrd_id.str().c_str(), message); } else { - fprintf(outFile, ":%d:%-25s:%-4d: %010lld us: %-5d: [tid:0x%s] %s: duration: %lld us\n", + fprintf(outFile, ":%d:%-25s:%-4d: %010lld us: [pid:%-5d tid:0x%s] %s: duration: %lld us\n", level, file, line, timeUs/1ULL, Os::getProcessId(), str_thrd_id.str().c_str(), message, (timeUs - *start)/1ULL); }