kastiglione created this revision. kastiglione added reviewers: JDevlieghere, labath. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
The logic of `g_quiet` was inverted in D26243 <https://reviews.llvm.org/D26243>. This corrects the issue. Without this, running `log timers enable` produces a high volume of incremental timer output. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D117837 Files: lldb/source/Utility/Timer.cpp Index: lldb/source/Utility/Timer.cpp =================================================================== --- lldb/source/Utility/Timer.cpp +++ lldb/source/Utility/Timer.cpp @@ -63,7 +63,7 @@ TimerStack &stack = GetTimerStackForCurrentThread(); stack.push_back(this); - if (g_quiet && stack.size() <= g_display_depth) { + if (!g_quiet && stack.size() <= g_display_depth) { std::lock_guard<std::mutex> lock(GetFileMutex()); // Indent @@ -89,7 +89,7 @@ Signposts->endInterval(this, m_category.GetName()); TimerStack &stack = GetTimerStackForCurrentThread(); - if (g_quiet && stack.size() <= g_display_depth) { + if (!g_quiet && stack.size() <= g_display_depth) { std::lock_guard<std::mutex> lock(GetFileMutex()); ::fprintf(stdout, "%*s%.9f sec (%.9f sec)\n", int(stack.size() - 1) * TIMER_INDENT_AMOUNT, "",
Index: lldb/source/Utility/Timer.cpp =================================================================== --- lldb/source/Utility/Timer.cpp +++ lldb/source/Utility/Timer.cpp @@ -63,7 +63,7 @@ TimerStack &stack = GetTimerStackForCurrentThread(); stack.push_back(this); - if (g_quiet && stack.size() <= g_display_depth) { + if (!g_quiet && stack.size() <= g_display_depth) { std::lock_guard<std::mutex> lock(GetFileMutex()); // Indent @@ -89,7 +89,7 @@ Signposts->endInterval(this, m_category.GetName()); TimerStack &stack = GetTimerStackForCurrentThread(); - if (g_quiet && stack.size() <= g_display_depth) { + if (!g_quiet && stack.size() <= g_display_depth) { std::lock_guard<std::mutex> lock(GetFileMutex()); ::fprintf(stdout, "%*s%.9f sec (%.9f sec)\n", int(stack.size() - 1) * TIMER_INDENT_AMOUNT, "",
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits