From 316b3a88518490b6c25ccced53a9b7ebbd52235a Mon Sep 17 00:00:00 2001 From: Eladash <18193363+elad335@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:04:31 +0200 Subject: [PATCH] Thread.cpp: Reduce logging --- Utilities/Thread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 13dff11dbc..62bd43ed19 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -2193,7 +2193,10 @@ u64 thread_base::finalize(thread_state result_state) noexcept return thread_ctrl::get_name_cached(); }; - sig_log.notice("Thread time: %fs (%fGc); Faults: %u [rsx:%u, spu:%u]; [soft:%u hard:%u]; Switches:[vol:%u unvol:%u]; Wait:[%.3fs, spur:%u]", + const bool is_cpu_thread = !!cpu_thread::get_current(); + auto& thread_log = (is_cpu_thread || g_tls_fault_all ? sig_log.notice : sig_log.trace); + + thread_log("Thread time: %fs (%fGc); Faults: %u [rsx:%u, spu:%u]; [soft:%u hard:%u]; Switches:[vol:%u unvol:%u]; Wait:[%.3fs, spur:%u]", time / 1000000000., cycles / 1000000000., g_tls_fault_all,