[VM] - put the trace message which states a safepoint is taking too long
under a flag so that it is printed only when needed.
Addresses issue 34933.
Bug: 34933
Change-Id: Idf77dd9492498d709384b51af66c464ae8c3fe00
Reviewed-on: https://dart-review.googlesource.com/c/81521
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
e6d3a45b6a
commit
f85cd162cc
@@ -9,6 +9,8 @@
|
||||
|
||||
namespace dart {
|
||||
|
||||
DEFINE_FLAG(bool, trace_safepoint, false, "Trace Safepoint logic.");
|
||||
|
||||
SafepointOperationScope::SafepointOperationScope(Thread* T) : StackResource(T) {
|
||||
ASSERT(T != NULL);
|
||||
Isolate* I = T->isolate();
|
||||
@@ -109,7 +111,7 @@ void SafepointHandler::SafepointThreads(Thread* T) {
|
||||
Monitor::WaitResult retval = sl.Wait(1000);
|
||||
if (retval == Monitor::kTimedOut) {
|
||||
num_attempts += 1;
|
||||
if (num_attempts > 10) {
|
||||
if (FLAG_trace_safepoint && num_attempts > 10) {
|
||||
// We have been waiting too long, start logging this as we might
|
||||
// have an issue where a thread is not checking in for a safepoint.
|
||||
OS::PrintErr("Attempt:%" Pd " waiting for %d threads to check in\n",
|
||||
|
||||
Reference in New Issue
Block a user