summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/gc/heap.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index be3b7f8f73..bb9ad3bc8f 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -901,8 +901,9 @@ void Heap::IncrementDisableThreadFlip(Thread* self) {
MutexLock mu(self, *thread_flip_lock_);
thread_flip_cond_->CheckSafeToWait(self);
bool has_waited = false;
- uint64_t wait_start = NanoTime();
+ uint64_t wait_start = 0;
if (thread_flip_running_) {
+ wait_start = NanoTime();
ScopedTrace trace("IncrementDisableThreadFlip");
while (thread_flip_running_) {
has_waited = true;